Files
resolutionflow/frontend/e2e
Michael Chihlas 8a9f03adf5
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s
CI / frontend (pull_request) Successful in 6m53s
CI / e2e (pull_request) Successful in 10m19s
CI / backend (pull_request) Successful in 11m47s
test(l1): e2e intake test must use an out-of-scope problem for the ad-hoc path
Phase 2A routes in-category problems (keyword fallback matches 'outlook' →
email_outlook_client) to an AI-build walk, so the old Outlook fixture never
reached the ad-hoc badge. Use a custom-LOB problem and click through the
out-of-scope 'Walk it ad-hoc' fallback.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 19:28:45 -04:00
..

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.ts logs 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, and shared-session.spec.ts explicitly clear storage so those tests stay truly unauthenticated

Local prerequisites

  1. PostgreSQL must be running
  2. backend/venv should exist with backend dependencies installed
  3. frontend dependencies must be installed
  4. 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:

  1. run Alembic migrations
  2. seed test users
  3. 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_EMAIL
  • PLAYWRIGHT_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.