# Auto-Generated E2E Tests This directory contains Playwright specs **generated by the `e2e-automation/` pipeline**. Do not hand-edit files here -- they will be overwritten on the next pipeline run. ## Naming Convention ``` auto-generated/ / TC--NNN.spec.ts pages/ / .page.ts ``` Example: `cli-auth/TC-CLIAUTH-001.spec.ts` tests the browser-side CLI OAuth token flow. Its Page Object lives at `pages/cli-auth/cli-auth.page.ts`. ## What belongs here vs elsewhere - **Here**: specs whose primary subject is a **browser page** (DOM interactions, navigation, URL assertions). The pipeline generates these from PRD or code-archaeology input. - **`cli/test/e2e/`**: specs that spawn the CLI as a **subprocess** and assert against stdout/stderr/exitCode with a real backend. See the decision tree in `cli/test/e2e/README.md`. - **`web/e2e/cross-stack-*.spec.ts`**: specs that combine CLI subprocess calls with Playwright browser assertions (both sides in one test). - **`web/e2e/*.spec.ts`** (top-level, hand-written): business-critical paths maintained by hand. Auto-generated specs supplement coverage, they don't replace hand-written ones. ## Regenerating ```bash cd e2e-automation bun run pipeline -- --requirement # Output lands here automatically (configured in config/default.yaml) ``` See `e2e-automation/README.md` for full pipeline docs and output conventions. ## Running ```bash cd web pnpm exec playwright test e2e/auto-generated/ ```