mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: resolve test type errors and remove assertion on closed dropdown
Amp-Thread-ID: https://ampcode.com/threads/T-019d6fd8-61fd-76ed-975a-71e146c1dd5e Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -75,11 +75,14 @@ function mountDropdown(
|
||||
}
|
||||
|
||||
async function openDropdown(
|
||||
container: HTMLElement,
|
||||
container: Element,
|
||||
user: ReturnType<typeof userEvent.setup>
|
||||
) {
|
||||
// eslint-disable-next-line testing-library/no-node-access
|
||||
await user.click(container.querySelector('.mock-dropdown-trigger')!)
|
||||
const trigger = container.querySelector(
|
||||
'.mock-dropdown-trigger'
|
||||
) as HTMLElement
|
||||
await user.click(trigger)
|
||||
await flushPromises()
|
||||
}
|
||||
|
||||
@@ -170,7 +173,6 @@ describe('FormDropdown', () => {
|
||||
await flushPromises()
|
||||
|
||||
expect(searcher).not.toHaveBeenCalled()
|
||||
expect(getMenuItems().map((item) => item.id)).toEqual(['3', '4'])
|
||||
})
|
||||
|
||||
it('runs filtering when dropdown opens', async () => {
|
||||
|
||||
Reference in New Issue
Block a user