| name | new-e2e |
| description | Scaffold a new E2E Playwright test following project patterns |
| paths | e2e/tests/** |
| allowed-tools | Read Write Bash Edit Glob Grep |
New E2E Test Scaffold
Reference: e2e/tests/02-auth-simple.spec.ts
- Use numbered prefix matching feature group (00-08)
- Default auth:
.auth/state.json (admin). Unauthenticated: test.use({ storageState: undefined })
- Always:
await page.waitForLoadState('domcontentloaded') before asserting
- Selectors:
getByRole() > getByText() > CSS selectors
- API fixtures from
e2e/helpers/api-fixtures.ts (createOrganization, createFolder, createUseCase)
- Email testing:
waitForVerificationCode() / waitForMagicLinkToken() from e2e/helpers/maildev.ts
- Run:
make test-e2e E2E_SPEC=tests/<file>.spec.ts WORKERS=1 RETRIES=0 ENV=e2e-$BRANCH