mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
Remove 19 API documentation files that duplicate fixture code. Agents should read browser_tests/fixtures/ directly. Skill now contains only: - Golden rules and decision guides - Critical gotchas (nextFrame, focus, timing) - Test tags, retry patterns, anti-patterns - CI debugging and screenshot workflow Amp-Thread-ID: https://ampcode.com/threads/T-019c2609-fd8a-71a8-b8d1-047c3082fe57
2.0 KiB
2.0 KiB
E2E Testing Guidelines
See @docs/guidance/playwright.md for Playwright best practices (auto-loaded for *.spec.ts).
Directory Structure
browser_tests/
├── assets/ - Test data (JSON workflows, images)
├── fixtures/
│ ├── ComfyPage.ts - Main fixture (delegates to helpers)
│ ├── ComfyMouse.ts - Mouse interaction helper
│ ├── VueNodeHelpers.ts - Vue Nodes 2.0 helpers
│ ├── selectors.ts - Centralized TestIds
│ ├── components/ - Page object components
│ │ ├── ContextMenu.ts
│ │ ├── SettingDialog.ts
│ │ ├── SidebarTab.ts
│ │ └── Topbar.ts
│ ├── helpers/ - Focused helper classes
│ │ ├── CanvasHelper.ts
│ │ ├── CommandHelper.ts
│ │ ├── KeyboardHelper.ts
│ │ ├── NodeOperationsHelper.ts
│ │ ├── SettingsHelper.ts
│ │ ├── WorkflowHelper.ts
│ │ └── ...
│ └── utils/ - Utility functions
├── helpers/ - Test-specific utilities
└── tests/ - Test files (*.spec.ts)
After Making Changes
- Run
pnpm typecheck:browserafter modifying TypeScript files in this directory - Run
pnpm exec eslint browser_tests/path/to/file.tsto lint specific files - Run
pnpm exec oxlint browser_tests/path/to/file.tsto check with oxlint
After Making Changes
- Run
pnpm typecheck:browserafter modifying TypeScript files in this directory - Run
pnpm exec eslint browser_tests/path/to/file.tsto lint specific files - Run
pnpm exec oxlint browser_tests/path/to/file.tsto check with oxlint
Skill Documentation
A Playwright test-writing skill exists at .claude/skills/writing-playwright-tests/SKILL.md.
The skill documents meta-level guidance only (gotchas, anti-patterns, decision guides). It does not duplicate fixture APIs - agents should read the fixture code directly in browser_tests/fixtures/.