ワンクリックで
generate-e2e-test
Generate Playwright E2E tests from user stories or manual workflows; explore flow interactively before writing code.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate Playwright E2E tests from user stories or manual workflows; explore flow interactively before writing code.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | generate-e2e-test |
| description | Generate Playwright E2E tests from user stories or manual workflows; explore flow interactively before writing code. |
| argument-hint | Write/paste your workflow description here along with hints about where to write the code. |
| allowed-tools | mcp__Playwright_browser_click, mcp__Playwright_browser_console_messages, mcp__Playwright_browser_drag, mcp__Playwright_browser_evaluate, mcp__Playwright_browser_file_upload, mcp__Playwright_browser_fill_form, mcp__Playwright_browser_handle_dialog, mcp__Playwright_browser_hover, mcp__Playwright_browser_navigate, mcp__Playwright_browser_navigate_back, mcp__Playwright_browser_network_requests, mcp__Playwright_browser_press_key, mcp__Playwright_browser_resize, mcp__Playwright_browser_select_option, mcp__Playwright_browser_snapshot, mcp__Playwright_browser_take_screenshot, mcp__Playwright_browser_type, mcp__Playwright_browser_wait_for, mcp__Playwright_browser_mouse_click_xy, mcp__Playwright_browser_mouse_drag_xy, mcp__Playwright_browser_mouse_move_xy, mcp__Playwright_browser_verify_element_visible, mcp__Playwright_browser_verify_text_visible, mcp__Playwright_browser_verify_value, Read, Write, Edit, Grep, Glob, Bash, TodoWrite |
This Skill converts workflow descriptions into working automated end-to-end tests by first performing the workflow step-by-step using Playwright MCP browser tools, then generating and refining test code based on the actual interaction.
Convert the following workflow description into working automated tests:
$ARGUMENTS
browser_navigate to target URLbrowser_snapshot to understand page structure and confirm readiness to begin with the userFor each step in the described workflow:
Capture state: Use browser_snapshot before each interaction to understand the current page structure
Perform action: Execute using appropriate MCP tools:
browser_click - Click buttons, links, or elementsbrowser_type - Type text into fieldsbrowser_fill_form - Fill multiple form fields at oncebrowser_select_option - Select from dropdownsbrowser_press_key - Press keyboard keysCollect selectors:
ref values from accessibility snapshots (most stable)browser_evaluate with queries like document.querySelector('[data-testid="..."]') if neededVerify outcomes: Use browser_wait_for or snapshot to confirm expected results after each action
Document: Track successful selector patterns and interaction sequences for test generation
Read project conventions: Review TESTING.md for:
Write test spec: Transform recorded workflow into test code using:
tests/e2e/utils/test-helpers.tsFile location: Place test in appropriate directory under tests/e2e/ based on feature area:
tests/e2e/admin/ - Super admin featurestests/e2e/auth/ - Authentication flowstests/e2e/client/ - Client-specific featurestests/e2e/dashboard/ - Dashboard pagestests/e2e/marketing/ - Public pagestests/e2e/workouts/ - Workout featuresRun test: Execute using project's test command from TESTING.md:
pnpm test:e2e:ai tests/e2e/your-test.spec.ts
Debug failures:
browser_snapshot and browser_evaluate to find better selectorswaitForElementWithRetry or similar helpersIterate: Repeat debugging until test passes consistently
Discovery:
browser_snapshot (primary) - Get page structure and element informationbrowser_evaluate (for complex queries) - Execute JavaScript to query DOMActions:
browser_click - Click elementsbrowser_type - Type textbrowser_fill_form - Fill multiple form fieldsbrowser_select_option - Select dropdown optionsbrowser_press_key - Press keyboard keysValidation:
browser_wait_for - Wait for elements or conditionsbrowser_verify_* tools - Verify element visibility, text, and valuesDebugging:
browser_console_messages - Check console errorsbrowser_network_requests - Inspect network activitybrowser_take_screenshot - Capture visual stategetByRole(), getByText(), getByLabel() from PlaywrightwaitForElementWithRetry() for robust waitingwaitForTableLoaded(page) before interacting with table elementstests/e2e/fixtures.ts for pre-configured test datae2e-*@example.com)navigateToPage() helper instead of page.goto() for reliable client-side routingdomcontentloadedimport { test, expect } from './fixtures'
import { navigateToPage, expectToast } from './utils/test-helpers'
test('user can create exercise', async ({ page, superAdminUser }) => {
await navigateToPage(page, '/super-admin/exercises')
await page.getByRole('button', { name: 'Add Exercise' }).click()
await page.getByLabel('Name').fill('Bench Press')
await page.getByLabel('Muscle Group').selectOption('Chest')
await page.getByRole('button', { name: 'Save' }).click()
await expectToast(page, 'Exercise created successfully')
})
test('user can delete exercise', async ({ page, superAdminUser }) => {
await navigateToPage(page, '/super-admin/exercises')
// Open dropdown menu first
const row = page.locator('tr').filter({ hasText: 'Bench Press' })
await row.locator('[aria-label*="More actions"]').click()
// Then select delete action
await page.getByRole('menuitem', { name: 'Delete' }).click()
await page.getByRole('button', { name: 'Confirm' }).click()
await expectToast(page, 'Exercise deleted successfully')
})
TESTING.md and test utilities configuredIf tests fail:
test-report-for-coding-agents/all-failures.mdbrowser_console_messagesbrowser_snapshotbrowser_network_requestsbrowser_take_screenshotIf stuck debugging, ask a human to inspect the Playwright trace in playwright-report/ which contains detailed execution information.
Shell out to claude CLI.
Run a multi-agent debate to compare options and converge on a decision.
Run the same task with multiple agents for reviews, critiques, or model comparison.
Autonomous large-task delivery agent. Use for long-running coding work that should go from objective or plan to implemented code, review fixes, PR/MR, and green CI with minimal human-in-the-loop gates.
Manage ClickUp tasks.
Generate a project template for Coolify