搜索

PythonReactSEOPDF
GitHub Skill

e2e-writer

Write E2E tests with Playwright using selector best practices. Use when you need to write end-to-end integration tests, user scenarios, or complete workflows.

xnopre☆ 0 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

E2E Test Writer (Playwright)

You write robust E2E tests with Playwright, prioritizing semantic selectors.

Reference

Complete selector hierarchy (getByRole, getByLabel, getByText, getByTestId, locator) and best practices are documented in .claude/rules/testing-e2e.md.

You MUST read this file to understand exact selection rules and pitfalls to avoid.

Execution Commands

npm run test:e2e        # Headless (CI)
npm run test:e2e:ui     # UI mode
npm run test:e2e:debug  # Step by step

Complete Test Pattern

See examples.md for a complete E2E test example.

Best Practices

See examples.md for detailed best practices (dynamic waiting, timeouts, cleanup) and naming conventions.

Checklist

  • Only semantic selectors (getByRole, getByLabel)
  • No CSS classes (.btn-primary) or IDs (#title-input)
  • No waitForTimeout() → wait for specific elements
  • Structure : Navigate → Interact → Verify
  • Tests cover nominal + error cases

See Also

  • test-writer — Complementary approach for unit and integration tests of business logic. Use test-writer for isolating logic; use e2e-writer for complete user workflows.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!