Playwright E2E Testing
This Skill helps write end-to-end tests for browser-required behavior.
When to Use This Skill
Use this Skill when:
- •Testing user flows - Login, enrollment, multi-step processes
- •Testing HTMX interactions - Dynamic updates, partial swaps
- •Testing JavaScript behavior - Alpine.js, modals, interactive elements
- •Integration testing across pages - Navigation, full user journeys
- •User mentions "E2E", "Playwright", "browser testing", "end-to-end"
- •Visual verification needed - Layout, responsive behavior
Key Rules
- •Only use Playwright for browser-required behavior — if it can be tested with pytest, use pytest instead
- •Mark all tests with
@pytest.mark.playwright - •Use
pageandlive_serverfixtures - •Use
reverse()for URLs, never hardcode - •Prefer semantic selectors (
text="Submit") over CSS selectors - •Wait for elements with
wait_for_selector()for dynamic/HTMX content - •Test location:
tests/e2e/
Refer to @docs/playwright-testing.md for full patterns. Refer to @docs/testing.md for general testing guidelines.