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
frontend-code-review
从架构、可维护性、类型安全、可访问性、样式一致性、性能和可测试性等角度审查前端代码,并将报告保存为 Markdown 文件。当用户要求代码审查、Review、评审代码质量时自动激活。
legacy-web-standard
针对 JavaScript + jQuery + HTML/CSS 传统前端项目的开发与维护规范。当用户在非框架项目中工作,涉及 jQuery、原生 JS、传统多页面应用(MPA)、模板引擎渲染页面、或维护遗留代码时自动激活。
accessibility-check
审查或改进前端 UI 的语义结构、键盘支持、焦点管理、标签以及常见的 WCAG 相关问题,并将报告保存为 Markdown 文件。当用户提到无障碍、accessibility、a11y、WCAG,或在实现交互组件时自动激活。
security-review
前端代码安全审查,检测 XSS、CSRF、敏感数据泄露、不安全的用户输入处理和依赖风险,并将报告保存为 Markdown 文件。当用户要求安全检查、安全审查,或代码涉及用户输入、认证、支付、文件上传等敏感操作时自动激活。
nextjs-project-standard
Next.js 14+ 项目规范,涵盖 App Router、SSR/SSG、流式渲染、路由与布局、数据获取、中间件、元数据与 SEO。当用户在 Next.js 项目中创建、修改页面或模块时自动激活。