Skip to content
Skills Library
Programming · Testing

e2e-browser-test

/e2e-browser-test

Use when a ticket asks for end-to-end or browser coverage of a user journey — sign-up, checkout, a form submission, a dashboard flow — driven through the real UI with Playwright, Cypress, or the repo's browser harness. Invoke for "add an e2e test", "cover the flow in the browser", or when an acceptance criterion can only be shown by clicking through the app.

Repository
gaffer ↗
Licence
Apache-2.0
Last repository change
29.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 29.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when a ticket asks for end-to-end or browser coverage of a user journey — sign-up, checkout, a form submission, a dashboard flow — driven through the real UI with Playwright, Cypress, or the repo's browser harness. Invoke for "add an e2e test", "cover the flow in the browser", or when an acceptance criterion can only be shown by clicking through the app.

Triggers from the description

s browser harness. Invoke forcover the flow in the browser
Original author description

Use when a ticket asks for end-to-end or browser coverage of a user journey — sign-up, checkout, a form submission, a dashboard flow — driven through the real UI with Playwright, Cypress, or the repo's browser harness. Invoke for "add an e2e test", "cover the flow in the browser", or when an acceptance criterion can only be shown by clicking through the app.

How it works

  1. Procedure
  2. Done when
  3. Rules
  4. Capture lore
Original SKILL.md headings · 76 lines, 761 words
SKILL.md preview
---
name: e2e-browser-test
description: Use when a ticket asks for end-to-end or browser coverage of a user journey — sign-up, checkout, a form submission, a dashboard flow — driven through the real UI with Playwright, Cypress, or the repo's browser harness. Invoke for "add an e2e test", "cover the flow in the browser", or when an acceptance criterion can only be shown by clicking through the app.
stack: [react, web, next, vue, svelte, angular, node]
area: testing
---

# Write an end-to-end browser test

An end-to-end test proves a user journey works through the real UI against a real (or
faithfully stubbed) backend. It is the slowest and most flake-prone test in the suite —
Google's data shows flakiness grows with test size and with WebDriver-style tooling — so
it earns its place by covering a journey no cheaper test can, and by being deterministic:
no sleeps, no order dependence, no data another test created.

## Procedure

1. **Find the harness.** Locate the repo's browser setup (`playwright.config.*`,
   `cypress/`, a `test:e2e` script). Use it exactly — its browsers, base URL, `webServer`
   block and CI command. Do not add a second framework. If none exists and the ticket does
   not ask for one, raise `request_decision` with the smallest viable setup. (Independent
   tester: never raise `request_decision`; follow `black-box-test` — scaffold a disposable
   rig in a test directory only with what the repo already has installed, run the spec
   once, and record `manual_note` rows.)
2. **Push coverage down first.** For each acceptance criterion ask whether a component or
   integration test proves it (the `frontend-testing` and `add-integration-test` skills).
   Only journeys that need the real browser, routing, cookies or the full stack belong
   here.
3. **Write the journey in plain words:** start state → user actions → what the user must
   observe. Map each AC to one observable outcome on screen or one persisted result. Name
   the test after the journey and cite the AC.
4. **Own your data.** Create what the test needs through an API call, seed script or
   factory inside the test (or a fixture), with unique values, and clean up. Never depend
   on another test's leftovers or a shared account; each test gets a fresh browser context.
   Save authenticated state once (`storageState`) rather than logging in through the UI in
   every test.
5. **Locate like a user.** `getByRole` with the accessible name, then `getByLabel`,
   `getByText`; chain and `filter({ hasText })` to scope. `getByTestId` only when no
   accessible handle exists, with a comment why. No XPath or styling-class CSS selectors.
6. **Use web-first assertions; never wait for time.** `await expect(locator).toBeVisible()`,
   `toHaveText`, `toHaveURL`, `page.waitForResponse`. Never `waitForTimeout`/`cy.wait(ms)`,
   and never `expect(await locator.isVisible()).toBe(true)` — it does not retry. Every
   Playwright call is awaited (`@typescript-eslint/no-floating-promises` catches misses).
7. **Assert the outcome, not the DOM.** What the user sees, and what the system persisted:
   reload the page or query the API to prove a save survived, check the stub outbox for the
   email. A toast saying "Saved" is not proof the data was saved.
8. **Stub only what you do not control.** Third-party services go through
   `page.route(...)`/`cy.intercept` with recorded responses; your own backend stays real.
9. **When an AC concerns concurrent users or failure,** drive it for real: two browser
   contexts editing the same record (assert the documented conflict behaviour, no silent
   overwrite); the backend returning an error or going offline via `page.route` →
   `abort()`; the user sees the documented error and can retry.
10. **Keep failures diagnosable.** Traces on first retry (`trace: 'on-first-retry'`),
    screenshots on failure. Retries may be on in CI to _collect_ traces, but a test that
    passes only on retry is flaky and not done.
11. **Run it until stable:** the spec three times in a row headless, e.g.
    `npx --no -- playwright test <spec> --repeat-each=3`, then the repo's CI command. Record the
    command and result with the `record-evidence` skill (`test_output`) per AC.

## Done when

- Each AC that needs a browser has a journey test asserting its observable outcome.
- The spec passes three consecutive headless runs without retries, and in the CI command.
- No fixed sleeps, CSS-structure selectors, shared accounts or order dependence remain.

## Rules

- One journey per test; keep the count small and the coverage wide.
- The backend under test is real or a faithful stub declared in the test; never mock the
  browser side to make the assertion pass.
- Match the repo's harness, browser pins and CI command exactly.
- Work on the delivery branch the runner prepared (the `create-branch` skill verifies),
  never a protected branch.

## Capture lore

This skill is one of the places durable, reusable knowledge naturally surfaces:
**While standing the app up for a browser journey you learn how it is really started, which env vars and ports it needs, and which selectors the design system exposes.** That kind of fact is *lore*. Capture it via the **lore-capture
protocol in your brief** (`CLAUDE.factory.md`, step 11 "Memory contribution"):
call the Memory MCP `suggest_lore` once at the close of your work — reusable
conventions, gotchas, decisions, and boundaries only, never per-ticket trivia.

Versions

The database has no other skills named e2e-browser-test.

Database snapshot: 13.11.2026 · package version cd9438057804 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90e2e-scenario-author
    Converts an acceptance criterion or user story into one maintainable Playwright or Cypress end-to-end test that reads like the journey it covers. Use when turning a Given/When/Then acceptance criterion or user story into a browser test, when asked to "write an E2E test for this…
  • 86e2e-test
    Writes end-to-end tests for a user journey through the running app, Playwright preferred. Use when user requests e2e, end-to-end, Playwright, or Cypress tests.
  • 100e2e-playwright-testing
    End-to-end testing with Playwright for web applications. Use when writing E2E tests, browser automation, form submission testing, or user flow testing. Triggers on "playwright", "e2e test", "browser test", "end-to-end", "form flow testing", or test files in tests/e2e/.
  • 100e2e-flow-tester
    Finds a web app's critical user flows (sign up, log in, checkout, password reset, creating and editing the core object, search, settings) and writes Playwright end-to-end tests that drive a real browser through them, using the project's existing Playwright or Cypress setup when…
  • 100e2e
    End-to-end testing skill. Activates for browser-based E2E tests, cross-browser testing, flaky test fixes, or page object models. Supports Playwright, Cypress, Selenium. Triggers on: /godmode:e2e, "E2E test", "browser test", "Playwright test", "Cypress test".
  • 100e2e-testing
    Author, maintain, run, and debug resilient end-to-end browser tests (Playwright, Cypress) for critical user journeys. Use when writing automated E2E tests, codifying acceptance criteria into browser suites, or diagnosing flaky browser tests.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.