- Added Playwright for end-to-end testing in the `apps/web` module, including a new `login.spec.ts` for testing login functionality. - Updated package.json to include Playwright dependencies and new test commands for E2E testing. - Enhanced .gitignore to exclude Playwright test results and reports. - Modified existing documentation to reflect the integration of Playwright and updated testing guidelines. - Refactored test commands to streamline the testing process, including a dedicated command for E2E tests. These changes improve the testing framework by providing robust E2E testing capabilities, enhancing the reliability and quality of the application.
1.3 KiB
1.3 KiB
description
| description |
|---|
| Generate and run frontend journey tests with Playwright for apps/web, plus Vitest/Testing Library for packages. Covers login and FULL_PAGE index/form/detail. |
E2E / Journey Command
This command invokes the e2e-runner agent to cover critical UI journeys.
What This Command Does
- Identify journeys — login, FULL_PAGE index / form / detail
- Write or update Playwright specs in
apps/web/e2e/(copye2e/login.spec.ts) - Run
pnpm test:e2e:web(orpnpm --filter web test:e2e) - Report pass/fail
When to Use
Use /e2e when:
- Testing login or a FULL_PAGE module flow
- Verifying index → form → detail navigation
- Checking empty / error states after a UI change
- Preparing a PR that touches routing or providers
How It Works
The e2e-runner agent will:
- Copy the login sample in
apps/web/e2e/login.spec.tsand UI patterns fromexample/full-page - Mock the backend with
mockBackend(e2e/fixtures/mock-api.ts) — not a live API - Run
pnpm test:e2e:web - Summarize failures
Example
User: /e2e Test the example full-page index and detail flow
Canonical UI sample: example/full-page. Canonical E2E sample: apps/web/e2e/login.spec.ts.
Related
Agent: .cursor/agents/e2e-runner.md