Files
Michael Chihlas 37c4e0c99e
Some checks failed
Mirror to GitHub / mirror (push) Successful in 15s
CI / frontend (pull_request) Failing after 2m37s
CI / e2e (pull_request) Has been skipped
CI / backend (pull_request) Has been cancelled
fix(e2e): update 5 selectors that drifted with FlowPilot/PSA UI changes
Mechanical drift between the e2e selectors and the current UI surfaced
on the first CI run after PR #149 unblocked the artifact upload step.
Five tests, three categories of drift:

1. **Page heading renames** (navigation.spec.ts)
   - `Sessions` → `Session History` on /sessions
   - `Account Settings` → `Account Management` on /account

2. **Route rename** (command-palette.spec.ts:74)
   - The "Troubleshoot with FlowPilot" command palette option now lands
     on /pilot (Phase 1 of the FlowPilot migration renamed /assistant).
     /assistant still 301-redirects, so the assertion accepts either.

3. **Feature moved to /sessions** (history.spec.ts, resume.spec.ts)
   - Default tab on /sessions is "AI Sessions"; flow-session filtering
     and the Resume button moved behind the "Flow Sessions" tab. Both
     tests now click that tab before asserting.
   - resume.spec.ts no longer starts at /trees (Resume buttons aren't
     rendered there anymore — the flow lives on /sessions). Destination
     URL (/trees/:id/navigate) is unchanged.

No product-code changes — these are pure test updates against the
shipped UI. Run the suite locally with
`cd frontend && npm run test:e2e` once a fresh build is available.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 15:21:25 -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.