Summary:
The Playwright smoke tests in CI consistently fail on 4 tests across e2e/dashboard-widgets.spec.js and e2e/notifications.spec.js:
dashboard widgets render with mocked metrics
contribution graph range buttons request a new range
goal form posts a new goal
notification bell opens and closes drawer
All four fail with the same root cause — the "Dashboard" heading never appears:
await expect(page.getByRole("heading", { name: /dashboard/i })).toBeVisible({ timeout: 30000 });
The test navigates to /dashboard, but the page either redirects to the login screen or renders an empty state because no authenticated session is available in the CI runner. The 30s timeout expires and the test fails.
Why this matters: These failures affect every open PR (see #1925, #1962) and add review noise. The core CI checks (type-check, lint, build, dependency audit) are unaffected, but the red "checks failed" banner creates confusion for contributors and maintainers.
Likely investigation path:
- Check how
page.goto("/dashboard") handles unauthenticated state in CI vs local
- Verify that the Playwright test setup (e.g.,
test.use({ storageState }) or mock API routes) properly seeds an auth session
- The tests mock API responses but may depend on a pre-existing cookie/localStorage token that isn't set up in the CI environment
To reproduce locally:
npx playwright test e2e/dashboard-widgets.spec.js --reporter=line
Look for the "Dashboard" heading assertion at line 179, 195, and 214 of e2e/dashboard-widgets.spec.js.
Suggested fix: Either ensure the test runner injects a valid session token before navigation, or guard dashboard-dependent tests behind an auth-ready check and skip gracefully when unauthenticated.
Summary:
The Playwright smoke tests in CI consistently fail on 4 tests across
e2e/dashboard-widgets.spec.jsande2e/notifications.spec.js:dashboard widgets render with mocked metricscontribution graph range buttons request a new rangegoal form posts a new goalnotification bell opens and closes drawerAll four fail with the same root cause — the "Dashboard" heading never appears:
The test navigates to
/dashboard, but the page either redirects to the login screen or renders an empty state because no authenticated session is available in the CI runner. The 30s timeout expires and the test fails.Why this matters: These failures affect every open PR (see #1925, #1962) and add review noise. The core CI checks (type-check, lint, build, dependency audit) are unaffected, but the red "checks failed" banner creates confusion for contributors and maintainers.
Likely investigation path:
page.goto("/dashboard")handles unauthenticated state in CI vs localtest.use({ storageState })or mock API routes) properly seeds an auth sessionTo reproduce locally:
npx playwright test e2e/dashboard-widgets.spec.js --reporter=lineLook for the "Dashboard" heading assertion at line 179, 195, and 214 of
e2e/dashboard-widgets.spec.js.Suggested fix: Either ensure the test runner injects a valid session token before navigation, or guard dashboard-dependent tests behind an auth-ready check and skip gracefully when unauthenticated.