create-e2e-tests
Create e2e tests
Write one behavior-level e2e spec for one Angular component, on whichever of Playwright or Cypress the project uses. This file is the shared process and the rules both platforms obey; platform-specific syntax, setup, and patterns live in the two guides:
- Cypress → references/cypress.md
- Playwright → references/playwright.md
Disclose exactly one guide per run – the one for the chosen platform.
Detect the e2e platform before anything else: look for playwright.config.ts or
cypress.config.ts. On the workshop's teaching branches neither exists yet – the platform
arrives later with the demo solution – while the demo branch ships Playwright (pnpm test:e2e).
Treat a missing platform as a real setup decision, not a side effect: get explicit user
approval before scaffolding one.
Before writing or editing tests, read style-guide/style-guide.md and
style-guide/style-guide.spec.md; if the test touches Angular template behavior or accessibility
state, also read style-guide/style-guide.html.md and style-guide/style-guide.a11y.md.