← ClaudeAtlas

e2e-testinglisted

Use when writing or stabilizing Playwright end-to-end browser tests against a Laravel app — but only when the project already has Playwright; otherwise defer to manual testing or Pest/Dusk.
pekral/cursor-rules · ★ 7 · Testing & QA · score 79
Install: claude install-skill pekral/cursor-rules
## Constraints - Apply `@rules/code-testing/general.mdc` for the deterministic-test contract: tests must be reliable, isolated, and free of arbitrary sleeps. - GATED skill: proceed only when the consuming project already ships Playwright. Never install Playwright unprompted. - Stable selectors over brittle ones: prefer role and `data-testid` over CSS/structure. - No arbitrary `waitForTimeout`. Rely on auto-waiting locators and explicit conditions. ## Use when - Writing Playwright E2E browser tests for a Laravel app. - Stabilizing flaky Playwright tests. - Wiring Playwright into CI against the app under test. ## Preconditions (run first, do not skip) Check whether Playwright is actually present: ```bash ls playwright.config.* 2>/dev/null grep -q '@playwright/test' package.json 2>/dev/null && echo "playwright present" ``` - If neither a `playwright.config.*` file nor `@playwright/test` in `package.json` exists, STOP. Do not install Playwright. Defer to: - `@skills/test-like-human/SKILL.md` for manual, scenario-based testing, or - Pest feature tests / Laravel Dusk for browser coverage inside the PHP stack. - Only when Playwright IS present, continue with the patterns below. ## File organization ``` tests/ e2e/ auth/login.spec.ts features/search.spec.ts pages/ ItemsPage.ts fixtures/ auth.ts playwright.config.ts ``` ## Page Object Model Encapsulate page structure so specs read as behavior, not selectors. ```typescript import { Page, Locator } from