mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
fix: remove unused ts-expect-error and fix flaky drag test
- Remove stale @ts-expect-error in imagePreviewStore.test.ts (createMockNode now accepts Record<string, unknown> so animatedImages is valid) - Add waitFor + nextFrame in interaction.spec.ts beforeEach to let canvas settle after UseNewMenu layout shift Amp-Thread-ID: https://ampcode.com/threads/T-019c7313-f15a-707b-94a5-33f473a8dad5
This commit is contained in:
@@ -13,6 +13,9 @@ import type { NodeReference } from '../fixtures/utils/litegraphUtils'
|
||||
|
||||
test.beforeEach(async ({ comfyPage }) => {
|
||||
await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Disabled')
|
||||
// Wait for the legacy menu to appear and canvas to settle after layout shift.
|
||||
await comfyPage.page.locator('.comfy-menu').waitFor({ state: 'visible' })
|
||||
await comfyPage.nextFrame()
|
||||
})
|
||||
|
||||
test.describe('Item Interaction', { tag: ['@screenshot', '@node'] }, () => {
|
||||
|
||||
@@ -161,7 +161,6 @@ describe('imagePreviewStore getPreviewParam', () => {
|
||||
|
||||
it('should return empty string if node.animatedImages is true', () => {
|
||||
const store = useNodeOutputStore()
|
||||
// @ts-expect-error `animatedImages` property is not typed
|
||||
const node = createMockNode({ animatedImages: true })
|
||||
const outputs = createMockOutputs([{ filename: 'img.png' }])
|
||||
expect(store.getPreviewParam(node, outputs)).toBe('')
|
||||
|
||||
Reference in New Issue
Block a user