← ClaudeAtlas

swe-developing-e2e-test-with-playwrightlisted

Playwright E2E testing standards from authoritative docs/explanation/software-engineering/automation-testing/tools/playwright/ documentation
wahidyankf/ose-primer · ★ 2 · Testing & QA · score 75
Install: claude install-skill wahidyankf/ose-primer
# Playwright E2E Testing Standards ## Purpose Progressive disclosure of Playwright end-to-end testing standards for agents writing E2E tests. **Authoritative Source**: [docs/explanation/software-engineering/automation-testing/tools/playwright/README.md](../../../docs/explanation/software-engineering/automation-testing/tools/playwright/README.md) **Usage**: Auto-loaded for agents when writing Playwright E2E tests. Provides quick reference to test organization, selectors, assertions, page objects, and debugging patterns. ## Quick Standards Reference ### Test Organization **File Structure**: Group tests by feature or page ``` tests/ ├── e2e/ │ ├── auth/ │ │ ├── login.spec.ts │ │ └── register.spec.ts │ ├── payments/ │ │ ├── murabaha.spec.ts │ │ └── zakat.spec.ts │ └── navigation.spec.ts ├── page-objects/ │ ├── pages/ │ │ ├── LoginPage.ts │ │ └── DashboardPage.ts │ └── components/ │ ├── Header.ts │ └── Sidebar.ts └── fixtures/ └── test-data.ts ``` **Naming Conventions**: - Test files: `*.spec.ts` (e.g., `login.spec.ts`) - Page objects: `PascalCase` (e.g., `LoginPage.ts`) - Test descriptions: Behavior-focused (e.g., "successful login redirects to dashboard") ### Selectors (Accessibility-First) **Priority Order**: Role → Label → Text → TestID → CSS ```typescript // ✅ PASS: Accessibility-first selectors page.getByRole("button", { name: "Submit" }); // Priority 1: Role page.getByLabel("Email"); // Priority 2: Label page.ge