Skip to content

fix: align onboarding-tour Playwright fixture with the real cutoff#2467

Merged
aalemayhu merged 1 commit into
mainfrom
fix/onboarding-tour-cutoff-fixture
May 19, 2026
Merged

fix: align onboarding-tour Playwright fixture with the real cutoff#2467
aalemayhu merged 1 commit into
mainfrom
fix/onboarding-tour-cutoff-fixture

Conversation

@aalemayhu
Copy link
Copy Markdown
Contributor

@aalemayhu aalemayhu commented May 19, 2026

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

Field Value
Production cutoff `MIGRATION_CUTOFF = '2026-05-19T00:00:00.000Z'` (OnboardingTour.tsx:29)
OLD_USER fixture `created_at: '2026-06-07T10:00:00.000Z'`
Comparison `2026-06-07 >= 2026-05-19` → true → tour shown → test fails

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

  • No changelog entry — test-only change, no user-visible behavior.
  • No sonar-scanner — single test-fixture line per `.claude/rules/sonar.md` exception list.

Test plan

  • CI: Playwright workflow goes green for the first time in days.
  • All other tests stay green (unit test for the same component was already passing via prop injection — no risk of regressing it).
  • Once merged, docs: fill more feature gaps + correct existing pages #2464 (docs Wave 2) gets a clean check rollup and can merge normally without admin bypass.

🤖 Generated with Claude Code


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

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>
@sonarqubecloud
Copy link
Copy Markdown

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for notion2anki ready!

Name Link
🔨 Latest commit 9a23ede
🔍 Latest deploy log https://app.netlify.com/projects/notion2anki/deploys/6a0ca3a09892100008088783
😎 Deploy Preview https://deploy-preview-2467--notion2anki.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@aalemayhu aalemayhu marked this pull request as ready for review May 19, 2026 19:43
@aalemayhu aalemayhu merged commit 5249214 into main May 19, 2026
11 checks passed
@aalemayhu aalemayhu deleted the fix/onboarding-tour-cutoff-fixture branch May 19, 2026 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant