e2e-testing

Set up Playwright and Cypress E2E tests with Page Object Model patterns.

53|1|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/cosmix/claude-code-setup --skill e2e-testing-cosmix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2e-testing
Source: https://github.com/cosmix/claude-code-setup/tree/main/skills/e2e-testing
Command: npx skills add https://github.com/cosmix/claude-code-setup --skill e2e-testing-cosmix

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

End-to-end testing validates complete user flows through an application, ensuring all components work together correctly. This skill covers modern E2E testing patterns using Playwright and Cypress, including architectural patterns, selector strategies, and techniques for building reliable, maintainable test suites.

Core Features & Use Cases

  • Page Object Model (POM), test fixtures, selector strategies, async handling, visual regression testing, and flaky test prevention.
  • Framework Guidance: Playwright setup and Cypress setup instructions to bootstrap end-to-end tests.
  • Test Architecture: Page composition, fixtures, and data factories to drive deterministic tests.

Quick Start

Use the e2e-testing skill to scaffold a Playwright or Cypress test suite and implement a basic login flow test.

Frequently Asked Questions about e2e-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce flaky tests in my Playwright or Cypress test suite?

Flaky tests in Playwright and Cypress often stem from timing issues, poor selectors, and async handling. Use explicit waits, robust selector strategies like data-test attributes, and the Page Object Model pattern to stabilize tests. Implement proper fixtures and avoid hard-coded delays.

What is the Page Object Model and why should I use it for end-to-end testing?

The Page Object Model (POM) is an architectural pattern that encapsulates page elements and interactions into reusable objects. It reduces test maintenance, improves readability, and centralizes selector updates, making your test suite more scalable across Playwright and Cypress projects.

How do I set up end-to-end tests with Playwright or Cypress?

Start by installing your chosen framework—Playwright or Cypress—then scaffold your test structure with fixtures, fixtures for test data, and Page Object classes. Define selectors, implement async handling patterns, and write your first test covering a complete user flow like login.

Can I run visual regression tests alongside functional end-to-end tests?

Yes, both Playwright and Cypress support visual regression testing. Capture baseline screenshots during test runs, then compare future runs to detect unintended UI changes. Integrate this into your test suite alongside traditional functional assertions for comprehensive coverage.

Why do my end-to-end tests fail intermittently across different environments?

Intermittent failures typically result from environment-dependent timing, selector brittleness, or async race conditions. Use environment-agnostic selectors, implement proper wait strategies for dynamic content, and employ test fixtures with deterministic data factories to ensure consistent behavior.

Does Playwright or Cypress work better for testing modern web applications?

Both frameworks excel at modern web testing; the choice depends on your needs. Playwright supports multiple browsers and languages with strong async handling; Cypress offers intuitive debugging and fast iteration. Both handle complex selectors, fixtures, and flaky-test prevention equally well.