What problem does it solve?
This Skill provides a comprehensive framework and best practices for writing reliable, maintainable, and efficient end-to-end tests using Playwright, ensuring application quality and stability.
Core Features & Use Cases
- Standardized Test Structure: Enforces the AAA pattern for clear and organized tests.
- Selector Prioritization: Guides users to use
data-test attributes, roles, and text content for resilient selectors, avoiding brittle CSS selectors.
- Page Object Model (POM): Promotes the use of POMs to encapsulate page interactions, improving code reusability and maintainability.
- Test Configuration & Tagging: Supports environment-specific commands and test categorization (e.g.,
@smoke, @regression).
- Mock Data & Helpers: Facilitates the use of mock data and helper functions for isolated and repeatable test execution.
- Debugging Tools: Outlines strategies for debugging, including headed mode, debug mode, trace viewer, and slow-motion execution.
Quick Start
Use the writing-tests skill to create a new Playwright test file for the login page, following the AAA pattern and using data-test attributes for selectors.