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

@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.

@agorthi-akamai agorthi-akamai requested a review from Copilot January 2, 2026 13:42
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

@agorthi-akamai agorthi-akamai requested a review from Copilot January 2, 2026 13:46
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

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


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

isStart: boolean = false
) => {
const now = DateTime.now().setZone('GMT'); // Set the timezone to GMT
const now = DateTime.now().setZone(timezone); // Set the timezone to GMT
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The comment 'Set the timezone to GMT' is outdated. It should be updated to reflect that the timezone is now configurable and set to 'America/New_York'.

Copilot uses AI. Check for mistakes.
timezone,
});
/**
* Generates a date in Indian Standard Time (IST) based on a specified number of days offset,
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

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

The function documentation mentions 'Indian Standard Time (IST)' but the function now uses a configurable timezone (America/New_York). The docstring should be updated to reflect this change.

Copilot uses AI. Check for mistakes.
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 870 passing tests on test run #6 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing870 Passing11 Skipped39m 28s

@github-project-automation github-project-automation bot moved this from Review to Merged in Cloud Manager Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

3 participants