Skip to content
Skills Library
Programming · Testing

playwright-e2e

/playwright-e2e

Conventions for reliable Playwright end-to-end tests: page objects, per-role auth states, idempotent seeding, mocking third-party calls and verifying payloads, and running suites in CI. Use when writing, fixing or reviewing Playwright tests.

Repository
shipkit ↗
Licence
MIT
Last repository change
29.10.2026

Assessment and security

100/ 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.
Content35 / 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.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Conventions for reliable Playwright end-to-end tests: page objects, per-role auth states, idempotent seeding, mocking third-party calls and verifying payloads, and running suites in CI. Use when writing, fixing or reviewing Playwright tests.

Original author description

Conventions for reliable Playwright end-to-end tests: page objects, per-role auth states, idempotent seeding, mocking third-party calls and verifying payloads, and running suites in CI. Use when writing, fixing or reviewing Playwright tests.

How it works

  1. Structure
  2. Rules that prevent flaky tests
  3. Third-party integrations
  4. CI
Original SKILL.md headings · 43 lines, 270 words
SKILL.md preview
---
name: playwright-e2e
description: Conventions for reliable Playwright end-to-end tests: page objects, per-role auth states, idempotent seeding, mocking third-party calls and verifying payloads, and running suites in CI. Use when writing, fixing or reviewing Playwright tests.
---

# Playwright E2E conventions

## Structure

```text
e2e/
  pages/            # one page object per screen
  fixtures/         # test.extend() fixtures: seeded data, api client
  .auth/            # saved storage states, one per role (gitignored)
  auth.setup.ts     # logs each role in once and saves its state
  flows/*.spec.ts   # tests, named after the user flow
```

## Rules that prevent flaky tests

- **Locators:** `getByRole`, `getByLabel`, `getByTestId`. Never CSS classes, `nth()` or text that changes with copy edits.
- **Waiting:** web-first assertions (`await expect(locator).toBeVisible()`). Never `waitForTimeout`.
- **Auth once:** a setup project logs in each role and saves `storageState`; tests declare the role with `test.use({ storageState: 'e2e/.auth/admin.json' })`.
- **Seed through the API**, not the UI, and make seeds idempotent (upsert by a stable key) so reruns and parallel workers don't collide.
- **Assert outcomes:** the saved record, the new total, the status change. "No error appeared" is not an assertion.

## Third-party integrations

Don't call real ERPs, payment gateways or email providers from E2E tests. Intercept the outbound call and assert on what you would have sent:

```ts
await page.route('**/restlet/**', async (route) => {
  const body = route.request().postDataJSON()
  expect(body.items).toHaveLength(2)
  expect(body.total).toBe(125050) // centavos, never floats
  await route.fulfill({ json: { success: true, id: 'SO-TEST-1' } })
})
```

For server-side calls, point the integration's base URL at a local stub through an environment variable in the test config.

## CI

- Run on every PR against a preview deployment, plus a nightly full run.
- `retries: 2` in CI only, `trace: 'on-first-retry'`, upload the HTML report as an artifact.
- A test that only passes on retry is a bug to fix, not a pass.

Versions

RepositoryScoreLicence
This page · market0v0/shipkit100MIT
5dive-ai/skills100MIT
hmislk/hmis98GPL-3.0
helx0071/skillsmo90MIT
RobinBeraud/claude-qa-skills90MIT

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

Downloads in the last 30 days: 1 · ranking

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

Similar skills

  • 100playwright-testing
    Write and maintain end-to-end tests with Playwright. Use when someone asks to "add e2e tests", "test my web app", "set up Playwright", "write browser tests", "test login flow", "visual regression testing", "test across browsers", or "automate UI testing". Covers test setup, page…
  • 100playwright-testing
    Expert guidance for writing end-to-end tests with Playwright Test framework. Use this skill when writing browser automation tests, creating test suites, working with locators and assertions, mocking network requests, handling authentication, or configuring the Playwright test…
  • 82playwright
    Playwright E2E testing standards — test structure, selectors, fixtures, page objects, CI integration, and MCP runner so tests can be triggered from prompts. Load when writing, reviewing, or running Playwright specs.
  • 95playwright-e2e-automation
    Master enterprise Playwright end-to-end (E2E) automation, Page Object Model (POM) architecture, cross-browser testing, network mocking, visual regression testing, and CI pipeline integrations. Trigger when writing Playwright tests, automating web UI E2E flows, or configuring…
  • 95playwright-core
    Battle-tested Playwright patterns for writing and debugging reliable E2E, API, component, visual, accessibility, and security tests. Use when you need locator strategy, assertions, fixtures, network mocking, auth flows, trace debugging, or framework recipes for React, Next.js,…
  • 100playwright-testing
    Use when writing Playwright E2E tests — browser automation, visual regression testing, Page Objects, fixtures, and reliable test patterns.

Feedback and reports

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