playwright

Playwright testing best practices for Next.js applications (formerly test-playwright). This skill should be used when writing, reviewing, or debugging E2E tests with Playwright. Triggers on tasks involving test selectors, flaky tests, authentication state, API mocking, hydration testing, parallel execution, CI configuration, or debugging test failures.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "playwright" with this command: npx skills add thongdn-it/react-agent-skills/thongdn-it-react-agent-skills-playwright

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 ArchitectureCRITICALarch-
2Selectors & LocatorsCRITICALloc-
3Waiting & AssertionsHIGHwait-
4Authentication & StateHIGHauth-
5Mocking & NetworkMEDIUM-HIGHmock-
6Next.js IntegrationMEDIUMnext-
7Performance & SpeedMEDIUMperf-
8Debugging & CILOW-MEDIUMdebug-

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

vitest

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

react-hook-form

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

web-design-guidelines

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

zod

No summary provided by upstream source.

Repository SourceNeeds Review