test(roster): pin the clock in the give-away test so it stops failing every run
User description
Summary
tests/roster-team-calendar-manager.dom.test.tsx("reads requests, manage and the roster again after a give-away is sent") started failing on every run from 09:00 Perth on 14 Oct 2026 (about 01:00 UTC). It turnedUnit coveragered on any new CI run, including #3539 and #3471.- Cause: the give-away sheet reads the real clock, and the fixture shift (Thu 15 Oct, 09:00 Perth) counts as urgent inside 24 hours, which replaces the "Offer to 1 person" button with "I can't make it". The test only passed while the real date was more than a day before the shift.
- Fix: pin
Dateto two days before the shift for that one test. Test-only change; no product code touched.
Areas touched: Delivery and assurance
RAG impact: no retrieval behaviour change โ one roster UI test
Verification
- Checks run:
npx vitest run tests/roster-team-calendar-manager.dom.test.tsxgave 36 passed (twice). Before the change the same command failed onmainat 6f3712c81 with "Unable to find role=button and name /^Offer to 1 person/". Prettier check clean.
Risk and rollout
- Risk: none to the product; test only.
- Rollback: revert the commit.
- Provider or production effects: None
Notes
- Open PRs need this change on their branch (or an up-to-date merge of
main) forUnit coverageto go green again.
๐ค Generated with Claude Code
https://claude.ai/code/session_015r3N1AdnrkQEPgiP4DuJdN
Generated by Claude Code
Summary by cubic
Pins the clock in the roster give-away test so it stops failing on every CI run once the fixture shift falls within 24 hours.
- The give-away sheet reads the real clock, so the fixture shift (Thu 15 Oct, 09:00 Perth) was treated as urgent and swapped "Offer to 1 person" for "I can't make it".
- Pins
Dateto two days before the shift for that one test; no product code touched.
CodeAnt-AI Description
Keep roster give-away coverage stable across run dates
What Changed
- The give-away test fixes the clock so it continues to check the standard offer flow after the fixture shift enters the 24-hour urgent window.
Impact
โ
Fewer date-dependent roster test failures
โ
Stable unit coverage across run dates
๐ก Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.