con un clic
write-e2e-cases
// Use when adding or updating Rsdoctor end-to-end tests in `e2e/cases/`, including new feature coverage, bug reproduction, and regression prevention.
// Use when adding or updating Rsdoctor end-to-end tests in `e2e/cases/`, including new feature coverage, bug reproduction, and regression prevention.
Use when asked to create a pull request for the Rsdoctor repository. Ensures the PR follows branch safety rules, Conventional Commits title convention, the project's PR template, and concise English writing style.
Create or update draft GitHub releases for the current project's main GitHub repository, then organize GitHub-generated release notes into user-friendly sections without rewriting release note items. Use for preparing, formatting, categorizing, creating, or updating GitHub release notes or draft releases.
Review code changes like a pragmatic senior engineer — focus on functional bugs, regressions, type-safety, and missing tests. Use when performing code reviews on PRs or diffs in the rsdoctor repository.
Improve English documentation under `packages/document/docs/en` by rewriting unnatural translated sentences into clear, professional English while preserving meaning. Use when editing or polishing English docs in the Rsdoctor project.
Use when asked to release Rsdoctor packages for a specific version. All `@rsdoctor/*` packages (except `@rsdoctor/mcp-server`) are versioned together via changesets.
| name | write-e2e-cases |
| description | Use when adding or updating Rsdoctor end-to-end tests in `e2e/cases/`, including new feature coverage, bug reproduction, and regression prevention. |
Rsdoctor E2E tests use Playwright and live under e2e/cases/. Each bundler has its own directory:
e2e/cases/doctor-rspack/ — tests using Rspack compilatione2e/cases/doctor-webpack/ — tests using webpack compilatione2e/cases/doctor-rsbuild/ — tests using Rsbuilde2e/cases/doctor-rspeedy/ — tests using RspeedyReview uncommitted git changes to define test scope and target behavior.
Read e2e/README.md and follow its conventions.
Use helpers from @scripts/test-helper (for example compileByRspack, compileByWebpack5) to compile fixtures. Do not call bundler APIs directly.
Add Playwright test files under the appropriate e2e/cases/doctor-* directory, following existing patterns.
Test fixtures (source files, loaders, configs) go in fixtures/ subdirectories inside each case directory.
Keep assertions focused and readable; avoid redundant setup and checks.
Run pnpm e2e from the repository root to validate.
createRsdoctorPlugin from a local test-utils.ts), compiles a fixture via compileByRspack or compileByWebpack5, and asserts on the SDK store data.fixtures/ — not full application directories.@rsdoctor/core/plugins for getSDK / setSDK when inspecting analysis results.