From developer-essentials
Guides building reliable E2E test suites with Playwright and Cypress. Use for implementing tests, debugging flaky tests, or establishing testing standards.
How this skill is triggered — by the user, by Claude, or both
Slash command
/developer-essentials:e2e-testing-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build reliable, fast, and maintainable end-to-end test suites that provide confidence to ship code quickly and catch regressions before users do.
Build reliable, fast, and maintainable end-to-end test suites that provide confidence to ship code quickly and catch regressions before users do.
What to Test with E2E:
What NOT to Test with E2E:
The Testing Pyramid:
/\
/E2E\ ← Few, focused on critical paths
/─────\
/Integr\ ← More, test component interactions
/────────\
/Unit Tests\ ← Many, fast, isolated
/────────────\
Best Practices:
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
data-testid or data-cy for stable selectors// ❌ Bad selectors
cy.get(".btn.btn-primary.submit-button").click();
cy.get("div > form > div:nth-child(2) > input").type("text");
// ✅ Good selectors
cy.getByRole("button", { name: "Submit" }).click();
cy.getByLabel("Email address").type("[email protected]");
cy.get('[data-testid="email-input"]').type("[email protected]");
// Playwright debugging
// 1. Run in headed mode
npx playwright test --headed
// 2. Run in debug mode
npx playwright test --debug
// 3. Use trace viewer
await page.screenshot({ path: 'screenshot.png' });
await page.video()?.saveAs('video.webm');
// 4. Add test.step for better reporting
test('checkout flow', async ({ page }) => {
await test.step('Add item to cart', async () => {
await page.goto('/products');
await page.getByRole('button', { name: 'Add to Cart' }).click();
});
await test.step('Proceed to checkout', async () => {
await page.goto('/cart');
await page.getByRole('button', { name: 'Checkout' }).click();
});
});
// 5. Inspect page state
await page.pause(); // Pauses execution, opens inspector
npx claudepluginhub wshobson/agents --plugin developer-essentialsProvides patterns for building reliable E2E test suites with Playwright and Cypress, including page object model, configuration, and debugging flaky tests.
Provides E2E testing patterns and Playwright examples for reliable suites, flaky test debugging, CI/CD setup, and critical user workflows.
Provides E2E testing patterns and Playwright examples for reliable suites, flaky test debugging, CI/CD setup, and critical user workflows.