playwright-e2e-tests

Installation
SKILL.md

Playwright E2E Tests

Overview

End-to-end tests prove that real user journeys work in a real browser. Write few of them, make each one reliable, and locate elements the way users find them.

Method

  1. Setup (if missing): npm init playwright@latest. Configure baseURL, webServer to start the app, trace: "on-first-retry", and the browsers you support in playwright.config.ts.
  2. Pick journeys by risk: sign up / log in, the core purchase or create flow, payments, permissions. One spec file per journey.
  3. Set up state through the API or storage state, not through the UI, except in the test that covers that UI (log in once in a setup project and reuse storageState).
  4. Write steps with user-facing locators and web-first assertions (table below).
  5. Run npx playwright test, then npx playwright test --repeat-each=5 on new tests to catch flakiness. Use npx playwright show-trace on failures.

Locators and assertions

Installs
2
GitHub Stars
4
First Seen
Oct 18, 2026