What problem does it solve?
This Skill helps you avoid flaky, slow Playwright end-to-end tests by teaching patterns for stable assertions, resilient selectors, and deterministic networking.
Core Features & Use Cases
- Web-first assertions: Use
expect(locator) with auto-retry for visibility, text, counts, and enabled/disabled states instead of manual DOM checks.
- User-visible locators: Prefer
getByRole, getByLabel, getByText, and getByTestId as a fallback to reduce breakage during UI refactors.
- Deterministic network testing: Mock responses with
page.route() and validate real calls with page.waitForResponse() while preventing race conditions.
- Maintainable test structure: Organize suites with
test.describe, share setup with test.beforeEach, and reduce duplication with fixtures and page objects.
- Practical configuration: Apply best-practice
playwright.config.ts options like parallelization, CI-safe retries, tracing, screenshots-on-failure, and auth via storageState.
Quick Start
Use the playwright-testing skill to write a stable Playwright E2E suite for a web app’s critical user flows with role-based locators, web-first assertions, and mocked network routes.