From ork
Implements Playwright E2E testing patterns: page objects, AI agent testing, visual regression, axe-core accessibility, CI integration, and backend emulation for deterministic tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ork:testing-e2eThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
End-to-end testing with Playwright 1.58+, visual regression, accessibility, and AI agent workflows.
checklists/a11y-testing-checklist.mdchecklists/e2e-checklist.mdchecklists/e2e-testing-checklist.mdexamples/a11y-testing-examples.mdexamples/e2e-test-patterns.mdexamples/orchestkit-e2e-tests.mdreferences/a11y-testing-tools.mdreferences/playwright-1.57-api.mdreferences/playwright-setup.mdreferences/visual-regression.mdrules/_sections.mdrules/a11y-playwright.mdrules/a11y-testing.mdrules/e2e-ai-agents.mdrules/e2e-page-objects.mdrules/e2e-playwright.mdrules/emulate-e2e.mdrules/validation-end-to-end.mdscripts/create-page-object.mdtest-cases.jsonEnd-to-end testing with Playwright 1.58+, visual regression, accessibility, and AI agent workflows.
| Category | Rules | Impact | When to Use |
|---|---|---|---|
| emulate Backends | rules/emulate-e2e.md | HIGH | FIRST CHOICE — deterministic API backends for E2E |
| Playwright Core | rules/e2e-playwright.md | HIGH | Semantic locators, auto-wait, flaky detection |
| Page Objects | rules/e2e-page-objects.md | HIGH | Encapsulate page interactions, visual regression |
| AI Agents | rules/e2e-ai-agents.md | HIGH | Planner/Generator/Healer, init-agents |
| A11y Playwright | rules/a11y-playwright.md | MEDIUM | Full-page axe-core scanning with WCAG 2.2 AA |
| A11y CI/CD | rules/a11y-testing.md | MEDIUM | CI gates, jest-axe unit tests, PR blocking |
| End-to-End Types | rules/validation-end-to-end.md | HIGH | tRPC, Prisma, Pydantic type safety |
Total: 7 rules, 4 references, 3 checklists, 3 examples, 1 script
For E2E tests that interact with external APIs (GitHub, Vercel, Google), use emulate as the backend instead of hitting real APIs. This eliminates flakiness from rate limits, network issues, and non-deterministic data.
| Approach | Result |
|---|---|
| emulate backends (FIRST CHOICE) | Deterministic, fast, CI-friendly |
| Real APIs | Flaky, rate-limited, slow |
| MSW/Nock intercepts | No state machines, manual response management |
Key features: seed config for reproducible data, per-worker port isolation for parallel Playwright, full state machine transitions.
See rules/emulate-e2e.md for patterns, CI configuration, and per-worker isolation fixtures.
import { test, expect } from '@playwright/test';
test('user can complete checkout', async ({ page }) => {
await page.goto('/products');
await page.getByRole('button', { name: 'Add to cart' }).click();
await page.getByRole('link', { name: 'Checkout' }).click();
await page.getByLabel('Email').fill('[email protected]');
await page.getByRole('button', { name: 'Submit' }).click();
await expect(page.getByRole('heading', { name: 'Order confirmed' })).toBeVisible();
});
Locator Priority: getByRole() > getByLabel() > getByPlaceholder() > getByTestId()
Semantic locator patterns and best practices for resilient tests.
| Rule | File | Key Pattern |
|---|---|---|
| Playwright E2E | rules/e2e-playwright.md | Semantic locators, auto-wait, new 1.58+ features |
Anti-patterns (FORBIDDEN):
await page.waitForTimeout(2000)await page.click('.submit-btn')Encapsulate page interactions into reusable classes.
| Rule | File | Key Pattern |
|---|---|---|
| Page Object Model | rules/e2e-page-objects.md | Locators in constructor, action methods, assertion methods |
const checkout = new CheckoutPage(page);
await checkout.fillEmail('[email protected]');
await checkout.submit();
await checkout.expectConfirmation();
Playwright 1.58+ AI agent framework for test planning, generation, and self-healing. Includes a token-efficient CLI mode designed for coding agents — minimal output, structured responses, reduced context overhead.
| Rule | File | Key Pattern |
|---|---|---|
| AI Agents | rules/e2e-ai-agents.md | Planner, Generator, Healer workflow |
npx playwright init-agents --loop=claude # For Claude Code
Token-efficient CLI mode (1.58+): Playwright ships a SKILL-focused CLI mode that produces compact, agent-friendly output — use this when running Playwright from AI agents to minimize token consumption.
Workflow: Planner (explores app, creates specs) -> Generator (reads spec, tests live app) -> Healer (fixes failures, updates selectors).
Full-page accessibility validation with axe-core in E2E tests.
| Rule | File | Key Pattern |
|---|---|---|
| Playwright + axe | rules/a11y-playwright.md | WCAG 2.2 AA, interactive state testing |
import AxeBuilder from '@axe-core/playwright';
test('page meets WCAG 2.2 AA', async ({ page }) => {
await page.goto('/');
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag22aa'])
.analyze();
expect(results.violations).toEqual([]);
});
CI pipeline integration and jest-axe unit-level component testing.
| Rule | File | Key Pattern |
|---|---|---|
| CI Gates + jest-axe | rules/a11y-testing.md | PR blocking, component state testing |
Type safety across API layers to eliminate runtime type errors.
| Rule | File | Key Pattern |
|---|---|---|
| Type Safety | rules/validation-end-to-end.md | tRPC, Zod, Pydantic, schema rejection tests |
Native Playwright screenshot comparison without external services.
await expect(page).toHaveScreenshot('checkout-page.png', {
maxDiffPixels: 100,
mask: [page.locator('.dynamic-content')],
});
See references/visual-regression.md for full configuration, CI/CD workflows, cross-platform handling, and Percy migration guide.
| Decision | Recommendation |
|---|---|
| E2E framework | Playwright 1.58+ with semantic locators |
| Locator strategy | getByRole > getByLabel > getByTestId |
| Browser | Chromium (Chrome for Testing in 1.58+) |
| Page pattern | Page Object Model for complex pages |
| Visual regression | Playwright native toHaveScreenshot() |
| A11y testing | axe-core (E2E) + jest-axe (unit) |
| CI retries | 2-3 in CI, 0 locally |
| Flaky detection | failOnFlakyTests: true in CI |
| AI agents | Planner/Generator/Healer via init-agents |
| Type safety | tRPC for end-to-end, Zod for runtime validation |
| Resource | Description |
|---|---|
references/playwright-1.57-api.md | Playwright 1.58+ API: locators, assertions, AI agents, auth, flaky detection |
references/playwright-setup.md | Installation, MCP server, seed tests, agent initialization |
references/visual-regression.md | Screenshot config, CI/CD workflows, cross-platform, Percy migration |
references/a11y-testing-tools.md | jest-axe setup, Playwright axe-core, CI pipelines, manual checklists |
| Checklist | Description |
|---|---|
checklists/e2e-checklist.md | Locator strategy, page objects, CI/CD, visual regression |
checklists/e2e-testing-checklist.md | Comprehensive: planning, implementation, SSE, responsive, maintenance |
checklists/a11y-testing-checklist.md | Automated + manual: keyboard, screen reader, color contrast, WCAG |
| Example | Description |
|---|---|
examples/e2e-test-patterns.md | User flows, page objects, auth fixtures, API mocking, multi-tab, file upload |
examples/a11y-testing-examples.md | jest-axe components, Playwright axe E2E, custom rules, CI pipeline |
examples/orchestkit-e2e-tests.md | OrchestKit analysis flow: page objects, SSE progress, error handling |
| Script | Description |
|---|---|
scripts/create-page-object.md | Generate Playwright page object with auto-detected patterns |
testing-unit - Unit testing patterns with mocking, fixtures, and data factoriestest-standards-enforcer - AAA and naming enforcementrun-tests - Test execution orchestrationemulate-seed - Seed configuration authoring for emulate providersportless (upstream) - Stable baseURL for local E2E tests (myapp.localhost:1355 instead of port guessing)npx claudepluginhub yonatangross/orchestkit --plugin orkGuides Playwright e2e testing with parallel config, retries=2 in CI, Page Object Model using semantic locators, auth state fixtures, no hard-coded sleeps, visual regression, accessibility testing, and API mocking. Use for writing tests, config review, flaky test debugging.
Provides E2E testing patterns and Playwright examples for reliable suites, flaky test debugging, CI/CD setup, and critical user workflows.
Provides patterns for building reliable E2E test suites with Playwright and Cypress, including page object model, configuration, and debugging flaky tests.