| .. | ||
| admin.spec.ts | ||
| auth.spec.ts | ||
| avatar-expression-lab.spec.ts | ||
| avatar-expression.spec.ts | ||
| db-persistence.spec.ts | ||
| layout-visual-gate.spec.ts | ||
| learner.spec.ts | ||
| live2d-assets.spec.ts | ||
| public-auth-turn.spec.ts | ||
| readiness.spec.ts | ||
| README.md | ||
| session-layout.spec.ts | ||
| session-mvp.spec.ts | ||
| session-persistence.spec.ts | ||
| session-review-fixture.ts | ||
| session-review.spec.ts | ||
| settings.spec.ts | ||
| support.ts | ||
| teacher.spec.ts | ||
| voice-success.spec.ts | ||
| voice.spec.ts | ||
Playwright E2E
These tests exercise the app through the Vite /api proxy and a running local
FastAPI server. They do not replace /auth/me, /personas, sessions, admin, or
review endpoints with Playwright route fixtures.
Required local services:
# apps/api
python -m uvicorn app.main:app --host 127.0.0.1 --port 8000
# apps/web, started automatically by Playwright unless already running
npm run dev -- --host 127.0.0.1 --port 5173
Useful overrides:
PLAYWRIGHT_PORT=5174 npm run e2e
PLAYWRIGHT_BASE_URL=http://localhost:5173 npm run e2e
VITE_API_BASE=http://127.0.0.1:8000 npm run e2e
Public Google OAuth /turn smoke:
# 1) Verify the public API is not accidentally serving the dev runtime.
$env:E2E_PUBLIC_AUTH="1"
npx playwright test e2e/public-auth-turn.spec.ts --project=chromium-public-auth --grep "production-safe"
# 2) Open a browser, sign in with an allowed Google account, then close codegen.
npx playwright codegen https://vignette.chanpaca.net/login --save-storage=./node_modules/.tmp/public-auth.json
# 3) Reuse that authenticated storage state for the public API turn smoke.
$env:E2E_PUBLIC_AUTH="1"
$env:E2E_PUBLIC_STORAGE_STATE="./node_modules/.tmp/public-auth.json"
npx playwright test e2e/public-auth-turn.spec.ts --project=chromium-public-auth
Notes:
E2E_PUBLIC_AUTH=1targets the public site and does not start the local Vite web server.public-auth.jsoncontains the HttpOnly API session cookie exported by Playwright. Treat it as sensitive and keep it undernode_modules/.tmp.- The API session TTL is currently 8 hours, so recapture storage state when the smoke begins returning
401.
Install browser binaries once with:
npx playwright install chromium