fix: use module identity instead of hardcoded relative path for import check

https://github.com/Comfy-Org/ComfyUI_frontend/pull/10684#discussion_r2173498574
This commit is contained in:
bymyself
2026-03-28 14:20:14 -07:00
parent baf84424cf
commit bf1a196d64

View File

@@ -41,7 +41,7 @@ Reference docs (read if you need full context):
- `comfyPage.settings.setSetting()` for settings
- Component page objects in `browser_tests/fixtures/components/`
9. **Wrong import** — Tests must use `comfyPageFixture as test` and `comfyExpect as expect` from `../fixtures/ComfyPage`, not raw `@playwright/test` imports (exception: `expect` from `@playwright/test` is acceptable when `comfyExpect` doesn't provide needed matchers).
9. **Wrong import** — Tests must use `comfyPageFixture as test` and `comfyExpect as expect` from the `browser_tests/fixtures/ComfyPage` module (path may vary by file depth), not raw `@playwright/test` imports (exception: `expect` from `@playwright/test` is acceptable when `comfyExpect` doesn't provide needed matchers).
10. **Building workflows programmatically when a JSON asset would work** — Complex `page.evaluate` chains to construct a graph should use a premade JSON workflow in `browser_tests/assets/` loaded via `comfyPage.workflow.loadWorkflow()`.