Fix formatting in dashboard stats test so it passes#1473
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes a time-dependent failure in DashboardStats service tests by ensuring rollup refresh and assertions run under the intended frozen time, so week-based ranges are computed relative to the test’s travel_to date.
Changes:
- Move
DashboardRollupRefreshServiceinvocation andfilterable_dashboard_dataassertions inside thetravel_toblock for the affected test.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR makes the dashboard stats test use a consistent fixed time. The main changes are:
Confidence Score: 5/5This looks safe to merge. No blocking issues were found in the changed code. The fixed clock now covers the time-dependent weekly range calculation. The service and stats operations are synchronous, and block-scoped time travel is restored automatically.
What T-Rex did
Important Files Changed
Reviews (1): Last reviewed commit: "Fix formatting in dashboard stats test s..." | Re-trigger Greptile |
Summary of the problem
The test in
dashboard_stats_test.rbwas failingthis pr fixes it
Describe your changes
Moves the
DashboardRollupRefreshServicecall and assertions inside thetravel_toblock of the test.This makes
week_rangescompute relative to 2026-04-14 (where 2026-04-13 is within range) instead of the real current date where 2026-04-13 is now more than 12 weeks in the past.Screenshots / Media