Comfy-Org / Comfy-Org/ComfyUI_frontend
refactor: Use real composable implementations in ComfyHubPublishDialog tests instead of heavy mocks
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
The test suite for `ComfyHubPublishDialog` in `src/platform/workflow/sharing/components/publish/ComfyHubPublishDialog.test.ts` currently fully mocks both `useComfyHubProfileGate` and `useComfyHubPublishWizard`. As a result, the tests primarily verify mock wiring rather than actual component behavior, which reduces their value as a behavioral safety net.
## Goal
Refactor `ComfyHubPublishDialog.test.ts` to use real implementations of:
- `useComfyHubProfileGate` (src/platform/workflow/sharing/composables/useComfyHubProfileGate.ts)
- `useComfyHubPublishWizard` (src/platform/workflow/sharing/composables/useComfyHubPublishWizard.ts)
This will ensure the tests fail when code behaves unexpectedly, and accurately reflect production behavior.
## References
- PR introducing the mocked tests: https://github.com/Comfy-Org/ComfyUI_frontend/pull/8951
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/8951#discussion_r2887572242
- Requested by: @christian-byrne
## Acceptance Criteria
- [ ] `useComfyHubProfileGate` is used with its real implementation (API calls mocked at the HTTP layer if needed)
- [ ] `useComfyHubPublishWizard` is used with its real implementation
- [ ] Tests still cover the key behaviors: profile gate flow, publish step navigation, and gate completion/close
- [ ] Tests fail when relevant composable logic is broken
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-9449-refactor-Use-real-composable-implementations-in-ComfyHubPublishDialog-tests-instead-o-31a6d73d365081248815cee50c465832) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.