generate-scenario-tests
Generate Playwright test files from plain English scenario descriptions in test/scenarios/
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate Playwright test files from plain English scenario descriptions in test/scenarios/
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when investigating terminal rendering desync between tmux and xterm.js in schmux's web dashboard — viewport showing wrong content, scrollback jumping, frozen display, content not matching tmux, screen-diff showing row mismatches, or users reporting the terminal "jumping around" or "scrolling back"
Write a scenario test for a feature you just implemented. Examines the current diff to understand what changed, writes a plain English scenario, then generates the Playwright test.
| name | generate-scenario-tests |
| description | Generate Playwright test files from plain English scenario descriptions in test/scenarios/ |
You are generating Playwright test files from plain English scenario descriptions.
Read ALL scenario files from test/scenarios/*.md
Read the shared test harness at test/scenarios/generated/helpers.ts
Read the existing generated test as a template: test/scenarios/generated/spawn-single-session.spec.ts
For each scenario file, read the relevant React components to understand:
data-testid attributes exist (search for data-testid in assets/dashboard/src/)<select> controls, what the actual <option value> strings are (do not assume labels map to values)assets/dashboard/src/App.tsx)internal/dashboard/handlers.go)For each scenario file, generate a .spec.ts file in test/scenarios/generated/
.spec.ts extensiondata-testid selectors where available, fall back to role-based selectors## Preconditions to test.beforeAll setup## Verifications to test assertionshelpers.ts — do NOT duplicate helper logic in testslocalhost:7337 — all API/WebSocket URLs must use helpers or process.env.SCHMUX_BASE_URL || 'http://localhost:7337'. Tests run in parallel with per-worker daemons on ephemeral ports.data-testid selectors as the primary selector strategyvalue (e.g. __multiple__), not a guessed label-derived value.spec.ts file.spec.ts file has one test.describe block with one or more test blockssh -c 'echo hello; sleep 600' for test agents (mirrors internal/e2e/e2e.go line 240)waitForHealthy() in beforeAllwaitForDashboardLive(page) after navigationAfter generating all test files, run:
cd test/scenarios/generated && npx tsc --noEmit
Report any type errors and fix them before presenting the results.
After type-checking passes, run the generated scenario tests to confirm they pass end-to-end:
./test.sh --scenarios --run '<scenario name>'
Replace <scenario name> with the test describe block name (e.g., 'Remote access onboarding').
If multiple scenarios were generated, run each one. Fix any failures before presenting the results.