Back to Skills

e2e-testing

End-to-end testing patterns with Playwright for full-stack Python/React applications. Use when writing E2E tests for complete user workflows (login, CRUD, navigation), critical path regression tests, or cross-browser validation. Covers test structure, page object model, selector strategy (data-testid > role > label), wait strategies, auth state reuse, test data management, and CI integration. Does NOT cover unit tests or component tests (use pytest-patterns or react-testing-patterns).

8stars1forksUpdated 8/5/2026

Security Assessment

Safe(96/100)
Security Score96/100

About e2e-testing

The e2e-testing skill provides end-to-end testing patterns using Playwright for full-stack Python and React applications. It solves the problem of validating complete user workflows — login, CRUD operations, multi-page navigation, authentication flows, and file upload/download — across the whole stack and multiple browsers, in a way that stays maintainable and resists flakiness. It explicitly scopes itself away from unit and component tests, deferring those to sibling pytest and React testing skills.

The skill prescribes a concrete test structure (fixtures, page objects, tests, utilities) and a set of opinionated conventions. It enforces the Page Object Model, where every page gets a class encapsulating locators and actions while tests hold the assertions. It defines a strict selector priority — data-testid first, then role, label, placeholder, and text — and explicitly forbids brittle CSS, XPath, and DOM-structure selectors. It bans hardcoded waits in favor of explicit wait conditions on elements, navigation, API responses, and network state. It also covers authentication-state reuse, test-data management with cleanup, cross-browser validation across Chromium, Firefox, and WebKit, and CI integration, and ships template files for page objects, tests, and Playwright configuration plus a shell script for running E2E tests with a report.

The target users are full-stack engineers and QA automation developers writing critical-path regression tests, smoke tests for deployment verification, and cross-browser checks for Python/React apps. It is MIT-licensed and declares compatibility with Playwright 1.40+ and Node.js 20+. The skill's allowed tools are scoped to file editing and running npx/npm, and its behavior is limited to safe test authoring and execution, making it a benign developer-productivity resource.

FAQ

What does this skill cover and not cover?

It covers end-to-end tests for complete user workflows, critical-path regression, cross-browser validation, auth flows, and smoke tests. It does not cover React component unit tests, Python backend unit/integration tests, TDD workflow enforcement, or browserless API contract testing — those defer to react-testing-patterns, pytest-patterns, and tdd-workflow.

What selector strategy does it recommend?

A strict priority order: data-testid first, then ARIA role, label, placeholder, and finally text. It explicitly forbids CSS selectors, XPath, and DOM-structure selectors because they are brittle and break on styling or layout changes.

How does it prevent flaky tests?

It bans hardcoded waits like waitForTimeout or sleep and requires explicit wait conditions — waiting for a specific element, navigation URL, a matching API response, network idle, or element state — plus the Page Object Model so tests never touch selectors directly.

What are the compatibility requirements?

The skill declares compatibility with Playwright 1.40+ and Node.js 20+. Its allowed tools are limited to Read, Edit, Write, and Bash for npx and npm commands, and it runs in a forked context.

All Files

5 files
references/page-object-template.ts5.9 KB
View
references/e2e-test-template.ts6.5 KB
View
references/playwright-config-example.ts4.1 KB
View
scripts/run-e2e-with-report.sh2.9 KB
View
SKILL.md11.8 KB
View

Install e2e-testing

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill