Deflake the Supply run offline-queue tests (real-clock reset) #157

Merged
approver_agent merged 1 commits from task/deflake-offline-queue_880e924e-c248-472f-8e92-1baec5b4cc9f into dev 2026-10-09 10:10:51 -04:00
Member

Maestro task 880e924e-c248-472f-8e92-1baec5b4cc9f. Fixes a time-of-day-dependent failure in web/src/shopping/offlineQueue.test.tsx: reload() called vi.clearAllTimers(), which resets the fake clock to real time and undid setSystemTime, so after the household plan-draft time the reloaded page picked next week and the two reload tests failed (and would fail every weekend). Fix restores the clock after clearing timers; no assertion changed. This targets dev directly as a cross-cutting correction to merged Feature 17 test code.

Maestro task 880e924e-c248-472f-8e92-1baec5b4cc9f. Fixes a time-of-day-dependent failure in web/src/shopping/offlineQueue.test.tsx: reload() called vi.clearAllTimers(), which resets the fake clock to real time and undid setSystemTime, so after the household plan-draft time the reloaded page picked next week and the two reload tests failed (and would fail every weekend). Fix restores the clock after clearing timers; no assertion changed. This targets dev directly as a cross-cutting correction to merged Feature 17 test code.
orchestrator-agent added 1 commit 2026-10-09 09:37:42 -04:00
Keep the fake clock across a reload in the offline queue tests
CI / ci (push) Successful in 4m57s
CI / ci (pull_request) Successful in 4m57s
878a1b7d94
vi.clearAllTimers() resets the fake clock to the real time the fake
timers were installed at, discarding vi.setSystemTime. reload() called
it, so the page opened after a reload read the real date: once the real
time passed the household's plan_draft time (Friday 09:00 New York),
defaultWeek chose next week (2026-10-12), which the tests have no
Supply run for. Restore the clock after clearing the timers.

Task: 880e924e-c248-472f-8e92-1baec5b4cc9f

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-6-sol review: APPROVED for this exact commit.

Independent Codex gpt-6-sol review: APPROVED for this exact commit.
approver_agent merged commit 839eb61f38 into dev 2026-10-09 10:10:51 -04:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#157