Comfy-Org / Comfy-Org/ComfyUI_frontend
Cleanup: Centralize Playwright base URL logic in Playwright config instead of individual helpers
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
Base URL resolution logic for Playwright E2E tests is currently duplicated across multiple helper files rather than being centralized in the Playwright configuration:
- `browser_tests/fixtures/ComfyPage.ts` reads `process.env.PLAYWRIGHT_SETUP_API_URL` to derive `apiUrl`
- `browser_tests/fixtures/helpers/CloudAuthHelper.ts` reads `process.env.PLAYWRIGHT_TEST_URL` (defaulting to `http://localhost:8188`) to derive `appUrl`
This duplication makes it harder to maintain consistent URL handling and goes against the Playwright convention of centralizing base URL configuration in `playwright.config.ts` (via `baseURL`).
## Desired Outcome
- Remove per-helper env-var reads for base URLs.
- Rely on Playwright's built-in `baseURL` (or a single shared utility/fixture) so all helpers derive the origin from one source of truth.
- Ensure `CloudAuthHelper` and `ComfyPage` setup calls use the centralized URL rather than independently resolving it.
## References
- Raised during review of PR #11610 (comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11610#discussion_r3144494141)
- Requested by @DrJKL
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11657-Cleanup-Centralize-Playwright-base-URL-logic-in-Playwright-config-instead-of-individ-34f6d73d36508162a8deea03b2b13df2) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.