mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 14:40:52 +00:00
- typecheck/lint/test/format clean (modulo the chart test file blocked by Marc constraint — pre-existing) - integration suite green after the test-isolation fix in the preceding commit (10/10 consecutive runs) - build + e2e blocked by the documented Node-25 Reflect.get bug on this workstation; CI Docker (Node 22) is canonical and Phase-3 already records 41/41 e2e specs green there - format sweep on .planning/*.md + e2e/measurement-flow.spec.ts to clear the warnings Phase 6 reconcile listed as pre-existing-out-of-scope Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.3 KiB
3.3 KiB
Phase 3 — End-to-end test coverage report
Status: Done. 41/41 active specs green locally on Node 22, 3 skipped (1 mobile-only spec skipped on desktop project, /admin a11y test parked as test.fixme × 2 projects).
What landed
- Seed + auth fixture (
e2e/setup/).global-setup.tsupserts a deterministice2e-testeruser via rawpg(Prisma client's ESMimport.meta.urlis not loadable by Playwright's TS runner), then logs that user in once and writes the resultinghealthlog_sessioncookie tostorageState.json. Authenticated specs reuse the cookie viatest.use({ storageState: STORAGE_STATE_PATH })to dodge the per-IP5/15minlogin rate-limit Playwright would otherwise hit when 9 specs × 2 projects all log in. - 6 new specs covering the acceptance criteria:
dashboard.spec.ts,measurement-flow.spec.ts,codex-flow.spec.ts,doctor-report.spec.ts,insights-generate.spec.ts,mobile-viewport.spec.ts. All usepage.route()to stub network calls so CI never reaches OpenAI / chatgpt.com / Withings. - a11y suite extended (
e2e/a11y.spec.ts) to/(dashboard) and/settings/integrationsunder an authenticatedtest.use();/administest.fixme'd with a comment pointing at Phase 4b. - Real a11y fixes discovered while running the new audits:
src/components/layout/top-bar.tsx(mobile user-menu trigger had no accessible name),src/components/settings/password-input.tsx(show/hide toggle had no aria-label — addedcommon.showPassword/common.hidePasswordto en + de),src/app/auth/login/page.tsx(Sign-up link relied on colour alone — switchedhover:underline→underline). - Mobile touch-target fix in
src/app/page.tsx: dashboard's "Add" dropdown trigger was 32px tall (size="sm"); addedmin-h-11so the Pixel 5 viewport meets WCAG 2.5.5. - Pre-existing breakage repaired:
e2e/login.spec.tsregex still matched the old "Login with password" copy and crashed on the new "Sign in with password"; also disambiguated the strict-mode-violation between the passkey and password CTAs. - Dependency: added
pg+@types/pgas devDependencies — required for the seed step (Playwright's TS loader can't import the generated Prisma client;pgis already used byscripts/seed-demo.tsfor the same reason).
Local validation
Built with Node 22 (Node 25 has the Cannot read private member #state regression noted in CLAUDE.md), seeded a Postgres testcontainer at localhost:5432, and ran pnpm e2e. Final run: 41 passed, 3 skipped, 0 failed across chromium-desktop + chromium-mobile.
Deferrals
/adminaccessibility audit. Three real critical violations on the overview page (button-name × N, select-name × 1, colour-contrast × 1) all originate insrc/components/admin/**, which Phase 4b is restructuring concurrently. Markedtest.fixme()with a comment to re-enable post-4b.dashboard.measurements.addMeasurement/mood.addEntryi18n collision. Both render the literal "Add" so the dashboard's quick-entry dropdown has two indistinguishable menu items. The spec works around this withgetByRole("menuitem").first(). Worth a UX fix in v1.5.1.
CI
.github/workflows/e2e.yml already supplies the env block we need (DATABASEURL, ENCRYPTION_KEYS, AUTH_RP*) and runs next build before playwright test. No workflow changes were necessary.