Skip to content

test-e2e

test-e2e is the guidance for end-to-end tests with Playwright β€” the assembled app, in a real browser, exercising the flows that actually matter. It is the top of the testing pyramid: few tests, high value, and the ones most prone to flakiness if you write them wrong.

What it solves

E2E tests are where teams either get real confidence or a flaky suite everyone learns to ignore. The two ways they go wrong are well known: flakiness from racing the UI with hardcoded waits, and unmaintainability from selectors and setup copy-pasted across every spec. A red suite that’s red for no reason is worse than no suite β€” it trains people to re-run until green.

How it works

The skill encodes the patterns that keep an E2E suite trustworthy:

  • Page Object Model β€” selectors and interactions live in one place per screen, so a UI change touches one file, not fifty specs.
  • Reliability β€” auto-waiting locators and explicit waits for network, with a hard β€œno hardcoded waitForTimeout” rule; you wait for a condition, never a guessed duration.
  • Test isolation β€” each test sets up its own state and cleans up, so order never matters and a failure points at one cause.
  • Scope β€” E2E covers the critical user journeys and cross-cutting concerns (auth, payments, the happy path of each flow), plus accessibility checks β€” not what a fast component test already covers.

When to use

Setting up E2E for a project, or adding coverage for a critical flow that only a real browser against a real backend can validate. For a single component or hook in isolation, use test-component instead β€” and don’t re-test in E2E what that layer already covers.