e2e-testinglisted
Install: claude install-skill JasonxzWen/harness-hub
# E2E Testing Patterns
Reuse the project's existing E2E runner and conventions. New projects default to Playwright. One test should prove one user outcome through the same controls and feedback a user sees.
## Behavior Contract
- Wait for the required heading, control, URL, status, or result; network silence and elapsed time are not readiness signals.
- Prefer role, label, and visible text locators. Use a test ID only when no stable user-facing locator exists.
- Keep setup deterministic and local. Reuse project fixtures, auth helpers, and data factories before adding another layer.
- Assert the outcome in the test, including loading, empty, error, permission, recovery, and destructive states when they matter.
```typescript
import { expect, test } from '@playwright/test'
test('filters items', async ({ page }) => {
await page.goto('/items')
await expect(page.getByRole('heading', { name: 'Items' })).toBeVisible()
await page.getByLabel('Search items').fill('alpha')
await expect(page.getByRole('article').first()).toContainText(/alpha/i)
})
```
## Extraction Boundary
Use a page object only when several tests repeat the same stable navigation or interaction. Keep outcome assertions in the test; avoid generic base pages, wrappers for single locators, and a second fixture system.
Organize tests by user capability using the repository's current layout. Do not reorganize an established suite merely to match a template.
## Coverage And Configuration
Use a risk-based bro