@@ -59,7 +59,7 @@ pnpm test:e2e:report
5959
6060``` bash
6161# Run a specific test file
62- pnpm playwright test e2e/components/button .spec.ts
62+ pnpm playwright test e2e/integration/contact-form-flow .spec.ts
6363
6464# Run tests matching a pattern
6565pnpm playwright test --grep " accessibility"
@@ -91,7 +91,6 @@ Tests are organized in the `/e2e` directory:
9191```
9292e2e/
9393├── fixtures/ # Test helpers and utilities
94- ├── components/ # Component-specific tests
9594├── accessibility/ # Accessibility tests
9695└── integration/ # Integration and flow tests
9796```
@@ -157,14 +156,10 @@ test('should handle API responses', async ({ page }) => {
157156
158157### Component Tests
159158
160- Component tests focus on individual UI components:
161-
162- - ** Button tests** - Click, keyboard navigation, states
163- - ** Modal tests** - Open/close, focus trap, backdrop
164- - ** Form tests** - Validation, submission, error handling
165- - ** Menu tests** - Navigation, keyboard interaction
166- - ** Tooltip tests** - Show/hide, positioning
167- - ** Toast tests** - Notifications, auto-dismiss
159+ Component contracts belong in ` src/lib/ui/**/*.test.ts ` and
160+ ` src/lib/ui/**/*.a11y.test.ts ` , where each test mounts the production component
161+ directly. E2E tests stay focused on complete browser flows with deterministic
162+ setup.
168163
169164### Integration Tests
170165
@@ -292,7 +287,7 @@ This enables:
292287pnpm test:e2e:debug
293288
294289# Debug a specific test
295- pnpm playwright test --debug e2e/components/button .spec.ts
290+ pnpm playwright test --debug e2e/integration/contact-form-flow .spec.ts
296291```
297292
298293### Headed Mode
0 commit comments