From qa-playwright
Review Playwright tests against best practices and project standards
npx claudepluginhub preferredcredit/pci-claude-code-toolbox --plugin qa-playwright<test-file-or-pattern># Playwright Test Review
Review Playwright tests against best practices and project standards.
Use the `playwright-engineer` agent to perform the review.
## First Step
If `{argument}` is empty, ask the user which test file(s) to review before proceeding.
## Review Checklist
Evaluate tests against Playwright best practices:
### Selectors
| Rating | Pattern | Why |
|--------|---------|-----|
| Preferred | `getByRole()`, `getByLabel()`, `getByText()` | User-facing, accessible |
| Good | `getByTestId()` | Stable, explicit |
| Avoid | CSS classes, tag names | Fragile, style-coupled |
| C.../playwright-reviewPlaywright test review for accessibility, UI issues, and performance optimization
Review Playwright tests against best practices and project standards.
Use the playwright-engineer agent to perform the review.
If {argument} is empty, ask the user which test file(s) to review before proceeding.
Evaluate tests against Playwright best practices:
| Rating | Pattern | Why |
|---|---|---|
| Preferred | getByRole(), getByLabel(), getByText() | User-facing, accessible |
| Good | getByTestId() | Stable, explicit |
| Avoid | CSS classes, tag names | Fragile, style-coupled |
| Critical | XPath, nth-child(), complex CSS paths | Brittle, must fix |
| Rating | Pattern |
|---|---|
| Good | Playwright auto-wait (default), expect().toBeVisible(), waitForURL() |
| Critical | waitForTimeout(), setTimeout(), hardcoded delays |
beforeEach/afterEachexpect(locator).toBeVisible())expect(await locator.isVisible()).toBe(true) - use expect(locator).toBeVisible()should {behavior} when {condition}test.describe()Flag these patterns:
Present findings by severity:
Critical - Causes failures or flakiness (file:line, issue, fix)
Warning - Maintenance risk (file:line, issue, recommendation)
Suggestion - Improvement opportunity (file, issue, suggestion)
Good Practices - What's done well