playwright-e2e
Cách chạy và viết E2E tests (Playwright) theo cấu trúc repo này.
When & Why to Use This Skill
This Claude skill provides comprehensive guidance on running and writing End-to-End (E2E) tests using Playwright, specifically tailored to the project's repository structure. It helps developers maintain high software quality by automating the verification of critical user flows in admin, blog, and documentation modules while emphasizing UI-based assertions and test stability.
Use Cases
- Verifying critical application flows: Automatically testing admin, blog, and documentation modules to ensure end-to-end functionality after code changes.
- Standardizing test development: Writing new E2E tests that adhere to the established repository structure and helper patterns for better maintainability.
- Improving test reliability: Debugging flaky tests by identifying root causes instead of arbitrarily increasing timeouts, ensuring a stable CI/CD pipeline.
- Behavior-focused quality assurance: Implementing assertions based on UI behavior rather than implementation details to ensure the application works as intended for the end user.
| name | playwright-e2e |
|---|---|
| description | Cách chạy và viết E2E tests (Playwright) theo cấu trúc repo này. |
Playwright E2E
Khi nào dùng skill này
- Khi sửa các flow admin/blog/docs và cần verify end-to-end.
Repo cấu trúc
- Tests:
apps/web/tests/*.spec.ts. - Helpers:
apps/web/tests/_helpers/*.
Workflow gợi ý
- Chạy test tập trung theo file/spec trước.
- Ưu tiên assert theo UI/behavior thay vì implementation details.
Không được làm
- Không sửa test không liên quan nếu không được yêu cầu.
- Không bỏ qua flaky test bằng cách nới timeout bừa bãi; ưu tiên tìm nguyên nhân.