Comfy-Org / Comfy-Org/ComfyUI_frontend
test(browser): add Playwright test for app startup when initServerCapabilities() fails or times out
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
Add a Playwright (E2E) browser test that verifies the app startup flow remains resilient when `initServerCapabilities()` fails (e.g., network error, timeout, non-ok HTTP response) or exhausts its retry attempts.
## Background
`initServerCapabilities()` was introduced in PR #9094 and is now `await`-ed at the top of `src/main.ts` before `app.mount()`. Unit tests in `src/services/serverCapabilities.test.ts` cover the retry + empty-object fallback logic, but no integration/E2E test currently verifies that the full application still mounts and renders correctly when this call fails at startup.
## Acceptance Criteria
- A Playwright spec in `browser_tests/` that intercepts or stubs the `GET /api/features` endpoint to simulate:
- A network failure / timeout
- A non-ok HTTP response (e.g., 500)
- Asserts that the app mounts successfully and reaches a usable state (e.g., the main UI is visible) despite the `initServerCapabilities()` failure.
- Follows existing Playwright best practices documented in `docs/guidance/playwright.md`.
## References
- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9094
- Comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9094#discussion_r2867431086
- Requested by: @christian-byrne
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-9825-test-browser-add-Playwright-test-for-app-startup-when-initServerCapabilities-fails-3216d73d3650814ea82bf3dad45898c8) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.