e2e-testing
Playwright 与 Cypress E2E 测试规范,涵盖目录结构、Page Object、CI 集成、视口与设备配置。当用户提到 E2E、端到端测试、Playwright、Cypress、集成测试时自动激活。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bovinphang/e2e-testingWhat This Skill Does
This skill provides an enterprise-grade framework and architectural guidance for End-to-End (E2E) testing using industry-standard tools: Playwright and Cypress. It helps developers standardize their test suites by implementing the Page Object Model (POM), configuring cross-device testing, and ensuring CI/CD pipeline readiness. The skill acts as a comprehensive knowledge base for best practices, ensuring your automation suite remains maintainable, scalable, and resilient to UI changes.
Installation
To integrate this skill into your OpenClaw environment, run the following command in your terminal:
clawhub install openclaw/skills/skills/bovinphang/e2e-testing
Use Cases
- Project Initialization: Setting up the folder structure and baseline configuration for Playwright or Cypress projects.
- Refactoring Test Code: Transitioning from messy, brittle selectors to a structured Page Object Model pattern to reduce maintenance overhead.
- CI/CD Integration: Generating and configuring YAML workflows for GitHub Actions to execute automated tests on every pull request.
- Device Strategy: Planning coverage across multiple viewports and browsers to ensure cross-device compatibility.
- Error Handling: Implementing robust waiting strategies to replace unstable hardcoded delays, ensuring tests are deterministic and flake-free.
Example Prompts
- "I need a Page Object template for my Playwright login page using the data-testid pattern. Can you show me how to structure the class?"
- "How should I configure my GitHub Actions workflow to run Cypress tests in a headless environment and save failure screenshots?"
- "What are the best practices for handling authentication states in E2E tests so I don't have to log in manually for every single test case?"
Tips & Limitations
- Selector Strategy: Always prioritize
data-testidover CSS or XPath to decouple your tests from visual styling changes. - Avoid Flakiness: Never use
setTimeoutor fixed waits. Utilize the built-in auto-waiting mechanisms provided by Playwright and Cypress. - Scope: This skill is intended for E2E testing architecture. Do not use E2E tests to verify granular UI details like pixel-perfect spacing or colors; delegate those to visual regression or component tests.
- Security: Never run E2E test suites against production databases. Always use a dedicated staging or mock environment to protect your user data.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bovinphang-e2e-testing": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution
Related Skills
accessibility-check
审查或改进前端 UI 的语义结构、键盘支持、焦点管理、标签以及常见的 WCAG 相关问题,并将报告保存为 Markdown 文件。当用户提到无障碍、accessibility、a11y、WCAG,或在实现交互组件时自动激活。
security-review
前端代码安全审查,检测 XSS、CSRF、敏感数据泄露、不安全的用户输入处理和依赖风险,并将报告保存为 Markdown 文件。当用户要求安全检查、安全审查,或代码涉及用户输入、认证、支付、文件上传等敏感操作时自动激活。
test-and-fix
执行项目校验命令(lint、type-check、test、build),分析失败原因,安全修复问题,并将总结报告保存为 Markdown 文件。当用户要求检查、验证、测试代码改动时自动激活。
vue3-project-standard
Vue 3 + TypeScript 项目的完整工程规范,涵盖项目结构、组件设计、Composables、路由、Pinia 状态管理、API 层、错误处理、测试和性能优化。当用户在 Vue 项目中创建、修改组件或模块,涉及架构设计、代码编写时自动激活。
nextjs-project-standard
Next.js 14+ 项目规范,涵盖 App Router、SSR/SSG、流式渲染、路由与布局、数据获取、中间件、元数据与 SEO。当用户在 Next.js 项目中创建、修改页面或模块时自动激活。