write-e2e-cases

A guide for writing end-to-end tests for Rsdoctor, a tool that checks JavaScript build results. End-to-end tests run a complete workflow, using Playwright to compile test projects and check the resulting data.

In plain words
What is it for?
Use it to add feature tests, reproduce bugs, and prevent regressions across Rsdoctor’s Rspack, Rsbuild, or Rspeedy integrations.
Why use it?
It provides the project’s required locations, helpers, fixtures, and test patterns, reducing setup mistakes and inconsistent tests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/web-infra-dev/rsdoctor/write-e2e-cases
Any agent
npx skills add web-infra-dev/rsdoctor --skill write-e2e-cases
Clone the repo
git clone --depth 1 https://github.com/web-infra-dev/rsdoctor

Made for: Claude Code, Codex.

Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 426 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00039 $0.00426
Opus 5 $0.00019 $0.00213
Sonnet 5 $0.00008 $0.00085
Haiku 4.5 $0.00004 $0.00043

Measured 3d ago against content hash 99fd0fbbb722, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

write-e2e-cases scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/write-e2e-cases/SKILL.md · 39 lines

What it actually says

Write E2E Cases

Rsdoctor E2E tests use Playwright and live under e2e/cases/. Each bundler has its own directory:

  • e2e/cases/doctor-rspack/ — tests using Rspack compilation
  • e2e/cases/doctor-rsbuild/ — tests using Rsbuild
  • e2e/cases/doctor-rspeedy/ — tests using Rspeedy

Steps

  1. Review uncommitted git changes to define test scope and target behavior.

  2. Read e2e/README.md and follow its conventions.

  3. Use helpers from @scripts/test-helper (for example compileByRspack) to compile fixtures. Do not call bundler APIs directly.

  4. Add Playwright test files under the appropriate e2e/cases/doctor-* directory, following existing patterns.

  5. Test fixtures (source files, loaders, configs) go in fixtures/ subdirectories inside each case directory.

  6. Keep assertions focused and readable; avoid redundant setup and checks.

  7. Run pnpm e2e from the repository root to validate.

Case Structure

  • Each test file creates an Rsdoctor plugin instance (e.g., createRsdoctorPlugin from a local test-utils.ts), compiles a fixture via compileByRspack, and asserts on the SDK store data.
  • Fixtures are plain JS/TS files and loaders in fixtures/ — not full application directories.
  • Use @rsdoctor/core/plugins for getSDK / setSDK when inspecting analysis results.

Constraints

  • If tests can pass only after source-code changes, do not change source code directly. Explain the required source change and ask the user before proceeding.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 39 lines · 39 tokens per session scan A 99fd0fbbb722

Subscribe to this mod's changes

write-e2e-cases is a skill published in the GitHub repository web-infra-dev/rsdoctor (1,139 stars, last pushed 3d ago), licensed MIT. It adds 39 tokens to every session and 426 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

write-ui-tests

Creates UI tests for a GitHub issue and verifies they reproduce the bug. Iterates until tests actually fail (proving they catch the issue). Use when PR lacks tests or tests need to be created for an issue.

dotnet/maui · 48 tokens

analyze-and-plan

Standalone Phase 1 of SAP UI testing. Discovers the configured test folder and target system, downloads one complete ABAP source snapshot, then READS that source and captures the full picture in three reference artifacts — flow.md (functional flow), units.md (per-unit input/output inventory), and findings.md (the…

marcellourbani/vscode_abap_remote_fs · 125 tokens

build-scripts

Standalone Phase 6 of SAP UI testing. Rediscovers the configured test folder, program, approved cases, and primary system from disk; validates upstream inputs; then writes one tests/ /test-scripts/TC-XXX.spec.ts per case using @sap-testing/runtime. Use when the user asks to write, generate, or convert Playwright…

marcellourbani/vscode_abap_remote_fs · 79 tokens

explore-ui

Standalone Phase 2 of SAP UI testing. Opens the target transaction in a real browser (SAP WebGUI) and explores it live to produce tests/ /test-cases/screens.md — the authoritative map of every on-screen control, its accessible name/label as Playwright will see it, and its initial state. This is about how the UI…

marcellourbani/vscode_abap_remote_fs · 112 tokens

prepare-data

Standalone Phase 5 of SAP UI testing. Rediscovers the configured test folder, program, approved cases, and target system from the request and upstream artifacts; then resolves TC-XXX.data.md requirements into per-system data.json caches. Works in a new chat without prior conversation context. Use when the user asks to…

marcellourbani/vscode_abap_remote_fs · 82 tokens

run-scripts

Standalone Phase 7 of SAP UI testing. Rediscovers the configured test folder, program/specs, test cases, prepared data, and target system from disk; then runs Playwright via SAP Testing tools, generates .docx evidence, and diagnoses test script failures. Use when the user asks to execute tests, run TC-XXX, generate…

marcellourbani/vscode_abap_remote_fs · 81 tokens