Skip to content

Conversation

@agorthi-akamai
Copy link
Contributor

@agorthi-akamai agorthi-akamai commented Jan 1, 2026

Description 📝

This change fixes flaky time-range tests by correcting how date and time values are validated.
The tests were incorrectly comparing UI wall-clock times (user timezone) with API payloads (UTC), which caused consistent failures in CI and incorrect assumptions about application behavior.

Changes 🔄

List any change(s) relevant to the reviewer.

-Removed invalid UI-to-UTC time comparisons.

Updated preset tests (This Month, Last Month, custom ranges) to asser

  • ...
Before After
📷 📷

How to test 🧪

pnpm cy:run -s "cypress/e2e/core/linodes/clone-linode.spec.ts,cypress/e2e/core/cloudpulse/timerange-verification.spec.ts"

Prerequisites

(How to setup test environment)

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 870 passing tests on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing870 Passing11 Skipped46m 31s

@agorthi-akamai agorthi-akamai marked this pull request as ready for review January 2, 2026 03:10
@agorthi-akamai agorthi-akamai requested a review from a team as a code owner January 2, 2026 03:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes flaky time-range tests by correcting timezone handling in date comparisons. The tests were incorrectly comparing UI wall-clock times (user timezone) with API payloads (UTC), causing failures in CI.

Key Changes:

  • Modified getThisMonthRange() and getLastMonthRange() functions to accept a timezone parameter and properly convert to UTC
  • Changed mock profile timezone from 'UTC' to 'America/New_York' to test timezone conversion logic
  • Updated test assertions to use the mock profile's timezone when generating expected date ranges

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/manager/cypress/e2e/core/cloudpulse/timerange-verification.spec.ts Refactored date range functions to accept timezone parameter and convert to UTC; updated mock profile timezone and test calls
packages/manager/.changeset/pr-13237-tests-1767269372512.md Added changeset documenting the test fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

3 participants