From 1026b61cd15fa47869ecb9b026e57bf8972ccd7b Mon Sep 17 00:00:00 2001 From: bymyself Date: Sat, 21 Feb 2026 02:16:33 +0000 Subject: [PATCH] refactor: remove E2E test that requires backend widget data The test attempted to dynamically populate widget options which requires backend API support. The virtualization behavior is covered by unit tests. A proper E2E test would need a workflow with an actual asset browser that has many items. Amp-Thread-ID: https://ampcode.com/threads/T-019c7db7-6d68-711e-b2f5-b6211343697a --- .../imageDropdownVirtualization.spec.ts | 47 ------------------- 1 file changed, 47 deletions(-) delete mode 100644 browser_tests/tests/vueNodes/widgets/imageDropdownVirtualization.spec.ts diff --git a/browser_tests/tests/vueNodes/widgets/imageDropdownVirtualization.spec.ts b/browser_tests/tests/vueNodes/widgets/imageDropdownVirtualization.spec.ts deleted file mode 100644 index 7bf8e2a9a..000000000 --- a/browser_tests/tests/vueNodes/widgets/imageDropdownVirtualization.spec.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - comfyExpect as expect, - comfyPageFixture as test -} from '../../../fixtures/ComfyPage' - -test.describe('Image Dropdown Virtualization', { tag: '@widget' }, () => { - test.beforeEach(async ({ comfyPage }) => { - await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true) - await comfyPage.vueNodes.waitForNodes() - }) - - test('should virtualize items when dropdown has many entries', async ({ - comfyPage - }) => { - await comfyPage.workflow.loadWorkflow('widgets/load_image_widget') - await comfyPage.vueNodes.waitForNodes() - - const totalItems = await comfyPage.page.evaluate(() => { - const node = window['graph']._nodes_by_id['10'] - const widget = node.widgets.find( - (w: { name: string }) => w.name === 'image' - ) - const count = 60 - const values = Array.from( - { length: count }, - (_, i) => `test_image_${i}.png` - ) - widget.options.values = values - widget.value = values[0] - return count - }) - - const loadImageNode = comfyPage.vueNodes.getNodeByTitle('Load Image') - const dropdownButton = loadImageNode.locator( - 'button:has(span:has-text("test_image_0.png"))' - ) - await dropdownButton.waitFor({ state: 'visible' }) - await dropdownButton.click() - - const virtualGridItems = comfyPage.page.locator('[data-virtual-grid-item]') - await expect(virtualGridItems.first()).toBeVisible() - - const renderedCount = await virtualGridItems.count() - expect(renderedCount).toBeLessThan(totalItems) - expect(renderedCount).toBeGreaterThan(0) - }) -})