Scaffold test domain
scaffold_test_domainCreate a Domain-Driven POM structure for a Playwright feature: pages, API mocks/helpers, fixture, data factory, spec, and diagnostics. Use before writing new E2E tests to keep structure consistent.
Instructions
Scaffold the Domain-Driven POM structure for a feature: pages, mock API handlers, real API helpers, custom fixture, dynamic data factory and a spec, plus a shared diagnostics fixture (tests/e2e/support) that records browser console/page/network events. The spec is an explicit skeleton: its tests are test.fixme (skipped) and marked @mcp-skeleton until the TODOs are implemented. Always use this before writing new tests to ensure a consistent structure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Optional list of step/page names for this feature, e.g. ["email", "otp", "password"]. Defaults to [featureName]. | |
| overwrite | No | Whether to overwrite existing files if they already exist. Default: false. | |
| featureName | Yes | Name of the domain feature in kebab-case or camelCase, e.g. "auth", "checkout", or "user-profile" (max 64 characters). | |
| projectRoot | No | Optional path to target project root. Auto-detected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feature | Yes | ||
| skeleton | Yes | ||
| specFile | Yes | ||
| domainDir | Yes | ||
| nextSteps | Yes | ||
| factoryFile | Yes | ||
| createdFiles | Yes | ||
| skippedFiles | Yes | ||
| diagnosticsFixtureFile | Yes |