.cursor/skills/e2e-testing/SKILL.md
E2E testing patterns, verification procedures, and CI readiness checklists using Playwright. Use for writing, debugging, or reviewing end-to-end tests, fixing flaky tests, creating Page Objects, mocking external APIs.
npx skillsauth add imvanzen/strava-kudosik e2e-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
export class FeaturePage {
constructor(readonly page: Page) {}
get submitBtn() {
return this.page.getByRole('button', { name: 'Submit' });
}
async navigate() { await this.page.goto('/feature'); }
}
test('should [behavior] when [condition]', async ({ page }) => {
const id = `test-${Date.now()}-${test.info().parallelIndex}`;
// Arrange → Act → Assert
});
await page.route('**/api/external/**', route => route.fulfill({ status: 200, body: '{}' }));
RUN → FAIL? → DEBUG (browser_snapshot) → FIX → REPEAT
| Rule | Limit |
|------|-------|
| Max per test | 5 iterations → test.fixme() |
| Max per suite | 15 iterations → stop |
| Flaky detection | 3 pass/fail mix → investigate |
| Stability | 3+ consecutive passes required |
| App bug | Mark test.fixme('BUG: desc') |
| Error | Action |
|-------|--------|
| Timeout | Increase once → check selector → check if element renders |
| Element not found | Alternative locator → check DOM → verify page loaded |
| Network | Retry → consider mock → verify backend |
| Flaky | Explicit waits → check race conditions → run 5x |
| App bug | Mark test.fixme('BUG: desc') - test is skipped; CI usually still passes unless skipped tests fail the build |
npx playwright test --headed=falseprocess.env.BASE_URLAlways: accessible locators, unique test data, 3+ passes, mock external APIs
Never: waitForTimeout(), CSS selectors, test interdependencies, hardcoded creds
development
Discover and establish technical context before implementing any feature. Prioritize project instructions, existing codebase patterns, and external documentation in that order. Use for any task requiring understanding of project conventions, coding standards, architecture patterns, and established practices before writing code.
development
Analyse task description, performs gap analysis, expand the context for the task, analyse the current state of the system in the context of the task, helps build PRD, creates a context for the task, gathers information about the task from different sources.
testing
Resolves dependency audit (security) issues and updates outdated packages with prioritization by breaking-change risk and security/value. Prefer security fixes and non-breaking updates; defer or flag major upgrades. Use when the user asks to fix audit, update packages, resolve vulnerabilities, or run maintenance.
testing
Implementation gap analysis. Verify what has to be implemented. Verify what was implemented. Compare plan to current state.