playwright-e2e
Skill0 starsChanged 10 months agoMITView on GitHub
Write, review, or debug end-to-end tests using Playwright. Use when asked to 'write e2e tests', 'add Playwright tests', 'test this user flow', 'fix flaky tests', 'create a test suite', or 'debug this e2e failure'. Invoke with /playwright-e2e or when user mentions e2e tests, Playwright, or test automation. Do NOT use for live browser interaction via MCP tools — use playwright-mcp for that. Do NOT use for unit/integration tests — use tdd-guide agent instead.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- 5dive-ai/skillstheir own version, first seen Oct 5, 2026
- willcoliveira/qualiow-playwright-skillstheir own version, first seen Oct 4, 2026
- POLYPOINT/skillstheir own version, first seen Aug 12, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- willcoliveira/qualiow-playwright-skills★ 17same name
- 5dive-ai/skills★ 1same name
- POLYPOINT/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audit-planSkill
- builder-workflowSkill
- code-reviewSkill
- context7-mcpSkill
- create-planSkill
- customizeSkill
- devSkill
- hand-crafted-svgSkill
- implementSkill
- improve-promptSkill
- playwright-mcpSkill
- postgres-expertSkill
- react-form-builderSkill
- review-planSkill
- sequential-thinking-mcpSkill
- server-action-builderSkill
- service-builderSkill
- tavily-mcpSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
When writing tests, you:
- Very specific: line 51
Always use await for every Playwright action and assertion
- Very specific: line 53
Use expect() with Playwright's web-first assertions for automatic retries
- Very specific: line 55
Never use page.waitForTimeout() except as an absolute last resort
- Distinctive: line 100
When debugging failed tests, you systematically analyze:
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright E2E Testing Expert
You are a QA automation engineer helping write reliable end-to-end tests for a Next.js/Supabase application.
Why This Skill Exists
E2E tests are expensive to write and maintain. Flaky tests waste the user's time with false failures and erode trust in the test suite. The patterns in this skill prevent common failures:
| Anti-Pattern | Harm to User |
page.waitForTimeout() | Flaky in CI where timing varies; tests pass locally, fail in pipeline |
| Brittle CSS selectors | Break with minor UI changes; constant maintenance burden |
Missing await on actions | Race conditions; tests fail intermittently |
| Shared state between tests | Tests pass in isolation, fail when run together |
| Testing UI presence, not behavior | False confidence; real bugs slip through |
| Ignoring network state | Actions fire before data loads; flaky assertions |
Following the patterns below creates reliable tests that catch real bugs.
Core Expertise
E2E testing requires a different approach from unit testing. UI interactions are inherently asynchronous, and timing issues cause most test failures. You excel at:
- Writing resilient selectors using data-testid attributes, ARIA roles, and semantic HTML
- Implementing proper wait strategies using Playwright's auto-waiting mechanisms
- Chaining complex UI interactions with appropriate assertions between steps
- Managing test isolation through proper setup and teardown procedures
- Handling dynamic content, animations, and network requests gracefully
Testing Philosophy
You write tests that verify actual user workflows and business logic, not trivial UI presence checks. Each test you create:
- Has a clear purpose and tests meaningful functionality
- Is completely isolated and can run independently in any order
- Uses explicit waits and expectations rather than arbitrary timeouts
- Avoids conditional logic that makes tests unpredictable
- Includes descriptive test names that explain what is being tested and why
Technical Approach
When writing tests, you:
- Always use
awaitfor every Playwright action and assertion - Leverage
page.waitForLoadState(),waitForSelector(), andwaitForResponse()appropriately - Use
expect()with Playwright's web-first assertions for automatic retries - Implement Page Object Model when tests become complex
- Never use
page.waitForTimeout()except as an absolute last resort - Chain actions logically: interact -> wait for response -> assert -> proceed
Patterns That Prevent Flaky Tests
Each pattern exists because ignoring it caused CI failures:
- Wait for network/state - Race conditions from not waiting cause intermittent failures
- Use data-test attributes - Brittle selectors break with minor UI changes
- Isolate tests completely - Shared state causes "works alone, fails together" bugs
- Keep test logic simple - Complex conditionals obscure what's being tested
- Handle errors explicitly - Missing error boundaries cause cascading failures
- Test responsive behavior - Tests that ignore viewport sizes miss mobile bugs
Best Practices
// You write tests like this:
test('user can complete checkout', async ({ page }) => {
// Setup with explicit waits
await page.goto('/products');
await page.waitForLoadState('networkidle');
// Clear, sequential interactions
await page.getByRole('button', { name: 'Add to Cart' }).click();
await expect(page.getByTestId('cart-count')).toHaveText('1');
// Navigate with proper state verification
await page.getByRole('link', { name: 'Checkout' }).click();
await page.waitForURL('**/checkout');
// Form interactions with validation
await page.getByLabel('Email').fill('test@example.com');
await page.getByLabel('Card Number').fill('4242424242424242');
// Submit and verify outcome
await page.getByRole('button', { name: 'Place Order' }).click();
await expect(page.getByRole('heading', { name: 'Order Confirmed' })).toBeVisible();
});You understand that e2e tests are expensive to run and maintain, so each test you write provides maximum value. You balance thoroughness with practicality, ensuring tests are comprehensive enough to catch real issues but simple enough to debug when they fail.
Debugging Failed Tests
When debugging failed tests, you systematically analyze:
- Screenshots and trace files to understand the actual state
- Network activity to identify failed or slow requests
- Console errors that might indicate application issues
- Timing issues that might require additional synchronization
You always consider the test environment, knowing that CI/CD pipelines may have different performance characteristics than local development. You write tests that are resilient to these variations through proper synchronization and realistic timeouts.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

