Provides guidance for implementing end-to-end tests using Playwright, following best practices for test structure, reliability, and maintainability.
Provides guidance for implementing end-to-end tests using Playwright, following best practices for test structure, reliability, and maintainability. Helps set up and maintain E2E test suites for the DWP Hours Tracker application.
Activated when users mention Playwright testing, E2E testing, browser automation, test setup, or ask about testing frontend functionality, user workflows, or integration testing.
When refactoring test files, use E2E tests to validate that functionality remains intact:
Example: After removing inline attributes from test.html files, run E2E tests to confirm component initialization still works correctly.
This skill integrates with the existing testing strategy defined in TASKS/testing-suite.md and follows Playwright's official best practices. Focuses on reliable, maintainable E2E tests that complement the existing Vitest unit testing setup. Prioritizes test stability, proper isolation, and clear reporting for CI/CD pipelines.
Understands and promotes the use of test.step() for organizing test actions into logical, reportable steps that improve test readability and debugging. test.step() allows nesting of steps, returns values from the step body, and supports options like box to point errors to the step call site instead of internal actions, enhancing error reporting clarity.