From 9a23edef83bf9cb4d4029216746395b8820592b1 Mon Sep 17 00:00:00 2001 From: Alexander Alemayhu Date: Tue, 19 May 2026 19:52:55 +0200 Subject: [PATCH] fix: align onboarding-tour Playwright fixture with the real cutoff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- web/tests/onboarding-tour.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/tests/onboarding-tour.spec.ts b/web/tests/onboarding-tour.spec.ts index 69830100d..7d4f2fc91 100644 --- a/web/tests/onboarding-tour.spec.ts +++ b/web/tests/onboarding-tour.spec.ts @@ -30,7 +30,7 @@ const OLD_USER_LOCALS = { ...NEW_USER_LOCALS, user: { ...NEW_USER_LOCALS.user, - created_at: '2026-06-07T10:00:00.000Z', + created_at: '2026-04-15T10:00:00.000Z', onboarded_at: null, }, };