Repository navigation
Conversation
…th's last day The prefilled deadline is tomorrow, and the calendar opens on that month. On the last day of a month that is next month, so the "Today," button the test clicks isn't shown and the test fails. Pin the date to mid-month. Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Jitter <2b2e6415e748c35180847a37aadae06a11e30dddc76b784e7fd9354c4eb42e7a@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
🤖 Closing as a duplicate of #2064, which kalvinnchau opened a few minutes earlier with the same fix. |
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.
Problem
mainfails one Vitest test inStatusEditor.test.tsx: "prefills and preserves an existing deadline, and validates a custom date before saving". The failure isUnable to find role="button" and name /^Today,/. It started on main's 00:27 UTC run on Oct 31 (job), and every PR's JavaScript shard now fails on it.The test prefills a deadline for tomorrow, and
StatusExpirationopens the calendar on that month (defaultMonth={value}). On the last day of a month, tomorrow falls in the next month, so the calendar doesn't show today and the test can't find the "Today," button. The product behaviour is fine. Only the test depends on the date.Fix
Only this test is changed:
Dateis pinned to mid-month (Oct 14, 2026, at noon) usingvi.useFakeTimers({ toFake: ["Date"] }), the same approach asSearchResults.test.tsx. Timers stay real, souserEventbehaves as before.afterEachnow restores real timers.Validation
StatusEditor.test.tsxpasses all 20 tests.vitest run src/features/user-status: 26 tests pass. Biome is clean.🤖 Generated with Claude Code