e2e-testing

Implements Playwright end-to-end test suites with Page Object Model, CI integration, and flaky test handling.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/Femad-6/my-skills --skill e2e-testing-femad-6
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: e2e-testing
Source: https://github.com/Femad-6/my-skills/tree/main/.github/skills/e2e-testing
Command: npx skills add https://github.com/Femad-6/my-skills --skill e2e-testing-femad-6

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/test.

What problem does it solve? End-to-end tests are often slow, flaky, and hard to maintain. This Skill provides proven Playwright patterns for structuring test suites, stabilizing unreliable tests, managing artifacts, and integrating E2E testing into CI/CD pipelines. ## Core Features & Use Cases - Page Object Model Patterns: Encapsulate page interactions in reusable classes with data-testid locators and network-aware waits. - Flaky Test Management: Quarantine unstable tests with test.fixme/test.skip, reproduce flakiness with --repeat-each, and fix race conditions using auto-waiting locators instead of arbitrary timeouts. - CI/CD & Artifacts: GitHub Actions workflow with Playwright installation, HTML/JUnit/JSON reporters, and screenshot, video, and trace capture on failure. - Use Case: A team shipping a web app needs reliable browser tests across Chromium, Firefox, WebKit, and mobile viewports. Use this Skill to scaffold the config, write POM-based specs, and wire up a GitHub Actions pipeline that uploads reports on every pull request. ## Quick Start Write a Playwright E2E test suite for my login flow using the Page Object Model pattern and add a GitHub Actions workflow to run it on every pull request.

Frequently Asked Questions about e2e-testing

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

FAQPage Schema
How do I structure Playwright tests with Page Object Model?

Create a class per page that exposes locators and action methods, such as an ItemsPage with searchInput and a search() method. Tests then instantiate the page object and call its methods, keeping selectors and wait logic out of the test bodies.

How to fix flaky Playwright tests in CI?

Replace arbitrary waitForTimeout calls with condition-based waits like waitForResponse or locator auto-waiting. Reproduce flakiness locally with --repeat-each=10, and quarantine unstable tests using test.fixme or test.skip with a linked issue.

Does Playwright support testing across multiple browsers?

Yes, Playwright projects in the config run the same tests across Chromium, Firefox, WebKit, and mobile device profiles like Pixel 5. Each project can have its own device settings and viewport.

How do I capture screenshots and videos on Playwright test failure?

Set screenshot to 'only-on-failure', video to 'retain-on-failure', and trace to 'on-first-retry' in the use block of playwright.config.ts. You can also take manual screenshots with page.screenshot() for specific checkpoints.

Can Playwright test Web3 wallet connection flows?

Yes, mock the wallet provider by injecting a fake window.ethereum object with context.addInitScript before page load. The mock responds to methods like eth_requestAccounts and eth_chainId, letting tests verify connection UI without a real wallet.