Commit Graph

8 Commits

Author SHA1 Message Date
78c658822e Add 16 new dashboard E2E tests for comprehensive UI coverage
All checks were successful
Deploy / deploy (push) Successful in 1m57s
- Decision Card tests: GENTLE/LIGHT/REDUCED status display, icon rendering
- Override behavior tests: stress forces REST, PMS forces GENTLE, persistence after refresh
- Mini Calendar tests: current month display, today highlight, phase colors, navigation
- Onboarding Banner tests: setup prompts, Garmin link, period date prompt
- Loading state tests: skeleton loaders, performance validation

Total dashboard E2E coverage now 42 tests. Overall E2E count: 129 tests across 12 files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 18:00:41 +00:00
2558930507 Add 13 new E2E tests for period logging flow and calendar display
All checks were successful
Deploy / deploy (push) Successful in 2m28s
Period logging tests (5 new):
- Future date validation
- Cycle length display between periods
- Prediction accuracy display
- Delete period log from history
- Edit period log from history

Calendar tests (8 new):
- Today highlight in calendar view
- Phase colors in calendar days
- Phase legend display
- Today button for quick navigation
- Multi-month navigation with return to today
- Calendar URL generation
- URL format validation
- Copy to clipboard functionality

Total E2E tests: 113 (was 100)
Total unit tests: 1014 (51 test files)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:51:23 +00:00
f4a3f7d9fd Add 14 new dashboard E2E tests for data panel, nutrition, and accessibility
All checks were successful
Deploy / deploy (push) Successful in 2m39s
- Added 8 data panel tests: HRV status, Body Battery, cycle day format,
  current phase, intensity minutes, phase limit, remaining minutes
- Added 4 nutrition panel tests: seed cycling, carb range, keto guidance,
  nutrition section header
- Added 4 accessibility tests: main landmark, skip navigation link,
  keyboard accessible overrides, focus indicators

Total dashboard E2E coverage: 24 tests (up from 10)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:43:56 +00:00
54b57d5160 Add 36 new E2E tests across 5 test files
All checks were successful
Deploy / deploy (push) Successful in 1m41s
New E2E test files:
- e2e/health.spec.ts: 3 tests for health/observability endpoints
- e2e/history.spec.ts: 7 tests for history page
- e2e/plan.spec.ts: 7 tests for exercise plan page
- e2e/decision-engine.spec.ts: 8 tests for decision display and overrides
- e2e/cycle.spec.ts: 11 tests for cycle tracking, settings, and period logging

Total E2E tests: 100 (up from 64)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 17:37:34 +00:00
27f084f950 Fix Garmin token connection not persisting after save
All checks were successful
Deploy / deploy (push) Successful in 1m38s
Root cause: The setup-db script was missing user field definitions
(garminConnected, tokens, etc.). Production PocketBase had no such
fields, so updates silently failed to persist.

Changes:
- Add user custom fields to setup-db.ts (matches e2e harness)
- Fix status route to use strict boolean check (=== true)
- Add verification in tokens route with helpful error message
- Add ENCRYPTION_KEY to playwright config for e2e tests
- Add comprehensive e2e tests for Garmin connection flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 13:20:50 +00:00
8c59b3bd67 Add self-contained e2e test harness with ephemeral PocketBase
Some checks failed
CI / quality (push) Failing after 29s
Deploy / deploy (push) Successful in 2m37s
Previously, 15 e2e tests were skipped because TEST_USER_EMAIL and
TEST_USER_PASSWORD env vars weren't set. Now the test harness:

- Starts a fresh PocketBase instance in /tmp on port 8091
- Creates admin user, collections, and API rules automatically
- Seeds test user with period data for authenticated tests
- Cleans up temp directory after tests complete

Also fixes:
- Override toggle tests now use checkbox role (not button)
- Adds proper wait for OVERRIDES section before testing toggles
- Suppresses document.cookie lint warning with explanation

Test results: 64 e2e tests pass, 1014 unit tests pass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 09:38:24 +00:00
38bea1ffd7 Add comprehensive E2E test suite for all user flows
Some checks failed
CI / quality (push) Failing after 28s
Deploy / deploy (push) Successful in 2m28s
- Add e2e/auth.spec.ts (14 tests): Login page UI, form validation, error
  handling, protected route redirects, public routes
- Add e2e/dashboard.spec.ts (10 tests): Dashboard display, decision card,
  override toggles, navigation
- Add e2e/settings.spec.ts (15 tests): Settings form, Garmin settings,
  logout flow
- Add e2e/period-logging.spec.ts (9 tests): Period history page, API auth
- Add e2e/calendar.spec.ts (13 tests): Calendar view, navigation, ICS
  subscription, token endpoints

Total: 64 E2E tests (28 pass without auth, 36 skip when TEST_USER_EMAIL/
TEST_USER_PASSWORD not set)

Authenticated tests use test credentials via environment variables, allowing
full E2E coverage when PocketBase test user is available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 22:44:57 +00:00
6bd5eb663b Add Playwright E2E testing infrastructure
- Add playwright-web-flake to flake.nix for NixOS browser support
- Pin @playwright/test@1.56.1 to match nixpkgs version
- Create playwright.config.ts with Chromium-only, auto-start dev server
- Add e2e/smoke.spec.ts with initial smoke tests
- Add .mcp.json for Claude browser control via MCP
- Update .gitignore for playwright artifacts
- Remove E2E test skip from spec.md Known Limitations
- Update specs/testing.md to require three-tier testing approach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 21:43:24 +00:00