Playwright Standard
SkillWeb & browsingComprehensive, opinionated guidance for Playwright test development. Use ONLY when writing E2E, browser tests, UI tests, API, component, or visual tests, debugging failures, implementing Page Object Model, or configuring CI/CD. For unit tests, use vitest-standard. Use Playwright solely for E2E, API, and component tests. NOT for unit testing (use Vitest). If the user asks to "write tests" without specifying the type, you MUST ask "Unit, E2E, or both?" before proceeding.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Playwright Standard skill
What this skill tells your AI
The instructions your AI receives, as published by neverinfamous/memory-journal-mcp in skills/playwright-standard/SKILL.md and read by ahel’s review.
This skill combines battle-tested coding standards with industrial-scale infrastructure guidance. It is designed to keep agents on the "Golden Path" of modern Playwright development while providing deep reference for niche environments.
Golden Rules (Mandatory)
getByRole()over CSS/XPath — Resilient to markup changes, mirrors how users see the page.- Never
page.waitForTimeout()— Useexpect(locator).toBeVisible()orpage.waitForURL(). - Web-first assertions —
expect(locator)auto-retries;expect(await locator.textContent())does not. - Isolate every test — Every test must run independently in any order (no shared state).
- Fixtures over globals — Share state via
test.extend(), not module-level variables. baseURLin config — ZERO hardcoded URLs in test files.- Auth: Reuse storage state — Use
browserContext.storageStateto avoid UI login in every test. StorestorageStatefiles in.gitignored paths (e.g.,playwright/.auth/). Never commit auth state files to version control. - Network: Mock third-party only — Never mock your own app; mock external APIs, gateways, and emails.
- Traces:
'on-first-retry'— High-fidelity debugging without CI performance penalties. - One behavior per test — Avoid "mega-tests": keep focus narrow and assertions meaningful.
Quality Standards
Locators Priority
See locators.md for the strict hierarchy of Playwright locator strategies (Role > Label > TestID).
Synchronization
- Do:
await expect(locator).toBeVisible() - Avoid:
await page.waitForSelector('.btn') - Avoid:
await page.waitForLoadState('networkidle')(Flaky on high-latency networks)
Specialized References (Load On-Demand)
For infrastructure, scale, or niche environments, read the relevant reference file:
| Scenario | Reference File |
|---|---|
| CI/CD, Sharding, Docker | infrastructure.md |
| Electron, WebSockets, Canvas | advanced-scenarios.md |
| Visual, Accessibility, API | advanced-scenarios.md |
Example: Fixture-based Isolation
See fixtures.ts for the recommended pattern for sharing state without global variables.
Signals
- GitHub stars
- 20
- Forks
- 5
- Last commit
- Jul 2026
Advanced
- Catalog kind
- skill
- Gateway key
playwright-standard- Source
- github.com/neverinfamous/memory-journal-mcp