@factory/e2e
Canonical Playwright E2E suite for AI Software Factory — the full product flow: auth, workspace, pages, editor, databases, search, files, comments, sharing, automation, AI, and performance-sensitive paths.
Layout
| Path | What it is |
|---|---|
playwright.config.ts |
Shared config — testDir: ./specs, two projects (chromium-desktop 1440×900, chromium-mobile 375×812 @dpr3), no webServer (the dev stack must already be running) |
global-setup.ts |
Ensures the demo user exists (login or fresh register) and writes .auth/user.json |
fixtures.ts |
Extended Playwright test — api (typed request context), user / authPage (demo auth state), secondUser, freshWorkspace |
specs/ |
One spec per product surface (auth.spec.ts, editor.spec.ts, …) |
fixtures/, mocks/ |
Shared fixtures and mock data |
final-flow.spec.ts |
The Phase 15 13-step sequential final E2E (TASK-0135) — one describe, shared module-level state, helpers in helpers/final-flow.ts; run via the dedicated playwright.final-flow.config.ts |
playwright.final-flow.config.ts |
Minimal config that discovers final-flow.spec.ts (which sits one level above testDir) with the same projects + globalSetup |
Running
The dev stack must be up first (docker infra + api/worker/web/realtime,
see README.md Quick Start). Then, from this directory:
pnpm test # playwright test (all specs, both projects)
pnpm --dir tests/e2e test final-flow # the 13-step final flow only
pnpm --dir tests/e2e test --headed # headed
pnpm --dir tests/e2e typecheck # tsc --noEmit
pnpm --dir tests/e2e report # show-report after a run
Environment: E2E_BASE_URL (default http://localhost:3000), E2E_API_URL
(default http://localhost:4000), E2E_WORKER_URL (default
http://127.0.0.1:4003), E2E_SCIM_URL (default = E2E_API_URL). SCIM
(/scim/v2/*) is a machine/IdP surface, not a browser one — the
Caddyfile routes it on the API host only, so on the notion.filps.com
browser origin it 307s to /login. When running against the domain
topology, pass the machine host: E2E_SCIM_URL=https://aiops.filps.com.
Staging-only steps in final-flow.spec.ts
(no mailcatcher / no MinIO locally) skip loudly — never a silent pass.
Origin matters: the web build bakes in
NEXT_PUBLIC_API_URL=https://notion.filps.com/api/v1, so the browser must
run against that origin — the login cookie is localhost-scoped and is
never sent to the filps.com API, and a browser pointed at
http://localhost:3000 hangs on "Loading workspace…" (its API calls go
cross-origin without the cookie). For the editor-facing suites use:
E2E_BASE_URL=https://notion.filps.com E2E_API_URL=https://notion.filps.com \
pnpm --dir tests/e2e test qa-paste-toggle
(E2E_API_URL only affects the Bearer api fixture for server-side
fixture setup — both envs on the public origin keeps page + API on one
host. Known pre-existing: editor.spec.ts still assumes a web /api
proxy and a /w/{ws}/p/{id} route that don't exist, so it fails on any
live stack; qa-paste-toggle.spec.ts is the supported editor regression
suite.)