What problem does it solve?
This Skill streamlines the process of writing, setting up, and executing end-to-end (E2E) tests for web applications, ensuring robust and reliable user flows.
Core Features & Use Cases
- E2E Test Writing: Provides guidance on writing effective E2E tests using Playwright, focusing on locator strategies and avoiding common pitfalls.
- Project Setup: Details the necessary configuration files (
playwright.config.ts, package.json) for integrating Playwright into a project.
- Test Execution: Explains how to run E2E tests locally and emphasizes the importance of running them before reporting success.
- API Mocking: Demonstrates how to use
page.route for intercepting network requests and mocking API responses.
- Use Case: A developer needs to add new E2E tests for a user registration flow. This Skill guides them on how to structure the test file, locate form elements, simulate user input, assert successful registration, and mock API responses for different scenarios.
Quick Start
Use the playwright-e2e skill to add a new E2E test file for the user login flow.