fix(e2e): derive burndown current-month assertion from the clock#88
Merged
san360 merged 1 commit intoJun 3, 2026
Merged
Conversation
The "shows current month" test hard-coded `toContain('May 2026')`, but the
burndown page computes its month label from the live system clock: page-burndown.ts
defaults selectedMonth from `new Date()` and renders it via formatMonthLabel's
`toLocaleString('default', { month: 'long', year: 'numeric' })`.
The assertion therefore only passed during May 2026 and fails on every later
month (the page correctly renders "June 2026", etc.). Derive the expected label
the same way the component does so the test tracks the clock instead of going
stale on each month rollover. Test-only change.
san360
approved these changes
Jun 2, 2026
3 tasks
Contributor
|
@JuliusGruber Thanks for the PR, Could you please accept contributor's agreement as descrbed in https://github.com/microsoft/ContributorLicenseAgreement#accepting |
Contributor
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
Burndown › shows current monthe2e test hard-codedexpect(content).toContain('May 2026'). The burndown page, however, derives its month label from the live system clock:src/webview/page-burndown.tsdefaultsselectedMonthfromnew Date(), andformatMonthLabel→new Date(year, month - 1).toLocaleString('default', { month: 'long', year: 'numeric' }).So the assertion only passed during May 2026 and fails on every later month — the page correctly renders "June 2026", "July 2026", … while the test still expects "May 2026". It is a time-bomb assertion that silently rots on each month rollover.
This derives the expected label the same way the component does, so the test tracks the current month instead of a hard-coded string:
Test-only change — no production code touched.
Related Issues
None.
Checklist
npm run checkpasses — deferred to CI for this test-only change (eslint/cspellare scoped tosrc/, nottests/).tests/e2e/burndown.spec.tsburndown spec runs green (5/5) in an environment where the e2e harness bootstraps.