e2e-testing

Implements Playwright E2E test suites with Page Object Model, CI integration, and flaky test handling.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/freedom909/real-estate-saas --skill e2e-testing-freedom909
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: e2e-testing
Source: https://github.com/freedom909/real-estate-saas/tree/main/.trae/skills/e2e-testing
Command: npx skills add https://github.com/freedom909/real-estate-saas --skill e2e-testing-freedom909

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 files, building Page Object Models, configuring retries and reporters, and diagnosing flaky tests so your E2E suite stays stable in CI. ## Core Features & Use Cases - Page Object Model Patterns: Encapsulate page locators and actions in reusable classes with auto-waiting locators and network-aware waits. - Playwright Configuration: Set up multi-browser projects, retries, workers, HTML/JUnit/JSON reporters, and webServer bootstrapping for local and CI runs. - Flaky Test Management: Quarantine unstable tests with test.fixme/test.skip, reproduce flakiness with --repeat-each, and fix race conditions, network timing, and animation issues. - Artifact & CI/CD Integration: Capture screenshots, traces, and videos on failure, and wire everything into a GitHub Actions workflow with uploaded reports. - Use Case: You need to add E2E coverage for a login and search flow. Use this Skill to scaffold a Page Object, write describe/test blocks with proper waits, and produce a CI workflow that uploads the Playwright report on every pull request. ## Quick Start Use the e2e-testing skill to create a Playwright test suite with a Page Object Model and GitHub Actions workflow for my web app.

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 (via data-testid selectors) and action methods like goto() and search(). Tests then instantiate the page object in beforeEach and call its methods, keeping selectors out of test logic.

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.

What Playwright config settings should I use for CI?▼

Set retries to 2 and workers to 1 in CI, enable forbidOnly, and configure trace: 'on-first-retry', screenshot: 'only-on-failure', and video: 'retain-on-failure'. Add HTML, JUnit, and JSON reporters for artifact uploads.

Can Playwright test wallet connection and Web3 flows?▼

Yes. Use context.addInitScript to mock window.ethereum with methods like eth_requestAccounts and eth_chainId before page load. Then interact with connect-wallet buttons and assert the displayed address.

How do I capture screenshots and traces on Playwright test failure?▼

Configure screenshot: 'only-on-failure', video: 'retain-on-failure', and trace: 'on-first-retry' in playwright.config.ts. You can also take manual screenshots with page.screenshot() or element-level screenshots for specific components.