mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 21:54:50 +00:00
## Summary Follow-up to #10828. Addresses all deferred review nits from @DrJKL tracked in #10932. - Remove YAGNI `timeout` parameter from `waitForDraftPersisted` — default 5s from `waitForFunction` is sufficient - Extract `reloadAndWaitForApp()` into `WorkflowHelper` — preserves localStorage (drafts) and URL hash (subgraph navigation), unlike `ComfyPage.setup()` which clears storage and navigates to base URL - Replace programmatic `canvas.setGraph()` with `vueNodes.enterSubgraph()` for real UI-based subgraph entry - Add `@vue-nodes` tag required for `enterSubgraph()` button rendering - Extract `getSubgraphNodePositions` to deduplicate three identical inline `page.evaluate` calls - Fix vacuous pass: capture `positionsBefore` inside `expect.poll` to ensure the array is non-empty before the verification loop - Remove inline comments, relying on descriptive helper method names ## Test plan - [x] `pnpm typecheck:browser` passes - [x] `pnpm lint` passes - [x] `pnpm test:browser:local -- browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts` passes locally Fixes #10932 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11327-refactor-extract-test-helpers-and-use-UI-based-subgraph-entry-in-draft-position-test-3456d73d3650813cacc1e69398e3f80a) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: GitHub Action <action@github.com>