docs: promote premade workflow assets guidance to golden rules

Amp-Thread-ID: https://ampcode.com/threads/T-019c1640-f128-732b-b621-2621ce8b48d1
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
bymyself
2026-01-31 15:17:47 -08:00
parent 2fd746530a
commit 9a1a05544a

View File

@@ -5,9 +5,15 @@ description: 'Writes Playwright e2e tests for ComfyUI_frontend. Use when creatin
# Writing Playwright Tests for ComfyUI_frontend
## Golden Rule
## Golden Rules
**ALWAYS look at existing tests first.** Search `browser_tests/` for similar patterns before writing new tests.
1. **ALWAYS look at existing tests first.** Search `browser_tests/` for similar patterns before writing new tests.
2. **Use premade JSON workflow assets** instead of building workflows programmatically at runtime.
- Assets live in `browser_tests/assets/`
- Load with `await comfyPage.loadWorkflow('feature/my_workflow')`
- More stable, faster, easier to debug
- See [testing/assets.md](testing/assets.md) for details
## Quick Reference