← ClaudeAtlas

testing-with-playwrightlisted

Writes and runs Playwright end-to-end tests using the project's existing config and fixtures, prioritizing resilient selectors and real assertions over sleeps, and distinguishing test bugs from application bugs from environment failures. Use when asked to test a flow with Playwright, add E2E coverage, or verify a user journey end-to-end.
JavierQuinan/ai-dev-team-marketplace · ★ 0 · Testing & QA · score 75
Install: claude install-skill JavierQuinan/ai-dev-team-marketplace
# Testing with Playwright Extend the project's actual Playwright setup rather than inventing a parallel one. See [enforcing-safety-baseline](../enforcing-safety-baseline/SKILL.md) for the evidence rule this skill leans on hardest: a test result is only real once it has actually run. ## Workflow 1. **Discover existing setup.** Read `playwright.config.*`, existing `tests/`/`e2e/` structure, fixtures, page objects, and helper utilities already in use. Match the existing patterns instead of introducing a new style. 2. **Reuse fixtures and helpers** for auth, test data setup/teardown, and navigation instead of duplicating that logic per test. 3. **Prefer resilient selectors**: role/label/text-based locators (`getByRole`, `getByLabel`, `getByText`) over brittle CSS/XPath tied to implementation details, unless the project's existing convention already uses `data-testid` — then follow that convention. 4. **Never use arbitrary sleeps.** Use Playwright's built-in waiting (auto-waiting assertions, `waitForResponse`, `waitForURL`) instead of `waitForTimeout` as a synchronization mechanism. 5. **Cover the happy path** for the requested flow, then the relevant error/edge cases (invalid input, permission denied, empty states) — not exhaustive combinatorics, just what's realistically load-bearing. 6. **Check multi-tenant isolation when applicable**: if the flow touches tenant-scoped data, add a negative test proving user/tenant A cannot see or act on tenant B's data — don't assume isolati