webapp-testing
Runs or writes Playwright tests for the 'careercopilot' webapp. Use when asked to 'run playwright' or 'write a new e2e test'.
When & Why to Use This Skill
This Claude skill automates the End-to-End (E2E) testing lifecycle for web applications using the Playwright framework. It empowers developers to efficiently execute existing test suites, generate new high-quality test scripts with stable selectors, and accelerate the debugging process, significantly improving software reliability and development velocity.
Use Cases
- Automated Regression Testing: Trigger and monitor existing Playwright test suites to ensure that new code deployments do not break existing webapp functionality.
- Rapid E2E Test Authoring: Generate new TypeScript-based test files for specific user flows (like login or checkout) by automatically utilizing stable data-testid selectors.
- Automated Debugging Workflow: Analyze failed test logs and integrate with root-cause analysis tools to quickly identify and fix front-end regressions.
- Continuous Integration Support: Streamline the QA process by providing a conversational interface to manage and run tests within the development environment.
| name | webapp-testing |
|---|---|
| description | "Runs or writes Playwright tests for the 'careercopilot' webapp. Use when asked to 'run playwright' or 'write a new e2e test'." |
WebApp Testing Workflow
Ask the user if they want to "run" existing tests or "write" a new test.
If "run":
- Ask for the test command (default:
yarn playwright test). - Run the command and report the full output.
- If it fails, suggest using the
root-cause-tracerskill to debug the log.
- Ask for the test command (default:
If "write":
- Ask for a description of the test (e.g., "test the login flow").
- Ask for the new test file name (e.g.,
login.spec.ts). - Consult
references/careercopilot-selectors.mdto use stabledata-testidselectors. - Write the new Playwright test code to
e2e/{{FILE_NAME}}. - Report success and ask the user if they want to run the new test.