fix: align onboarding-tour Playwright fixture with the real cutoff#2467
Merged
Conversation
The Playwright test "user created before migration cutoff does not see
the tour" has been failing on every PR (including main) because the
OLD_USER fixture had `created_at: '2026-06-07T10:00:00.000Z'` — which
is AFTER the production MIGRATION_CUTOFF constant of
`'2026-05-19T00:00:00.000Z'`.
So the fixture date didn't match what the test name claimed: a date
after the cutoff was being asked to represent "before the cutoff," the
tour was correctly shown, and the assertion failed.
The unit test (OnboardingTour.test.tsx) passed because it injects
`migrationDate={MIGRATION_DATE}` via prop, overriding the real const
with `'2026-06-08T00:00:00.000Z'` so 06-07 truly is before 06-08. The
Playwright test runs the real component without a prop override and
hits the production const.
Fixture-only fix: move OLD_USER's `created_at` to
`'2026-04-15T10:00:00.000Z'`, well before the production cutoff. No
production code change — the OnboardingTour component and its
MIGRATION_CUTOFF stay as they are.
Unblocks CI on every open PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
✅ Deploy Preview for notion2anki ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.



Summary
The Playwright test `tests/onboarding-tour.spec.ts:123` — "user created before migration cutoff does not see the tour" — has been failing on every PR, including main itself. The pre-existing failure has blocked the local merge-status hook on the recent docs PRs (#2463 already merged via admin bypass, #2464 still open and blocked).
Diagnosis
The fixture date was AFTER the cutoff but the test name claims it represents a user from BEFORE the cutoff. The two were never reconciled.
The unit test (`OnboardingTour.test.tsx`) doesn't trip on this because it injects `migrationDate={MIGRATION_DATE}` via prop, using `'2026-06-08T00:00:00.000Z'` so 06-07 is correctly "before". The Playwright test runs the real component and hits the production const directly.
Fix
One line. Move OLD_USER's `created_at` to `'2026-04-15T10:00:00.000Z'` — clearly before the production cutoff.
No production code change. The component, the cutoff date, and every other test stay as they are.
Not in this PR
Test plan
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.