Playwright specs still asserted the pre-refactor URLs and failed on CI: - auth.spec.ts expected post-login to land at `/`; now `/home`. - public.spec.ts expected unauth redirect to `/landing`; now `/`. - public.spec.ts's landing-loads test navigated to `/landing` (a stale- bookmark redirect); point it directly at `/`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Playwright E2E
ResolutionFlow's Playwright suite is still intentionally lean, but it now covers the main routes and workflows most likely to break demos, onboarding, or day-one product usage.
What it covers
- Public landing page
- Redirect behavior for protected routes
- UI login flow
- Authenticated dashboard shell
- Session history page
- Session history filtering
- Feedback page
- Account settings page
- Profile save flow
- Flow library search
- Start session directly from library search results
- Resume incomplete session
- Start and complete a troubleshooting session
- Export preview for a completed session
- Personal analytics page
- Team analytics page
- Shared sessions exports page
- Public shared session page
How auth works
auth.setup.tslogs in through the backend API using the seeded team admin user- it writes a Playwright storage state file to
e2e/.auth/team-admin.json - most authenticated specs reuse that state
auth.spec.ts,public.spec.ts, andshared-session.spec.tsexplicitly clear storage so those tests stay truly unauthenticated
Local prerequisites
- PostgreSQL must be running
backend/venvshould exist with backend dependencies installed- frontend dependencies must be installed
- Playwright Chromium must be installed once
First-time setup
cd frontend
npm install
npx playwright install chromium
Run the suite
cd frontend
npm run test:e2e
Useful variants:
npm run test:e2e -- --list
npm run test:e2e:headed
npm run test:e2e:ui
npm run test:e2e:debug
Backend boot behavior
The Playwright config starts the backend automatically. It will:
- run Alembic migrations
- seed test users
- launch Uvicorn on
127.0.0.1:8000
Then it builds and serves the frontend via vite preview on 127.0.0.1:4173.
Default test credentials
- Email:
teamadmin@resolutionflow.example.com - Password:
TestPass123!
Override them with:
PLAYWRIGHT_TEST_EMAILPLAYWRIGHT_TEST_PASSWORD
Common local issue
If the suite fails before tests start with a database connection error, PostgreSQL is not running or the Playwright DB env vars do not point at a reachable database.