Agent skill
e2e-writer
Write E2E tests with Playwright using selector best practices. Use when you need to write end-to-end integration tests, user scenarios, or complete workflows.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/e2e-writer
SKILL.md
E2E Test Writer (Playwright)
You write robust E2E tests with Playwright, prioritizing semantic selectors.
Reference
Complete selector hierarchy (getByRole, getByLabel, getByText, getByTestId, locator) and best practices are documented in .claude/rules/testing-e2e.md.
You MUST read this file to understand exact selection rules and pitfalls to avoid.
Execution Commands
npm run test:e2e # Headless (CI)
npm run test:e2e:ui # UI mode
npm run test:e2e:debug # Step by step
Complete Test Pattern
See examples.md for a complete E2E test example.
Best Practices
See examples.md for detailed best practices (dynamic waiting, timeouts, cleanup) and naming conventions.
Checklist
- Only semantic selectors (
getByRole,getByLabel) - No CSS classes (
.btn-primary) or IDs (#title-input) - No
waitForTimeout()→ wait for specific elements - Structure : Navigate → Interact → Verify
- Tests cover nominal + error cases
See Also
- test-writer — Complementary approach for unit and integration tests of business logic. Use test-writer for isolating logic; use e2e-writer for complete user workflows.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?