AGENT SKILL
playwright
End-to-end testing with Playwright for user journeys and accessibility
使用场景测试与质量
- License 许可
- MIT
- 最近更新
- 2026-07-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- playwright
- applyTo
- tests/e2e/**/*.{ts,tsx}
- description
- End-to-end testing with Playwright for user journeys and accessibility
03 SKILL.md 正文
Playwright E2E Testing Skill
Purpose
Write and maintain end-to-end tests that verify critical user journeys, accessibility compliance, and cross-browser behavior using Playwright.
Locator Priority
Use accessible locators in this order:
page.getByRole()— semantic role + accessible namepage.getByLabel()— form controls by labelpage.getByText()— visible text contentpage.getByPlaceholder()— input placeholderspage.getByTestId()— last resort for complex selectors
Best Practices
- Test critical user journeys, not individual components.
- Configure retries for CI (
retries: 2). - Capture screenshots on failure.
- Never hard-code sleeps/timeouts; rely on Playwright auto-waiting.
- Run against production build when possible.
Running Tests
task test:e2e
task test:e2e:headed
task test:e2e:install
04 同仓库更多 Skills
ui-ux-frontend
Frontend UX, accessibility, responsive layout, and Storybook interaction quality standards.
★ 0
testing-conventions
暂无简介
★ 0
tdd
暂无简介
★ 0
shadcn-ui
shadcn/ui component conventions and composition patterns
★ 0
sdd
暂无简介
★ 0
quality-gate
暂无简介
★ 0