ワンクリックで
e2e-test
Generate Playwright E2E tests following project conventions (Tauri fixture, storage isolation, helpers).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate Playwright E2E tests following project conventions (Tauri fixture, storage isolation, helpers).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Drive the real GUI against the real engine via the standalone dev HTTP bridge (`npm run dev:bridge`). Use whenever "does the wiring test actually hold up against real code?" matters — smoke verification, UI development with live engine state, real-engine bug repro, exploratory debugging with Chrome DevTools instruments.
Generate unit tests following project conventions. Use when the user asks to create, generate, or write tests for a file or component.
Scaffold a new React component with co-located test, shadcn/ui primitives, and barrel export registration.
Review changes and determine if PROJECT_SHADOW.md needs updating per AI_CONTRACT.md criteria. Runs automatically during code review.
Scaffold a new Tauri command across Rust backend and TypeScript frontend with proper patterns.
SOC 職業分類に基づく
| name | e2e-test |
| description | Generate Playwright E2E tests following project conventions (Tauri fixture, storage isolation, helpers). |
Generate Playwright E2E tests for the specified feature or user flow.
Input: Feature or flow to test. Example: /e2e-test profile selection persistence across reload
Steps
e2e/<descriptive-name>.spec.tsnpx playwright test e2e/<spec-file> --list (lists tests without running)Project Conventions
@playwright/test directly:
import { test, expect } from './fixtures/tauri';
__TAURI__ mock and __ENDSTATE_MOCK_ENGINE__ into the browser contexte2e/helpers/ui-mode.ts:
forceAdvancedMode(page) — enable sidebar navigation (call in addInitScript before goto)forceDefaultMode(page) — Overview-centric modegoToApplyPage(page) — navigate to and expand Apply cardgoToCapturePage(page) — navigate to and expand Capture cardgoToVerifyPage(page) — navigate to and expand Verify cardseedProfileSettings(page) — seed profile via addInitScript before gotoseedProfilesViaHook(page) — seed profiles after page loads via E2E hookVITE_STORAGE_NS=test prefixes all localStorage keys with test:test.use({ tauriMockOptions: { invoke: { ... } } })Mock Pattern for Tauri Commands
test.use({
tauriMockOptions: {
invoke: {
list_manifest_files: () => [
{ name: 'my-profile', path: 'C:\\profiles\\my-profile.jsonc', displayName: 'My Profile' }
],
check_file_exists: () => true,
}
}
});
Spec Template
import { test, expect } from './fixtures/tauri';
import { forceDefaultMode, goToApplyPage } from './helpers/ui-mode';
test.describe('Feature Name', () => {
test.use({
tauriMockOptions: {
invoke: {
list_manifest_files: () => [],
}
}
});
test.beforeEach(async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
});
test('describes expected behavior', async ({ page }) => {
// Arrange: set up state
// Act: user interactions
// Assert: verify outcomes
await expect(page.getByRole('heading', { name: /expected/i })).toBeVisible();
});
});
Known Pitfalls
page.dispatchEvent() workaround or evaluate-based selection.waitForLoadState('networkidle') after goto('/') before interacting{ timeout: 5000 } on assertions that depend on async renderinggetByRole and getByText locators. Use data-testid locators only for structural elements (cards, panels)