Skillshub playwright

Playwright + Next.js Testing Best Practices

install
source · Clone the upstream repo
git clone https://github.com/ComeOnOliver/skillshub
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ComeOnOliver/skillshub "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/pproenca/dot-skills/playwright" ~/.claude/skills/comeonoliver-skillshub-playwright-523601 && rm -rf "$T"
manifest: skills/pproenca/dot-skills/playwright/SKILL.md
source content

Playwright + Next.js Testing Best Practices

Comprehensive testing optimization guide for Playwright with Next.js applications. Contains 43 rules across 8 categories, prioritized by impact to guide reliable, fast, and maintainable E2E tests.

When to Apply

Reference these guidelines when:

  • Writing new Playwright tests for Next.js apps
  • Debugging flaky or failing tests
  • Optimizing test execution speed
  • Setting up authentication state reuse
  • Configuring CI/CD pipelines for testing
  • Testing Server Components and App Router features
  • Reviewing test code for reliability issues

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Test ArchitectureCRITICAL
arch-
2Selectors & LocatorsCRITICAL
loc-
3Waiting & AssertionsHIGH
wait-
4Authentication & StateHIGH
auth-
5Mocking & NetworkMEDIUM-HIGH
mock-
6Next.js IntegrationMEDIUM
next-
7Performance & SpeedMEDIUM
perf-
8Debugging & CILOW-MEDIUM
debug-

Quick Reference

1. Test Architecture (CRITICAL)

2. Selectors & Locators (CRITICAL)

3. Waiting & Assertions (HIGH)

4. Authentication & State (HIGH)

5. Mocking & Network (MEDIUM-HIGH)

6. Next.js Integration (MEDIUM)

7. Performance & Speed (MEDIUM)

8. Debugging & CI (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
AGENTS.mdComplete compiled guide with all rules
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information