mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-14 01:36:14 +00:00
## Summary Adds 32 unit tests across 3 files covering the internals of the FormDropdown family (input, filter, menu item). Part of a widget-test-coverage sequence. ## Changes - **What**: - `FormDropdownInput.test.ts` (14) — placeholder vs selected-items display, label preference, multi-item join, select-click emit, file-input rendering/accept/multiple/disabled/upload event. - `FormDropdownMenuFilter.test.ts` (8) — option rendering, v-model update on click, single-option disabled state, import-button gating by \`useModelUpload.isUploadButtonEnabled\` (mocked), \`showUploadDialog\` invocation. - `FormDropdownMenuItem.test.ts` (10) — label vs name preference, img/video rendering by injected \`AssetKindKey\`, placeholder gradient, list-small layout, click emits index, mediaLoad event, selection indicator. ## Review Focus - \`useModelUpload\` mocked at the module boundary with a dynamic import of \`vue\` inside \`vi.mock\` (needed because \`vi.hoisted\` runs before imports). - \`AssetKindKey\` provided via \`global.provide\` using the \`ComputedRef<AssetKind>\` shape. - \`v-tooltip\` registered as a no-op directive to avoid render errors in happy-dom. - No changes to any source component. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11441-test-add-unit-tests-for-form-dropdown-internals-3486d73d3650813cb4a1c6568280ef1a) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>