22 lines
1.2 KiB
Markdown
22 lines
1.2 KiB
Markdown
---
|
|
apply: always
|
|
---
|
|
|
|
<!-- AUTOGENERATED: Run `node scripts/sync-ai-workflow.mjs --write`. -->
|
|
|
|
# Frontend Testing Rules
|
|
|
|
These rules apply to Vue changes, browser flows, and frontend test updates.
|
|
|
|
1. Add or update tests for every new feature, bug fix, API integration change, or auth, booking, POS, or i18n workflow change.
|
|
2. Browser validation runs through Playwright. Legacy browser-driver tooling is outside the supported workflow.
|
|
3. Use `npm run test:unit` for Vitest coverage of isolated logic and component behavior.
|
|
4. Use `npm run test:e2e:smoke` for the narrow Playwright browser pass on changed user flows.
|
|
5. Use `npm run test:e2e:ci` when a change affects shared navigation, authentication, release-critical flows, or multiple browser projects.
|
|
6. Use `npx playwright test --debug` for interactive debugging and trace capture.
|
|
7. Prefer stable selectors, explicit fixtures, and assertions about user-visible behavior.
|
|
8. Avoid manual sleeps. Let Playwright waiting and expectations drive synchronization.
|
|
9. If a bug fix needs a browser regression test, prove the failure first and then keep the test with the fix.
|
|
|
|
Canonical workflow reference: `.ai-workflow/workflow.md`.
|