From 117c473a29e753f781801b51e9cac4832ba9c905 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 01:00:11 -0700 Subject: [PATCH 01/14] fix: remove redundant and counterproductive e2e timeout overrides - Remove ~120 redundant timeout overrides from auto-retrying assertions (toBeVisible, toBeHidden, toHaveCount, toBeEnabled, toHaveAttribute, toContainText, expect.poll) where 5000ms is already the Playwright default - Remove sub-5s timeouts (1s, 2s, 3s) from assertions that were needlessly tighter than the default, encouraging flaky failures - Raise absurdly short timeouts in customMatchers.ts (250ms toPass -> 5000ms, 256ms poll default -> removed to use 5000ms default) - Preserve timeouts on .toPass() (defaults to 0), .waitFor(), .waitForRequest(), waitForFunction(), intentionally-short assertion timeouts inside retry loops, and conditional .isVisible()/.catch() checks Amp-Thread-ID: https://ampcode.com/threads/T-019d7558-e8be-7099-b026-367fa10d97ca Co-authored-by: Amp --- .../fixtures/components/SidebarTab.ts | 12 ++-- browser_tests/fixtures/components/Topbar.ts | 2 +- browser_tests/fixtures/helpers/ToastHelper.ts | 2 +- .../fixtures/utils/customMatchers.ts | 4 +- browser_tests/helpers/builderTestUtils.ts | 6 +- .../tests/appModeDropdownClipping.spec.ts | 12 ++-- .../tests/appModeWidgetRename.spec.ts | 14 ++--- .../tests/appModeWidgetValues.spec.ts | 2 +- browser_tests/tests/builderReorder.spec.ts | 4 +- browser_tests/tests/builderSaveFlow.spec.ts | 24 ++++---- browser_tests/tests/changeTracker.spec.ts | 4 +- browser_tests/tests/copyPaste.spec.ts | 23 ++------ .../tests/defaultKeybindings.spec.ts | 6 +- browser_tests/tests/errorOverlay.spec.ts | 4 +- browser_tests/tests/execution.spec.ts | 12 +--- browser_tests/tests/keybindingPresets.spec.ts | 20 ++----- browser_tests/tests/linearMode.spec.ts | 12 ++-- .../tests/load3d/Load3DViewerHelper.ts | 2 +- browser_tests/tests/load3d/load3d.spec.ts | 26 ++++----- .../tests/load3d/load3dViewer.spec.ts | 4 +- .../tests/nodeContextMenuOverflow.spec.ts | 15 ++--- browser_tests/tests/recordAudio.spec.ts | 5 +- .../tests/selectionToolboxSubmenus.spec.ts | 16 ++---- browser_tests/tests/sidebar/assets.spec.ts | 40 ++++++------- .../tests/sidebar/modelLibrary.spec.ts | 24 +++----- .../tests/sidebar/nodeLibraryV2.spec.ts | 14 ++--- browser_tests/tests/sidebar/workflows.spec.ts | 6 +- .../tests/subgraph/subgraphNavigation.spec.ts | 56 ++++++++----------- .../tests/subgraph/subgraphPromotion.spec.ts | 26 +++------ .../subgraph/subgraphPromotionDom.spec.ts | 14 ++--- .../tests/subgraph/subgraphSearch.spec.ts | 2 +- browser_tests/tests/templates.spec.ts | 6 +- .../tests/topbar/workflowTabs.spec.ts | 6 +- .../interactions/node/contextMenu.spec.ts | 14 ++--- .../vueNodes/interactions/node/remove.spec.ts | 2 +- browser_tests/tests/widget.spec.ts | 8 +-- .../tests/workflowPersistence.spec.ts | 10 +--- .../tests/workflowTabThumbnail.spec.ts | 2 +- 38 files changed, 173 insertions(+), 288 deletions(-) diff --git a/browser_tests/fixtures/components/SidebarTab.ts b/browser_tests/fixtures/components/SidebarTab.ts index 2a983d8535f..031442c8192 100644 --- a/browser_tests/fixtures/components/SidebarTab.ts +++ b/browser_tests/fixtures/components/SidebarTab.ts @@ -427,24 +427,20 @@ export class AssetsSidebarTab extends SidebarTab { } // Wait for all toast elements to fully animate out and detach from DOM await expect(this.page.locator('.p-toast-message')) - .toHaveCount(0, { timeout: 5000 }) + .toHaveCount(0) .catch(() => {}) } async switchToImported() { await this.dismissToasts() await this.importedTab.click() - await expect(this.importedTab).toHaveAttribute('aria-selected', 'true', { - timeout: 3000 - }) + await expect(this.importedTab).toHaveAttribute('aria-selected', 'true') } async switchToGenerated() { await this.dismissToasts() await this.generatedTab.click() - await expect(this.generatedTab).toHaveAttribute('aria-selected', 'true', { - timeout: 3000 - }) + await expect(this.generatedTab).toHaveAttribute('aria-selected', 'true') } async openSettingsMenu() { @@ -467,7 +463,7 @@ export class AssetsSidebarTab extends SidebarTab { async waitForAssets(count?: number) { if (count !== undefined) { - await expect(this.assetCards).toHaveCount(count, { timeout: 5000 }) + await expect(this.assetCards).toHaveCount(count) } else { await this.assetCards.first().waitFor({ state: 'visible', timeout: 5000 }) } diff --git a/browser_tests/fixtures/components/Topbar.ts b/browser_tests/fixtures/components/Topbar.ts index fc3554cecef..4c2fac5219f 100644 --- a/browser_tests/fixtures/components/Topbar.ts +++ b/browser_tests/fixtures/components/Topbar.ts @@ -107,7 +107,7 @@ export class Topbar { { timeout: 3000 } ) // Wait for the dialog to close. - await this.getSaveDialog().waitFor({ state: 'hidden', timeout: 500 }) + await this.getSaveDialog().waitFor({ state: 'hidden' }) // Check if a confirmation dialog appeared (e.g., "Overwrite existing file?") // If so, return early to let the test handle the confirmation diff --git a/browser_tests/fixtures/helpers/ToastHelper.ts b/browser_tests/fixtures/helpers/ToastHelper.ts index a84fd586df6..75db01bbaa0 100644 --- a/browser_tests/fixtures/helpers/ToastHelper.ts +++ b/browser_tests/fixtures/helpers/ToastHelper.ts @@ -28,6 +28,6 @@ export class ToastHelper { } // Assert all toasts are closed - await expect(this.visibleToasts).toHaveCount(0, { timeout: 1000 }) + await expect(this.visibleToasts).toHaveCount(0) } } diff --git a/browser_tests/fixtures/utils/customMatchers.ts b/browser_tests/fixtures/utils/customMatchers.ts index 224c070fb13..65814eb3bfd 100644 --- a/browser_tests/fixtures/utils/customMatchers.ts +++ b/browser_tests/fixtures/utils/customMatchers.ts @@ -18,7 +18,7 @@ function makeMatcher( ? expect(value, 'Node is ' + type).not : expect(value, 'Node is not ' + type) assertion.toBeTruthy() - }).toPass({ timeout: 250, ...options }) + }).toPass({ timeout: 5000, ...options }) return { pass: !this.isNot, message: () => 'Node is ' + (this.isNot ? 'not ' : '') + type @@ -30,7 +30,7 @@ export const comfyExpect = expect.extend({ toBePinned: makeMatcher((n) => n.isPinned(), 'pinned'), toBeBypassed: makeMatcher((n) => n.isBypassed(), 'bypassed'), toBeCollapsed: makeMatcher((n) => n.isCollapsed(), 'collapsed'), - async toHaveFocus(locator: Locator, options = { timeout: 256 }) { + async toHaveFocus(locator: Locator, options = {}) { await expect .poll( () => locator.evaluate((el) => el === document.activeElement), diff --git a/browser_tests/helpers/builderTestUtils.ts b/browser_tests/helpers/builderTestUtils.ts index da00dd05dce..0d2de03aaf6 100644 --- a/browser_tests/helpers/builderTestUtils.ts +++ b/browser_tests/helpers/builderTestUtils.ts @@ -82,11 +82,9 @@ export async function builderSaveAs( viewType: 'App' | 'Node graph' = 'App' ) { await appMode.footer.saveAsButton.click() - await comfyExpect(appMode.saveAs.nameInput).toBeVisible({ timeout: 5000 }) + await comfyExpect(appMode.saveAs.nameInput).toBeVisible() await appMode.saveAs.fillAndSave(workflowName, viewType) - await comfyExpect(appMode.saveAs.successMessage).toBeVisible({ - timeout: 5000 - }) + await comfyExpect(appMode.saveAs.successMessage).toBeVisible() } /** diff --git a/browser_tests/tests/appModeDropdownClipping.spec.ts b/browser_tests/tests/appModeDropdownClipping.spec.ts index bf433222de1..bc65c6c202c 100644 --- a/browser_tests/tests/appModeDropdownClipping.spec.ts +++ b/browser_tests/tests/appModeDropdownClipping.spec.ts @@ -75,9 +75,7 @@ test.describe('App mode dropdown clipping', { tag: '@ui' }, () => { ] await comfyPage.appMode.enterAppModeWithInputs(inputs) - await expect(comfyPage.appMode.linearWidgets).toBeVisible({ - timeout: 5000 - }) + await expect(comfyPage.appMode.linearWidgets).toBeVisible() // Scroll to bottom so the codec widget is at the clipping edge const widgetList = comfyPage.appMode.linearWidgets @@ -90,7 +88,7 @@ test.describe('App mode dropdown clipping', { tag: '@ui' }, () => { await codecSelect.click() const overlay = comfyPage.page.locator('.p-select-overlay').first() - await expect(overlay).toBeVisible({ timeout: 5000 }) + await expect(overlay).toBeVisible() await expect .poll(() => @@ -123,9 +121,7 @@ test.describe('App mode dropdown clipping', { tag: '@ui' }, () => { ] await comfyPage.appMode.enterAppModeWithInputs(inputs) - await expect(comfyPage.appMode.linearWidgets).toBeVisible({ - timeout: 5000 - }) + await expect(comfyPage.appMode.linearWidgets).toBeVisible() // Scroll to bottom so the image widget is at the clipping edge const widgetList = comfyPage.appMode.linearWidgets @@ -144,7 +140,7 @@ test.describe('App mode dropdown clipping', { tag: '@ui' }, () => { // The unstyled PrimeVue Popover renders with role="dialog". // Locate the one containing the image grid (filter buttons like "All", "Inputs"). const popover = comfyPage.appMode.imagePickerPopover - await expect(popover).toBeVisible({ timeout: 5000 }) + await expect(popover).toBeVisible() await expect .poll(() => diff --git a/browser_tests/tests/appModeWidgetRename.spec.ts b/browser_tests/tests/appModeWidgetRename.spec.ts index 9415c679ced..7dd738ba786 100644 --- a/browser_tests/tests/appModeWidgetRename.spec.ts +++ b/browser_tests/tests/appModeWidgetRename.spec.ts @@ -26,7 +26,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { await appMode.steps.goToInputs() const menu = appMode.select.getInputItemMenu('seed') - await expect(menu).toBeVisible({ timeout: 5000 }) + await expect(menu).toBeVisible() await appMode.select.renameInputViaMenu('seed', 'Builder Input Seed') // Verify in app mode after save/reload @@ -34,7 +34,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { const workflowName = `${new Date().getTime()} builder-input-menu` await saveAndReopenInAppMode(comfyPage, workflowName) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() await expect( appMode.linearWidgets.getByText('Builder Input Seed') ).toBeVisible() @@ -54,7 +54,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { const workflowName = `${new Date().getTime()} builder-input-dblclick` await saveAndReopenInAppMode(comfyPage, workflowName) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() await expect(appMode.linearWidgets.getByText('Dblclick Seed')).toBeVisible() }) @@ -65,7 +65,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { await appMode.steps.goToPreview() const menu = appMode.select.getPreviewWidgetMenu('seed — New Subgraph') - await expect(menu).toBeVisible({ timeout: 5000 }) + await expect(menu).toBeVisible() await appMode.select.renameWidget(menu, 'Preview Seed') // Verify in app mode after save/reload @@ -73,7 +73,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { const workflowName = `${new Date().getTime()} builder-preview` await saveAndReopenInAppMode(comfyPage, workflowName) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() await expect(appMode.linearWidgets.getByText('Preview Seed')).toBeVisible() }) @@ -85,7 +85,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { await appMode.footer.exitBuilder() await appMode.toggleAppMode() - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() const menu = appMode.getAppModeWidgetMenu('seed') await appMode.select.renameWidget(menu, 'App Mode Seed') @@ -97,7 +97,7 @@ test.describe('App mode widget rename', { tag: ['@ui', '@subgraph'] }, () => { const workflowName = `${new Date().getTime()} app-mode` await saveAndReopenInAppMode(comfyPage, workflowName) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() await expect(appMode.linearWidgets.getByText('App Mode Seed')).toBeVisible() }) }) diff --git a/browser_tests/tests/appModeWidgetValues.spec.ts b/browser_tests/tests/appModeWidgetValues.spec.ts index ee30f4f3dc8..59178eedd7a 100644 --- a/browser_tests/tests/appModeWidgetValues.spec.ts +++ b/browser_tests/tests/appModeWidgetValues.spec.ts @@ -63,7 +63,7 @@ test.describe('App mode widget values in prompt', { tag: '@ui' }, () => { ({ nodeId, widgetName }) => [nodeId, widgetName] ) await appMode.enterAppModeWithInputs(inputs) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() for (const { nodeId, widgetName, type, fill } of WIDGET_TEST_DATA) { const key = `${nodeId}:${widgetName}` diff --git a/browser_tests/tests/builderReorder.spec.ts b/browser_tests/tests/builderReorder.spec.ts index 2116ac350cf..997b7c2dec2 100644 --- a/browser_tests/tests/builderReorder.spec.ts +++ b/browser_tests/tests/builderReorder.spec.ts @@ -122,7 +122,7 @@ test.describe('Builder input reordering', { tag: '@ui' }, () => { const workflowName = `${Date.now()} reorder-preview` await saveCloseAndReopenAsApp(comfyPage, appMode, workflowName) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() await expect(appMode.select.previewWidgetLabels).toHaveText([ 'steps', 'cfg', @@ -147,7 +147,7 @@ test.describe('Builder input reordering', { tag: '@ui' }, () => { const workflowName = `${Date.now()} reorder-persist` await saveCloseAndReopenAsApp(comfyPage, appMode, workflowName) - await expect(appMode.linearWidgets).toBeVisible({ timeout: 5000 }) + await expect(appMode.linearWidgets).toBeVisible() await expect(appMode.select.previewWidgetLabels).toHaveText([ 'steps', 'cfg', diff --git a/browser_tests/tests/builderSaveFlow.spec.ts b/browser_tests/tests/builderSaveFlow.spec.ts index c79c4ae109a..efbef2413e3 100644 --- a/browser_tests/tests/builderSaveFlow.spec.ts +++ b/browser_tests/tests/builderSaveFlow.spec.ts @@ -21,7 +21,7 @@ async function reSaveAs( viewType: 'App' | 'Node graph' ) { await appMode.footer.openSaveAsFromChevron() - await expect(appMode.saveAs.nameInput).toBeVisible({ timeout: 5000 }) + await expect(appMode.saveAs.nameInput).toBeVisible() await appMode.saveAs.fillAndSave(workflowName, viewType) } @@ -48,7 +48,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await setupBuilder(comfyPage) await comfyPage.appMode.footer.saveAsButton.click() - await expect(saveAs.dialog).toBeVisible({ timeout: 5000 }) + await expect(saveAs.dialog).toBeVisible() await expect(saveAs.nameInput).toBeVisible() await expect(saveAs.title).toBeVisible() await expect(saveAs.radioGroup).toBeVisible() @@ -68,7 +68,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await setupBuilder(comfyPage) await comfyPage.appMode.footer.saveAsButton.click() - await expect(saveAs.dialog).toBeVisible({ timeout: 5000 }) + await expect(saveAs.dialog).toBeVisible() await saveAs.nameInput.fill('') await expect(saveAs.saveButton).toBeDisabled() }) @@ -78,7 +78,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await setupBuilder(comfyPage) await comfyPage.appMode.footer.saveAsButton.click() - await expect(saveAs.dialog).toBeVisible({ timeout: 5000 }) + await expect(saveAs.dialog).toBeVisible() const appRadio = saveAs.viewTypeRadio('App') await expect(appRadio).toHaveAttribute('aria-checked', 'true') @@ -136,12 +136,12 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { // Modify the workflow so the save button becomes enabled await comfyPage.appMode.steps.goToInputs() await comfyPage.appMode.select.deleteInput('seed') - await expect(footer.saveButton).toBeEnabled({ timeout: 5000 }) + await expect(footer.saveButton).toBeEnabled() await footer.saveButton.click() await comfyPage.nextFrame() - await expect(saveAs.dialog).not.toBeVisible({ timeout: 2000 }) + await expect(saveAs.dialog).not.toBeVisible() await expect(footer.saveButton).toBeDisabled() }) @@ -156,7 +156,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await footer.openSaveAsFromChevron() - await expect(saveAs.title).toBeVisible({ timeout: 5000 }) + await expect(saveAs.title).toBeVisible() await expect(saveAs.nameInput).toBeVisible() }) @@ -209,7 +209,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await expect( comfyPage.page.getByText('Connect an output', { exact: false }) - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() }) test('save as app produces correct extension and linearMode', async ({ @@ -291,7 +291,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { // Re-save as node graph — creates a copy await reSaveAs(appMode, `${Date.now()} copy`, 'Node graph') - await expect(appMode.saveAs.successMessage).toBeVisible({ timeout: 5000 }) + await expect(appMode.saveAs.successMessage).toBeVisible() await expect .poll(() => comfyPage.workflow.getActiveWorkflowPath()) @@ -325,11 +325,11 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await reSaveAs(appMode, name, 'App') - await expect(appMode.saveAs.overwriteDialog).toBeVisible({ timeout: 5000 }) + await expect(appMode.saveAs.overwriteDialog).toBeVisible() await appMode.saveAs.overwriteButton.click() await expect(appMode.saveAs.overwriteDialog).not.toBeVisible() - await expect(appMode.saveAs.successMessage).toBeVisible({ timeout: 5000 }) + await expect(appMode.saveAs.successMessage).toBeVisible() await expect .poll(() => comfyPage.workflow.getActiveWorkflowPath()) @@ -351,7 +351,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await dismissSuccessDialog(appMode.saveAs) await reSaveAs(appMode, name, 'Node graph') - await expect(appMode.saveAs.successMessage).toBeVisible({ timeout: 5000 }) + await expect(appMode.saveAs.successMessage).toBeVisible() await expect .poll(() => comfyPage.workflow.getActiveWorkflowPath()) diff --git a/browser_tests/tests/changeTracker.spec.ts b/browser_tests/tests/changeTracker.spec.ts index 0bf91a36ee6..65f969aca7c 100644 --- a/browser_tests/tests/changeTracker.spec.ts +++ b/browser_tests/tests/changeTracker.spec.ts @@ -206,8 +206,8 @@ test.describe('Change Tracker', { tag: '@workflow' }, () => { // Ensure undo reverts both changes await comfyPage.keyboard.undo() - await expect(node).not.toBeBypassed({ timeout: 5000 }) - await expect(node).not.toBeCollapsed({ timeout: 5000 }) + await expect(node).not.toBeBypassed() + await expect(node).not.toBeCollapsed() await waitForChangeTrackerSettled(comfyPage, { isModified: false, redoQueueSize: 1, diff --git a/browser_tests/tests/copyPaste.spec.ts b/browser_tests/tests/copyPaste.spec.ts index 053d5a254c9..ce67e4a0d15 100644 --- a/browser_tests/tests/copyPaste.spec.ts +++ b/browser_tests/tests/copyPaste.spec.ts @@ -149,11 +149,7 @@ test.describe('Copy Paste', { tag: ['@screenshot', '@workflow'] }, () => { await comfyPage.canvas.click({ position: { x: 50, y: 500 } }) await comfyPage.nextFrame() await comfyPage.clipboard.paste() - await expect - .poll(() => comfyPage.nodeOps.getGraphNodesCount(), { - timeout: 5_000 - }) - .toBe(3) + await expect.poll(() => comfyPage.nodeOps.getGraphNodesCount()).toBe(3) // Step 2: Paste image onto selected LoadImage node const loadImageNodes = @@ -171,13 +167,10 @@ test.describe('Copy Paste', { tag: ['@screenshot', '@workflow'] }, () => { await uploadPromise await expect - .poll( - async () => { - const fileWidget = await loadImageNodes[0].getWidget(0) - return fileWidget.getValue() - }, - { timeout: 5_000 } - ) + .poll(async () => { + const fileWidget = await loadImageNodes[0].getWidget(0) + return fileWidget.getValue() + }) .toContain('image32x32') await expect.poll(() => comfyPage.nodeOps.getGraphNodesCount()).toBe(3) @@ -194,11 +187,7 @@ test.describe('Copy Paste', { tag: ['@screenshot', '@workflow'] }, () => { ) await uploadPromise2 - await expect - .poll(() => comfyPage.nodeOps.getGraphNodesCount(), { - timeout: 5_000 - }) - .toBe(4) + await expect.poll(() => comfyPage.nodeOps.getGraphNodesCount()).toBe(4) const allLoadImageNodes = await comfyPage.nodeOps.getNodeRefsByType('LoadImage') expect(allLoadImageNodes).toHaveLength(2) diff --git a/browser_tests/tests/defaultKeybindings.spec.ts b/browser_tests/tests/defaultKeybindings.spec.ts index 039ef0dbc21..a5d9197f2ce 100644 --- a/browser_tests/tests/defaultKeybindings.spec.ts +++ b/browser_tests/tests/defaultKeybindings.spec.ts @@ -250,7 +250,7 @@ test.describe('Default Keybindings', { tag: '@keyboard' }, () => { // The Save As dialog should appear (p-dialog overlay) const dialogOverlay = comfyPage.page.locator('.p-dialog-mask') - await expect(dialogOverlay).toBeVisible({ timeout: 3000 }) + await expect(dialogOverlay).toBeVisible() // Dismiss the dialog await comfyPage.page.keyboard.press('Escape') @@ -303,9 +303,7 @@ test.describe('Default Keybindings', { tag: '@keyboard' }, () => { // After conversion, node count should decrease // (multiple nodes replaced by single subgraph node) await expect - .poll(() => comfyPage.nodeOps.getGraphNodesCount(), { - timeout: 5000 - }) + .poll(() => comfyPage.nodeOps.getGraphNodesCount()) .toBeLessThan(initialCount) }) diff --git a/browser_tests/tests/errorOverlay.spec.ts b/browser_tests/tests/errorOverlay.spec.ts index 298fb1c3d64..a0e95854e99 100644 --- a/browser_tests/tests/errorOverlay.spec.ts +++ b/browser_tests/tests/errorOverlay.spec.ts @@ -112,10 +112,10 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await comfyPage.nextFrame() await comfyPage.keyboard.undo() - await expect(errorOverlay).not.toBeVisible({ timeout: 5000 }) + await expect(errorOverlay).not.toBeVisible() await comfyPage.keyboard.redo() - await expect(errorOverlay).not.toBeVisible({ timeout: 5000 }) + await expect(errorOverlay).not.toBeVisible() }) }) diff --git a/browser_tests/tests/execution.spec.ts b/browser_tests/tests/execution.spec.ts index 8aac1fca7b2..32bf42394c3 100644 --- a/browser_tests/tests/execution.spec.ts +++ b/browser_tests/tests/execution.spec.ts @@ -63,19 +63,13 @@ test.describe( await comfyPage.command.executeCommand('Comfy.QueueSelectedOutputNodes') await expect - .poll(async () => (await input.getWidget(0)).getValue(), { - timeout: 2_000 - }) + .poll(async () => (await input.getWidget(0)).getValue()) .toBe('foo') await expect - .poll(async () => (await output1.getWidget(0)).getValue(), { - timeout: 2_000 - }) + .poll(async () => (await output1.getWidget(0)).getValue()) .toBe('foo') await expect - .poll(async () => (await output2.getWidget(0)).getValue(), { - timeout: 2_000 - }) + .poll(async () => (await output2.getWidget(0)).getValue()) .toBe('') }) } diff --git a/browser_tests/tests/keybindingPresets.spec.ts b/browser_tests/tests/keybindingPresets.spec.ts index b2babde827e..43c5629d8ab 100644 --- a/browser_tests/tests/keybindingPresets.spec.ts +++ b/browser_tests/tests/keybindingPresets.spec.ts @@ -79,9 +79,7 @@ test.describe('Keybinding Presets', { tag: '@keyboard' }, () => { await expect(presetTrigger).toContainText('test-preset') // Wait for toast to auto-dismiss, then close settings via Escape - await expect(comfyPage.toast.visibleToasts).toHaveCount(0, { - timeout: 5000 - }) + await expect(comfyPage.toast.visibleToasts).toHaveCount(0) await page.keyboard.press('Escape') await comfyPage.settingDialog.waitForHidden() @@ -133,9 +131,7 @@ test.describe('Keybinding Presets', { tag: '@keyboard' }, () => { await expect(presetTrigger).toContainText('test-preset') // Wait for toast to auto-dismiss - await expect(comfyPage.toast.visibleToasts).toHaveCount(0, { - timeout: 5000 - }) + await expect(comfyPage.toast.visibleToasts).toHaveCount(0) // Export via ellipsis menu await menuButton.click() @@ -183,9 +179,7 @@ test.describe('Keybinding Presets', { tag: '@keyboard' }, () => { await expect(presetTrigger).toContainText('test-preset') // Wait for toast to auto-dismiss - await expect(comfyPage.toast.visibleToasts).toHaveCount(0, { - timeout: 5000 - }) + await expect(comfyPage.toast.visibleToasts).toHaveCount(0) // Delete via ellipsis menu await menuButton.click() @@ -223,9 +217,7 @@ test.describe('Keybinding Presets', { tag: '@keyboard' }, () => { await expect(presetTrigger).toContainText('test-preset') // Wait for toast to auto-dismiss - await expect(comfyPage.toast.visibleToasts).toHaveCount(0, { - timeout: 5000 - }) + await expect(comfyPage.toast.visibleToasts).toHaveCount(0) // Save as new preset via ellipsis menu await menuButton.click() @@ -237,9 +229,7 @@ test.describe('Keybinding Presets', { tag: '@keyboard' }, () => { await promptInput.press('Enter') // Wait for toast to auto-dismiss - await expect(comfyPage.toast.visibleToasts).toHaveCount(0, { - timeout: 5000 - }) + await expect(comfyPage.toast.visibleToasts).toHaveCount(0) // Verify preset trigger shows my-custom-preset await expect(presetTrigger).toContainText('my-custom-preset') diff --git a/browser_tests/tests/linearMode.spec.ts b/browser_tests/tests/linearMode.spec.ts index a3aa5e51bf5..909eb77f08f 100644 --- a/browser_tests/tests/linearMode.spec.ts +++ b/browser_tests/tests/linearMode.spec.ts @@ -16,7 +16,7 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { await expect( comfyPage.page.locator('[data-testid="linear-widgets"]') - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() }) test('Run button visible in linear mode', async ({ comfyPage }) => { @@ -24,7 +24,7 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { await expect( comfyPage.page.locator('[data-testid="linear-run-button"]') - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() }) test('Workflow info section visible', async ({ comfyPage }) => { @@ -32,7 +32,7 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { await expect( comfyPage.page.locator('[data-testid="linear-workflow-info"]') - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() }) test('Returns to graph mode', async ({ comfyPage }) => { @@ -40,11 +40,11 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { await expect( comfyPage.page.locator('[data-testid="linear-widgets"]') - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() await comfyPage.appMode.toggleAppMode() - await expect(comfyPage.canvas).toBeVisible({ timeout: 5000 }) + await expect(comfyPage.canvas).toBeVisible() await expect( comfyPage.page.locator('[data-testid="linear-widgets"]') ).not.toBeVisible() @@ -55,7 +55,7 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { await expect( comfyPage.page.locator('[data-testid="linear-widgets"]') - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() await expect(comfyPage.canvas).not.toBeVisible() }) }) diff --git a/browser_tests/tests/load3d/Load3DViewerHelper.ts b/browser_tests/tests/load3d/Load3DViewerHelper.ts index 1a0bd8de3d0..ebff17b00b9 100644 --- a/browser_tests/tests/load3d/Load3DViewerHelper.ts +++ b/browser_tests/tests/load3d/Load3DViewerHelper.ts @@ -25,6 +25,6 @@ export class Load3DViewerHelper { } async waitForClosed(): Promise { - await expect(this.dialog).toBeHidden({ timeout: 5000 }) + await expect(this.dialog).toBeHidden() } } diff --git a/browser_tests/tests/load3d/load3d.spec.ts b/browser_tests/tests/load3d/load3d.spec.ts index a837301732a..ec118a9f6ec 100644 --- a/browser_tests/tests/load3d/load3d.spec.ts +++ b/browser_tests/tests/load3d/load3d.spec.ts @@ -66,16 +66,14 @@ test.describe('Load3D', () => { await comfyPage.nextFrame() await expect - .poll( - () => - comfyPage.page.evaluate(() => { - const n = window.app!.graph.getNodeById(1) - const config = n?.properties?.['Scene Config'] as - | Record - | undefined - return config?.backgroundColor - }), - { timeout: 3000 } + .poll(() => + comfyPage.page.evaluate(() => { + const n = window.app!.graph.getNodeById(1) + const config = n?.properties?.['Scene Config'] as + | Record + | undefined + return config?.backgroundColor + }) ) .toBe('#cc3333') @@ -111,9 +109,7 @@ test.describe('Load3D', () => { const node = await comfyPage.nodeOps.getNodeRefById(1) const modelFileWidget = await node.getWidget(0) - await expect - .poll(() => modelFileWidget.getValue(), { timeout: 5000 }) - .toContain('cube.obj') + await expect.poll(() => modelFileWidget.getValue()).toContain('cube.obj') await load3d.waitForModelLoaded() await comfyPage.nextFrame() @@ -143,9 +139,7 @@ test.describe('Load3D', () => { const node = await comfyPage.nodeOps.getNodeRefById(1) const modelFileWidget = await node.getWidget(0) - await expect - .poll(() => modelFileWidget.getValue(), { timeout: 5000 }) - .toContain('cube.obj') + await expect.poll(() => modelFileWidget.getValue()).toContain('cube.obj') await load3d.waitForModelLoaded() await comfyPage.nextFrame() diff --git a/browser_tests/tests/load3d/load3dViewer.spec.ts b/browser_tests/tests/load3d/load3dViewer.spec.ts index 7fb6996eae1..639899a1377 100644 --- a/browser_tests/tests/load3d/load3dViewer.spec.ts +++ b/browser_tests/tests/load3d/load3dViewer.spec.ts @@ -18,9 +18,7 @@ test.describe('Load3D Viewer', () => { const nodeRef = await comfyPage.nodeOps.getNodeRefById(1) const modelFileWidget = await nodeRef.getWidget(0) - await expect - .poll(() => modelFileWidget.getValue(), { timeout: 5000 }) - .toContain('cube.obj') + await expect.poll(() => modelFileWidget.getValue()).toContain('cube.obj') await load3d.waitForModelLoaded() }) diff --git a/browser_tests/tests/nodeContextMenuOverflow.spec.ts b/browser_tests/tests/nodeContextMenuOverflow.spec.ts index f4f8e2d206c..605c0913856 100644 --- a/browser_tests/tests/nodeContextMenuOverflow.spec.ts +++ b/browser_tests/tests/nodeContextMenuOverflow.spec.ts @@ -37,19 +37,17 @@ test.describe( await ksamplerNodes[0].click('title') await comfyPage.nextFrame() - await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible({ - timeout: 5000 - }) + await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible() const moreOptionsBtn = comfyPage.page.locator( '[data-testid="more-options-button"]' ) - await expect(moreOptionsBtn).toBeVisible({ timeout: 3000 }) + await expect(moreOptionsBtn).toBeVisible() await moreOptionsBtn.click() await comfyPage.nextFrame() const menu = comfyPage.page.locator('.p-contextmenu') - await expect(menu).toBeVisible({ timeout: 3000 }) + await expect(menu).toBeVisible() // Wait for constrainMenuHeight (runs via requestAnimationFrame in onMenuShow) await comfyPage.nextFrame() @@ -68,8 +66,7 @@ test.describe( () => rootList.evaluate((el) => el.scrollHeight > el.clientHeight), { message: - 'Menu should overflow vertically so this test exercises the viewport clamp', - timeout: 3000 + 'Menu should overflow vertically so this test exercises the viewport clamp' } ) .toBe(true) @@ -97,9 +94,7 @@ test.describe( await comfyPage.nextFrame() // The node should be removed from the graph - await expect - .poll(() => comfyPage.nodeOps.getGraphNodesCount(), { timeout: 3000 }) - .toBe(0) + await expect.poll(() => comfyPage.nodeOps.getGraphNodesCount()).toBe(0) }) } ) diff --git a/browser_tests/tests/recordAudio.spec.ts b/browser_tests/tests/recordAudio.spec.ts index adf580477bf..c6cdc8d0978 100644 --- a/browser_tests/tests/recordAudio.spec.ts +++ b/browser_tests/tests/recordAudio.spec.ts @@ -25,10 +25,7 @@ test.describe('Record Audio Node', { tag: '@screenshot' }, () => { await expect .poll( async () => - (await comfyPage.nodeOps.getNodeRefsByType('RecordAudio')).length, - { - timeout: 5000 - } + (await comfyPage.nodeOps.getNodeRefsByType('RecordAudio')).length ) .toBe(1) diff --git a/browser_tests/tests/selectionToolboxSubmenus.spec.ts b/browser_tests/tests/selectionToolboxSubmenus.spec.ts index 268037d5e75..ecd076a1a43 100644 --- a/browser_tests/tests/selectionToolboxSubmenus.spec.ts +++ b/browser_tests/tests/selectionToolboxSubmenus.spec.ts @@ -45,14 +45,12 @@ test.describe( await ksamplerNodes[0].click('title') await comfyPage.nextFrame() - await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible({ - timeout: 5000 - }) + await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible() const moreOptionsBtn = comfyPage.page.locator( '[data-testid="more-options-button"]' ) - await expect(moreOptionsBtn).toBeVisible({ timeout: 3000 }) + await expect(moreOptionsBtn).toBeVisible() await comfyPage.page.click('[data-testid="more-options-button"]') @@ -99,9 +97,7 @@ test.describe( await comfyPage.page.getByText('Shape', { exact: true }).hover() await expect( comfyPage.page.getByText('Box', { exact: true }) - ).toBeVisible({ - timeout: 5000 - }) + ).toBeVisible() await comfyPage.page.getByText('Box', { exact: true }).click() await comfyPage.nextFrame() @@ -118,7 +114,7 @@ test.describe( await openMoreOptions(comfyPage) await comfyPage.page.getByText('Color', { exact: true }).click() const blueSwatch = comfyPage.page.locator('[title="Blue"]') - await expect(blueSwatch.first()).toBeVisible({ timeout: 5000 }) + await expect(blueSwatch.first()).toBeVisible() await blueSwatch.first().click() await comfyPage.nextFrame() @@ -152,7 +148,7 @@ test.describe( }) => { await openMoreOptions(comfyPage) const renameItem = comfyPage.page.getByText('Rename', { exact: true }) - await expect(renameItem).toBeVisible({ timeout: 5000 }) + await expect(renameItem).toBeVisible() // Wait for multiple frames to allow PrimeVue's outside click handler to initialize for (let i = 0; i < 30; i++) { @@ -175,7 +171,7 @@ test.describe( await openMoreOptions(comfyPage) await expect( comfyPage.page.getByText('Rename', { exact: true }) - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() await comfyPage.page.evaluate(() => { const btn = document.querySelector( diff --git a/browser_tests/tests/sidebar/assets.spec.ts b/browser_tests/tests/sidebar/assets.spec.ts index 587ba43fdd7..ff188af192b 100644 --- a/browser_tests/tests/sidebar/assets.spec.ts +++ b/browser_tests/tests/sidebar/assets.spec.ts @@ -187,7 +187,7 @@ test.describe('Assets sidebar - grid view display', () => { await tab.switchToImported() // Wait for imported assets to render - await expect(tab.assetCards.first()).toBeVisible({ timeout: 5000 }) + await expect(tab.assetCards.first()).toBeVisible() // Imported tab should show the mocked files await expect.poll(() => tab.assetCards.count()).toBeGreaterThanOrEqual(1) @@ -242,7 +242,7 @@ test.describe('Assets sidebar - view mode toggle', () => { await tab.listViewOption.click() // List view items should now be visible - await expect(tab.listViewItems.first()).toBeVisible({ timeout: 5000 }) + await expect(tab.listViewItems.first()).toBeVisible() }) test('Can switch back to grid view', async ({ comfyPage }) => { @@ -253,14 +253,14 @@ test.describe('Assets sidebar - view mode toggle', () => { // Switch to list view await tab.openSettingsMenu() await tab.listViewOption.click() - await expect(tab.listViewItems.first()).toBeVisible({ timeout: 5000 }) + await expect(tab.listViewItems.first()).toBeVisible() // Switch back to grid view (settings popover is still open) await tab.gridViewOption.click() await tab.waitForAssets() // Grid cards (with data-selected attribute) should be visible again - await expect(tab.assetCards.first()).toBeVisible({ timeout: 5000 }) + await expect(tab.assetCards.first()).toBeVisible() }) }) @@ -299,9 +299,7 @@ test.describe('Assets sidebar - search', () => { await tab.searchInput.fill('landscape') // Wait for filter to reduce the count - await expect - .poll(() => tab.assetCards.count(), { timeout: 5000 }) - .toBeLessThan(initialCount) + await expect.poll(() => tab.assetCards.count()).toBeLessThan(initialCount) }) test('Clearing search restores all assets', async ({ comfyPage }) => { @@ -316,7 +314,7 @@ test.describe('Assets sidebar - search', () => { await expect.poll(() => tab.assetCards.count()).toBeLessThan(initialCount) await tab.searchInput.fill('') - await expect(tab.assetCards).toHaveCount(initialCount, { timeout: 5000 }) + await expect(tab.assetCards).toHaveCount(initialCount) }) test('Search with no matches shows empty state', async ({ comfyPage }) => { @@ -325,7 +323,7 @@ test.describe('Assets sidebar - search', () => { await tab.waitForAssets() await tab.searchInput.fill('nonexistent_file_xyz') - await expect(tab.assetCards).toHaveCount(0, { timeout: 5000 }) + await expect(tab.assetCards).toHaveCount(0) }) }) @@ -384,7 +382,7 @@ test.describe('Assets sidebar - selection', () => { await tab.assetCards.first().click() // Footer should show selection count - await expect(tab.selectionCountButton).toBeVisible({ timeout: 3000 }) + await expect(tab.selectionCountButton).toBeVisible() }) test('Deselect all clears selection', async ({ comfyPage }) => { @@ -398,7 +396,7 @@ test.describe('Assets sidebar - selection', () => { // Hover over the selection count button to reveal "Deselect all" await tab.selectionCountButton.hover() - await expect(tab.deselectAllButton).toBeVisible({ timeout: 3000 }) + await expect(tab.deselectAllButton).toBeVisible() // Click "Deselect all" await tab.deselectAllButton.click() @@ -449,7 +447,7 @@ test.describe('Assets sidebar - context menu', () => { // Context menu should appear with standard items const contextMenu = comfyPage.page.locator('.p-contextmenu') - await expect(contextMenu).toBeVisible({ timeout: 3000 }) + await expect(contextMenu).toBeVisible() }) test('Context menu contains Download action for output asset', async ({ @@ -522,7 +520,7 @@ test.describe('Assets sidebar - context menu', () => { await tab.assetCards.first().click({ button: 'right' }) const contextMenu = comfyPage.page.locator('.p-contextmenu') - await expect(contextMenu).toBeVisible({ timeout: 3000 }) + await expect(contextMenu).toBeVisible() await expect( tab.contextMenuItem('Open as workflow in new tab') @@ -552,8 +550,8 @@ test.describe('Assets sidebar - context menu', () => { await comfyPage.page.keyboard.up('Control') // Verify multi-selection took effect and footer is stable before right-clicking - await expect(tab.selectedCards).toHaveCount(2, { timeout: 3000 }) - await expect(tab.selectionFooter).toBeVisible({ timeout: 3000 }) + await expect(tab.selectedCards).toHaveCount(2) + await expect(tab.selectionFooter).toBeVisible() // Use dispatchEvent instead of click({ button: 'right' }) to avoid any // overlay intercepting the event, and assert directly without toPass. @@ -595,7 +593,7 @@ test.describe('Assets sidebar - bulk actions', () => { await tab.assetCards.first().click() // Download button in footer should be visible - await expect(tab.downloadSelectedButton).toBeVisible({ timeout: 3000 }) + await expect(tab.downloadSelectedButton).toBeVisible() }) test('Footer shows delete button when output assets selected', async ({ @@ -608,7 +606,7 @@ test.describe('Assets sidebar - bulk actions', () => { await tab.assetCards.first().click() // Delete button in footer should be visible - await expect(tab.deleteSelectedButton).toBeVisible({ timeout: 3000 }) + await expect(tab.deleteSelectedButton).toBeVisible() }) test('Selection count displays correct number', async ({ comfyPage }) => { @@ -629,7 +627,7 @@ test.describe('Assets sidebar - bulk actions', () => { await comfyPage.page.keyboard.up('Control') // Selection count should show the count - await expect(tab.selectionCountButton).toBeVisible({ timeout: 3000 }) + await expect(tab.selectionCountButton).toBeVisible() await expect(tab.selectionCountButton).toHaveText(/Assets Selected:\s*2\b/) }) }) @@ -748,12 +746,10 @@ test.describe('Assets sidebar - delete confirmation', () => { await comfyPage.confirmDialog.delete.click() await expect(dialog).not.toBeVisible() - await expect(tab.assetCards).toHaveCount(initialCount - 1, { - timeout: 5000 - }) + await expect(tab.assetCards).toHaveCount(initialCount - 1) const successToast = comfyPage.page.locator('.p-toast-message-success') - await expect(successToast).toBeVisible({ timeout: 5000 }) + await expect(successToast).toBeVisible() }) test('Cancelling delete preserves asset', async ({ comfyPage }) => { diff --git a/browser_tests/tests/sidebar/modelLibrary.spec.ts b/browser_tests/tests/sidebar/modelLibrary.spec.ts index f4e1e698a7e..cb09801af27 100644 --- a/browser_tests/tests/sidebar/modelLibrary.spec.ts +++ b/browser_tests/tests/sidebar/modelLibrary.spec.ts @@ -76,9 +76,7 @@ test.describe('Model library sidebar - folders', () => { await tab.getFolderByLabel('checkpoints').click() // Models should appear as leaf nodes - await expect(tab.getLeafByLabel('sd_xl_base_1.0')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getLeafByLabel('sd_xl_base_1.0')).toBeVisible() await expect(tab.getLeafByLabel('dreamshaper_8')).toBeVisible() await expect(tab.getLeafByLabel('realisticVision_v51')).toBeVisible() }) @@ -91,9 +89,7 @@ test.describe('Model library sidebar - folders', () => { await tab.getFolderByLabel('loras').click() - await expect(tab.getLeafByLabel('detail_tweaker_xl')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getLeafByLabel('detail_tweaker_xl')).toBeVisible() await expect(tab.getLeafByLabel('add_brightness')).toBeVisible() }) }) @@ -119,9 +115,7 @@ test.describe('Model library sidebar - search', () => { await tab.searchInput.fill('dreamshaper') // Wait for debounce (300ms) + load + render - await expect(tab.getLeafByLabel('dreamshaper_8')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getLeafByLabel('dreamshaper_8')).toBeVisible() // Other models should not be visible await expect(tab.getLeafByLabel('sd_xl_base_1.0')).not.toBeVisible() @@ -132,17 +126,13 @@ test.describe('Model library sidebar - search', () => { await tab.open() await tab.searchInput.fill('dreamshaper') - await expect(tab.getLeafByLabel('dreamshaper_8')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getLeafByLabel('dreamshaper_8')).toBeVisible() // Clear the search await tab.searchInput.fill('') // Folders should be visible again (collapsed) - await expect(tab.getFolderByLabel('checkpoints')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getFolderByLabel('checkpoints')).toBeVisible() await expect(tab.getFolderByLabel('loras')).toBeVisible() }) @@ -152,7 +142,7 @@ test.describe('Model library sidebar - search', () => { // Expand a folder and verify models are present before searching await tab.getFolderByLabel('checkpoints').click() - await expect(tab.leafNodes).not.toHaveCount(0, { timeout: 5000 }) + await expect(tab.leafNodes).not.toHaveCount(0) await tab.searchInput.fill('nonexistent_model_xyz') @@ -196,7 +186,7 @@ test.describe('Model library sidebar - refresh', () => { await tab.refreshButton.click() await refreshRequest - await expect(tab.getFolderByLabel('loras')).toBeVisible({ timeout: 5000 }) + await expect(tab.getFolderByLabel('loras')).toBeVisible() }) test('Load all folders button triggers loading all model data', async ({ diff --git a/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts b/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts index 0c495c04c4f..93dc35e615e 100644 --- a/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts +++ b/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts @@ -45,9 +45,7 @@ test.describe('Node library sidebar V2', () => { await expect(tab.getNode('KSampler (Advanced)')).not.toBeVisible() await tab.searchInput.fill('KSampler') - await expect(tab.getNode('KSampler (Advanced)')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getNode('KSampler (Advanced)')).toBeVisible() await expect(tab.getNode('CLIPLoader')).not.toBeVisible() }) @@ -96,7 +94,7 @@ test.describe('Node library sidebar V2', () => { const contextMenu = comfyPage.page.getByRole('menuitem', { name: /Bookmark Node/ }) - await expect(contextMenu).toBeVisible({ timeout: 3000 }) + await expect(contextMenu).toBeVisible() }) test('Search clear restores folder view', async ({ comfyPage }) => { @@ -105,14 +103,12 @@ test.describe('Node library sidebar V2', () => { await expect(tab.getFolder('sampling')).toBeVisible() await tab.searchInput.fill('KSampler') - await expect(tab.getNode('KSampler (Advanced)')).toBeVisible({ - timeout: 5000 - }) + await expect(tab.getNode('KSampler (Advanced)')).toBeVisible() await tab.searchInput.clear() await tab.searchInput.press('Enter') - await expect(tab.getFolder('sampling')).toBeVisible({ timeout: 5000 }) + await expect(tab.getFolder('sampling')).toBeVisible() }) test('Sort dropdown shows sorting options', async ({ comfyPage }) => { @@ -122,7 +118,7 @@ test.describe('Node library sidebar V2', () => { // Reka UI DropdownMenuRadioItem renders with role="menuitemradio" const options = comfyPage.page.getByRole('menuitemradio') - await expect(options.first()).toBeVisible({ timeout: 3000 }) + await expect(options.first()).toBeVisible() await expect.poll(() => options.count()).toBeGreaterThanOrEqual(2) }) }) diff --git a/browser_tests/tests/sidebar/workflows.spec.ts b/browser_tests/tests/sidebar/workflows.spec.ts index d165927bc39..fc5c4088bb0 100644 --- a/browser_tests/tests/sidebar/workflows.spec.ts +++ b/browser_tests/tests/sidebar/workflows.spec.ts @@ -289,9 +289,7 @@ test.describe('Workflows sidebar', () => { ) await closeButton.click() await expect - .poll(() => comfyPage.menu.workflowsTab.getOpenedWorkflowNames(), { - timeout: 5000 - }) + .poll(() => comfyPage.menu.workflowsTab.getOpenedWorkflowNames()) .toEqual(['*Unsaved Workflow']) }) @@ -370,7 +368,7 @@ test.describe('Workflows sidebar', () => { // Wait for workflow to appear in Browse section after sync const workflowItem = comfyPage.menu.workflowsTab.getPersistedItem('workflow1') - await expect(workflowItem).toBeVisible({ timeout: 3000 }) + await expect(workflowItem).toBeVisible() const nodeCount = await comfyPage.nodeOps.getGraphNodesCount() diff --git a/browser_tests/tests/subgraph/subgraphNavigation.spec.ts b/browser_tests/tests/subgraph/subgraphNavigation.spec.ts index 928c7d1c15b..6fc0873f696 100644 --- a/browser_tests/tests/subgraph/subgraphNavigation.spec.ts +++ b/browser_tests/tests/subgraph/subgraphNavigation.spec.ts @@ -219,9 +219,7 @@ test.describe('Subgraph Navigation', { tag: ['@slow', '@subgraph'] }, () => { await subgraphNode.navigateIntoSubgraph() await expect - .poll(() => comfyPage.page.evaluate(hasVisibleNodeInViewport), { - timeout: 5_000 - }) + .poll(() => comfyPage.page.evaluate(hasVisibleNodeInViewport)) .toBe(true) }) @@ -237,9 +235,7 @@ test.describe('Subgraph Navigation', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.vueNodes.enterSubgraph('11') await expect - .poll(() => comfyPage.page.evaluate(hasVisibleNodeInViewport), { - timeout: 5_000 - }) + .poll(() => comfyPage.page.evaluate(hasVisibleNodeInViewport)) .toBe(true) }) @@ -263,13 +259,11 @@ test.describe('Subgraph Navigation', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.subgraph.exitViaBreadcrumb() await expect - .poll( - () => - comfyPage.page.evaluate(() => { - const ds = window.app!.canvas.ds - return { scale: ds.scale, offset: [...ds.offset] } - }), - { timeout: 5_000 } + .poll(() => + comfyPage.page.evaluate(() => { + const ds = window.app!.canvas.ds + return { scale: ds.scale, offset: [...ds.offset] } + }) ) .toEqual({ scale: expect.closeTo(rootViewport.scale, 2), @@ -314,12 +308,10 @@ test.describe('Subgraph Navigation', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect - .poll( - () => - comfyPage.page.evaluate((nodeId) => { - return window.app!.canvas.graph!.getNodeById(nodeId)!.progress - }, subgraphNodeId), - { timeout: 2_000 } + .poll(() => + comfyPage.page.evaluate((nodeId) => { + return window.app!.canvas.graph!.getNodeById(nodeId)!.progress + }, subgraphNodeId) ) .toBeUndefined() }) @@ -350,20 +342,18 @@ test.describe('Subgraph Navigation', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect - .poll( - () => - comfyPage.page.evaluate(() => { - const graph = window.app!.canvas.graph! - const subgraphNode = graph.nodes.find( - (node) => - typeof node.isSubgraphNode === 'function' && - node.isSubgraphNode() - ) - if (!subgraphNode) return { exists: false, progress: null } - - return { exists: true, progress: subgraphNode.progress } - }), - { timeout: 5_000 } + .poll(() => + comfyPage.page.evaluate(() => { + const graph = window.app!.canvas.graph! + const subgraphNode = graph.nodes.find( + (node) => + typeof node.isSubgraphNode === 'function' && + node.isSubgraphNode() + ) + if (!subgraphNode) return { exists: false, progress: null } + + return { exists: true, progress: subgraphNode.progress } + }) ) .toEqual({ exists: true, progress: undefined }) }) diff --git a/browser_tests/tests/subgraph/subgraphPromotion.spec.ts b/browser_tests/tests/subgraph/subgraphPromotion.spec.ts index e4d211b7f7f..dba5130e8dd 100644 --- a/browser_tests/tests/subgraph/subgraphPromotion.spec.ts +++ b/browser_tests/tests/subgraph/subgraphPromotion.spec.ts @@ -15,9 +15,7 @@ async function expectPromotedWidgetNamesToContain( widgetName: string ) { await expect - .poll(() => getPromotedWidgetNames(comfyPage, nodeId), { - timeout: 5000 - }) + .poll(() => getPromotedWidgetNames(comfyPage, nodeId)) .toContain(widgetName) } @@ -27,9 +25,7 @@ async function expectPromotedWidgetCountToBeGreaterThan( count: number ) { await expect - .poll(() => getPromotedWidgetCount(comfyPage, nodeId), { - timeout: 5000 - }) + .poll(() => getPromotedWidgetCount(comfyPage, nodeId)) .toBeGreaterThan(count) } @@ -288,9 +284,7 @@ test.describe( await comfyPage.subgraph.exitViaBreadcrumb() await expect - .poll(() => getPromotedWidgetCount(comfyPage, '2'), { - timeout: 5000 - }) + .poll(() => getPromotedWidgetCount(comfyPage, '2')) .toBeLessThan(initialWidgetCount) }) }) @@ -332,7 +326,7 @@ test.describe( .locator('.p-contextmenu') .locator('text=Promote Widget') - await expect(promoteEntry.first()).toBeVisible({ timeout: 5000 }) + await expect(promoteEntry.first()).toBeVisible() }) }) @@ -536,9 +530,7 @@ test.describe( expectedNames.splice(removedIndex, 1) await expect - .poll(() => getPromotedWidgetNames(comfyPage, '5'), { - timeout: 5000 - }) + .poll(() => getPromotedWidgetNames(comfyPage, '5')) .toEqual(expectedNames) }) @@ -553,9 +545,7 @@ test.describe( let initialWidgetCount = 0 await expect - .poll(() => getPromotedWidgetCount(comfyPage, '11'), { - timeout: 5000 - }) + .poll(() => getPromotedWidgetCount(comfyPage, '11')) .toBeGreaterThan(0) initialWidgetCount = await getPromotedWidgetCount(comfyPage, '11') @@ -571,9 +561,7 @@ test.describe( // Widget count should be reduced await expect - .poll(() => getPromotedWidgetCount(comfyPage, '11'), { - timeout: 5000 - }) + .poll(() => getPromotedWidgetCount(comfyPage, '11')) .toBeLessThan(initialWidgetCount) }) }) diff --git a/browser_tests/tests/subgraph/subgraphPromotionDom.spec.ts b/browser_tests/tests/subgraph/subgraphPromotionDom.spec.ts index e1b847bcc1a..5293b6b0231 100644 --- a/browser_tests/tests/subgraph/subgraphPromotionDom.spec.ts +++ b/browser_tests/tests/subgraph/subgraphPromotionDom.spec.ts @@ -22,13 +22,11 @@ async function openSubgraphById(comfyPage: ComfyPage, nodeId: string) { }, nodeId) await expect - .poll( - () => - comfyPage.page.evaluate(() => { - const graph = window.app!.canvas.graph - return !!graph && 'inputNode' in graph - }), - { timeout: 5_000 } + .poll(() => + comfyPage.page.evaluate(() => { + const graph = window.app!.canvas.graph + return !!graph && 'inputNode' in graph + }) ) .toBe(true) } @@ -149,7 +147,7 @@ test.describe('Subgraph Promotion DOM', { tag: ['@subgraph'] }, () => { ) const visibleWidgets = comfyPage.page.locator(VISIBLE_DOM_WIDGET_SELECTOR) - await expect(visibleWidgets).toHaveCount(2, { timeout: 5_000 }) + await expect(visibleWidgets).toHaveCount(2) const parentCount = await visibleWidgets.count() const subgraphNode = await comfyPage.nodeOps.getNodeRefById('11') diff --git a/browser_tests/tests/subgraph/subgraphSearch.spec.ts b/browser_tests/tests/subgraph/subgraphSearch.spec.ts index e9f1c44d6bd..cb8c7d7a107 100644 --- a/browser_tests/tests/subgraph/subgraphSearch.spec.ts +++ b/browser_tests/tests/subgraph/subgraphSearch.spec.ts @@ -23,7 +23,7 @@ async function exitSubgraphAndPublish( name: blueprintName }) - await expect(comfyPage.visibleToasts).toHaveCount(1, { timeout: 5_000 }) + await expect(comfyPage.visibleToasts).toHaveCount(1) await comfyPage.toast.closeToasts(1) } diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index 0ec7c99ed19..77c3a09ce9b 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -106,7 +106,7 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { await comfyPage.setup({ clearStorage: true }) // Expect the templates dialog to be shown - await expect(comfyPage.templates.content).toBeVisible({ timeout: 5000 }) + await expect(comfyPage.templates.content).toBeVisible() }) test('Uses proper locale files for templates', async ({ comfyPage }) => { @@ -305,7 +305,7 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { comfyPage.page.locator( '[data-testid="template-workflow-short-description"]' ) - ).toBeVisible({ timeout: 5000 }) + ).toBeVisible() // Verify all three cards with different descriptions are visible const shortDescCard = comfyPage.page.locator( @@ -399,7 +399,7 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { const taggedCard = comfyPage.page.getByTestId( TestIds.templates.workflowCard('tagged-template') ) - await expect(taggedCard).toBeVisible({ timeout: 5000 }) + await expect(taggedCard).toBeVisible() await expect(taggedCard.getByText('Relight')).toBeVisible() await expect(taggedCard.getByText('Image Edit')).toBeVisible() diff --git a/browser_tests/tests/topbar/workflowTabs.spec.ts b/browser_tests/tests/topbar/workflowTabs.spec.ts index 0509fa01b4d..a226562ebe6 100644 --- a/browser_tests/tests/topbar/workflowTabs.spec.ts +++ b/browser_tests/tests/topbar/workflowTabs.spec.ts @@ -67,7 +67,7 @@ test.describe('Workflow tabs', () => { const contextMenu = comfyPage.page.locator( '[role="menu"][data-state="open"]' ) - await expect(contextMenu).toBeVisible({ timeout: 5000 }) + await expect(contextMenu).toBeVisible() await expect( contextMenu.getByRole('menuitem', { name: /Close Tab/i }).first() @@ -89,7 +89,7 @@ test.describe('Workflow tabs', () => { const contextMenu = comfyPage.page.locator( '[role="menu"][data-state="open"]' ) - await expect(contextMenu).toBeVisible({ timeout: 5000 }) + await expect(contextMenu).toBeVisible() await contextMenu .getByRole('menuitem', { name: /Close Tab/i }) @@ -123,7 +123,7 @@ test.describe('Workflow tabs', () => { // WorkflowTab renders "•" when the workflow has unsaved changes const activeTab = topbar.getActiveTab() - await expect(activeTab.locator('text=•')).toBeVisible({ timeout: 5000 }) + await expect(activeTab.locator('text=•')).toBeVisible() }) test('Multiple tabs can be created, switched, and closed', async ({ diff --git a/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts b/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts index a56f6ebae37..29e34c3b7f6 100644 --- a/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts @@ -217,14 +217,12 @@ test.describe('Vue Node Context Menu', () => { if (!loadImageNode) throw new Error('Load Image node not found') await expect - .poll( - () => - comfyPage.page.evaluate( - (nodeId) => - window.app!.graph.getNodeById(nodeId)?.imgs?.length ?? 0, - loadImageNode.id - ), - { timeout: 5_000 } + .poll(() => + comfyPage.page.evaluate( + (nodeId) => + window.app!.graph.getNodeById(nodeId)?.imgs?.length ?? 0, + loadImageNode.id + ) ) .toBeGreaterThan(0) }) diff --git a/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts b/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts index 2539eed684b..d80d522c76b 100644 --- a/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/remove.spec.ts @@ -102,7 +102,7 @@ test.describe('Vue Nodes - Delete Key Interaction', () => { // Node count should remain the same await expect - .poll(() => comfyPage.nodeOps.getGraphNodesCount(), { timeout: 1000 }) + .poll(() => comfyPage.nodeOps.getGraphNodesCount()) .toBe(initialNodeCount) }) diff --git a/browser_tests/tests/widget.spec.ts b/browser_tests/tests/widget.spec.ts index f2ba4deb3ac..8faa9ec1976 100644 --- a/browser_tests/tests/widget.spec.ts +++ b/browser_tests/tests/widget.spec.ts @@ -132,9 +132,7 @@ test.describe('Slider widget', { tag: ['@screenshot', '@widget'] }, () => { await expect(comfyPage.canvas).toHaveScreenshot('slider_widget_dragged.png') await expect - .poll(() => comfyPage.page.evaluate(() => window.widgetValue), { - timeout: 2_000 - }) + .poll(() => comfyPage.page.evaluate(() => window.widgetValue)) .toBeDefined() }) }) @@ -156,9 +154,7 @@ test.describe('Number widget', { tag: ['@screenshot', '@widget'] }, () => { await expect(comfyPage.canvas).toHaveScreenshot('seed_widget_dragged.png') await expect - .poll(() => comfyPage.page.evaluate(() => window.widgetValue), { - timeout: 2_000 - }) + .poll(() => comfyPage.page.evaluate(() => window.widgetValue)) .toBeDefined() }) }) diff --git a/browser_tests/tests/workflowPersistence.spec.ts b/browser_tests/tests/workflowPersistence.spec.ts index 1150281b919..124836d151d 100644 --- a/browser_tests/tests/workflowPersistence.spec.ts +++ b/browser_tests/tests/workflowPersistence.spec.ts @@ -134,11 +134,7 @@ test.describe('Workflow Persistence', () => { await tab.switchToWorkflow('outputs-test') await comfyPage.workflow.waitForWorkflowIdle() - await expect - .poll(() => getNodeOutputImageCount(comfyPage, nodeId), { - timeout: 5_000 - }) - .toBe(1) + await expect.poll(() => getNodeOutputImageCount(comfyPage, nodeId)).toBe(1) }) test('Loading a new workflow cleanly replaces the previous graph', async ({ @@ -191,9 +187,7 @@ test.describe('Workflow Persistence', () => { await comfyPage.workflow.waitForWorkflowIdle() await expect - .poll(() => getWidgetValueSnapshot(comfyPage), { - timeout: 5_000 - }) + .poll(() => getWidgetValueSnapshot(comfyPage)) .toEqual(widgetValuesBefore) }) diff --git a/browser_tests/tests/workflowTabThumbnail.spec.ts b/browser_tests/tests/workflowTabThumbnail.spec.ts index 7e6aa57bb7a..ff2ab1a74bc 100644 --- a/browser_tests/tests/workflowTabThumbnail.spec.ts +++ b/browser_tests/tests/workflowTabThumbnail.spec.ts @@ -30,7 +30,7 @@ test.describe('Workflow Tab Thumbnails', { tag: '@workflow' }, () => { const popover = comfyPage.page.locator('.workflow-popover-fade') await expect(popover).toHaveCount(1) - await expect(popover).toBeVisible({ timeout: 500 }) + await expect(popover).toBeVisible() if (name) { await expect(popover).toContainText(name) } From 252f8eb3e5c320b721ed27e05dcff18b9fd5bb8b Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 01:36:11 -0700 Subject: [PATCH 02/14] fix: increase poll/toPass timeouts for CI flakes in settingsDialog and cloud-asset-default Amp-Thread-ID: https://ampcode.com/threads/T-019d7686-b4d9-700e-b24d-9e1b716dca1a Co-authored-by: Amp --- .../tests/cloud-asset-default.spec.ts | 21 +++++++++++-------- .../tests/dialogs/settingsDialog.spec.ts | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/browser_tests/tests/cloud-asset-default.spec.ts b/browser_tests/tests/cloud-asset-default.spec.ts index ff35fed9ef8..68e95946401 100644 --- a/browser_tests/tests/cloud-asset-default.spec.ts +++ b/browser_tests/tests/cloud-asset-default.spec.ts @@ -75,15 +75,18 @@ test.describe('Asset-supported node default value', { tag: '@cloud' }, () => { }) await expect - .poll(async () => { - return await comfyPage.page.evaluate((id) => { - const node = window.app!.graph.getNodeById(id) - const widget = node?.widgets?.find( - (w: { name: string }) => w.name === 'ckpt_name' - ) - return String(widget?.value ?? '') - }, nodeId) - }) + .poll( + async () => { + return await comfyPage.page.evaluate((id) => { + const node = window.app!.graph.getNodeById(id) + const widget = node?.widgets?.find( + (w: { name: string }) => w.name === 'ckpt_name' + ) + return String(widget?.value ?? '') + }, nodeId) + }, + { timeout: 10_000 } + ) .toBe(CLOUD_ASSETS[0].name) }) }) diff --git a/browser_tests/tests/dialogs/settingsDialog.spec.ts b/browser_tests/tests/dialogs/settingsDialog.spec.ts index 83a9ac0268f..a243569ecbd 100644 --- a/browser_tests/tests/dialogs/settingsDialog.spec.ts +++ b/browser_tests/tests/dialogs/settingsDialog.spec.ts @@ -153,7 +153,7 @@ test.describe('Settings dialog', { tag: '@ui' }, () => { const expanded = await select.getAttribute('aria-expanded') if (expanded !== 'true') await select.click() await expect(select).toHaveAttribute('aria-expanded', 'true') - }).toPass({ timeout: 3000 }) + }).toPass({ timeout: 5000 }) // Pick the option that is not the current value const targetValue = initialValue === 'Top' ? 'Disabled' : 'Top' From f26800f32d8faa588bb7abd5ee6442c2ce4de2c7 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 11:43:44 -0700 Subject: [PATCH 03/14] fix: use explicit uncollapse instead of toggle in interaction test The collapse() method toggles flags.collapsed, which is unreliable when DOM widget overlays interfere. Set flags.collapsed = false directly to deterministically expand the node. Amp-Thread-ID: https://ampcode.com/threads/T-019d78aa-fa43-711e-98b1-4a438120851d Co-authored-by: Amp --- browser_tests/tests/interaction.spec.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 4dc6358bfe2..708d98843ea 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -351,9 +351,16 @@ test.describe('Node Interaction', () => { await expect(comfyPage.canvas).toHaveScreenshot( 'text-encode-toggled-off.png' ) - await comfyPage.canvas.click({ - position: togglerPos - }) + // Re-expand: clicking the canvas toggler on a collapsed node is + // unreliable because DOM widget overlays may intercept the pointer + // event. Explicitly set collapsed = false instead of toggling. + // TODO(#11006): Restore click-to-expand once DOM widget overlay pointer interception is fixed + await comfyPage.page.evaluate((nodeId) => { + const node = window.app!.graph.getNodeById(nodeId)! + node.flags.collapsed = false + node.setDirtyCanvas(true, true) + }, targetNode.id) + await comfyPage.nextFrame() await expect.poll(() => targetNode.isCollapsed()).toBe(false) // Move mouse away to avoid hover highlight differences. await comfyPage.canvasOps.moveMouseToEmptyArea() From 3d71c83ad5ec88a7b45bec73bd30b41c198c3d97 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:31:26 -0700 Subject: [PATCH 04/14] fix: wait for double-click window to expire before re-expanding node Two rapid clicks at the same canvas position within 300ms are treated as a double-click by CanvasPointer, firing onDoubleClick instead of onClick (which toggles collapse). Poll until the double-click window has expired before the second click. Amp-Thread-ID: https://ampcode.com/threads/T-019d78aa-fa43-711e-98b1-4a438120851d Co-authored-by: Amp --- browser_tests/tests/interaction.spec.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 708d98843ea..055a5918b57 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -351,16 +351,20 @@ test.describe('Node Interaction', () => { await expect(comfyPage.canvas).toHaveScreenshot( 'text-encode-toggled-off.png' ) - // Re-expand: clicking the canvas toggler on a collapsed node is - // unreliable because DOM widget overlays may intercept the pointer - // event. Explicitly set collapsed = false instead of toggling. - // TODO(#11006): Restore click-to-expand once DOM widget overlay pointer interception is fixed - await comfyPage.page.evaluate((nodeId) => { - const node = window.app!.graph.getNodeById(nodeId)! - node.flags.collapsed = false - node.setDirtyCanvas(true, true) - }, targetNode.id) - await comfyPage.nextFrame() + // Wait for the double-click window (300ms) to expire so the next + // click at the same position isn't interpreted as a double-click. + await expect + .poll(() => + comfyPage.page.evaluate(() => { + const pointer = window.app!.canvas.pointer + if (!pointer.eLastDown) return true + return performance.now() - pointer.eLastDown.timeStamp > 300 + }) + ) + .toBe(true) + await comfyPage.canvas.click({ + position: togglerPos + }) await expect.poll(() => targetNode.isCollapsed()).toBe(false) // Move mouse away to avoid hover highlight differences. await comfyPage.canvasOps.moveMouseToEmptyArea() From 5911eaccb00e3d9875fdbae590d5ad2cbf818e37 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:01:00 -0700 Subject: [PATCH 05/14] feat: add eslint-plugin-playwright via oxlint JS plugins Add eslint-plugin-playwright as an oxlint JS plugin scoped to browser_tests/ via override. Enables 20 rules (18 recommended + 2 extras) at error severity, enforcing Playwright best practices at lint time. - Install eslint-plugin-playwright, configure in .oxlintrc.json jsPlugins - Add assertFunctionNames/Patterns config for expect-expect - Replace deprecated page methods with locator equivalents - Replace waitForSelector with locator.waitFor - Add timeout to all .toPass() calls - Fix broken prefer-native-locators auto-fix on compound selectors - Update lint scripts to target browser_tests/ - no-force-option set to off (dedicated triage PR needed) Amp-Thread-ID: https://ampcode.com/threads/T-019d792e-231e-735a-aa13-91f4404fd726 Co-authored-by: Amp --- .oxlintrc.json | 43 ++++++++++++++- browser_tests/fixtures/ComfyPage.ts | 4 +- browser_tests/fixtures/VueNodeHelpers.ts | 4 +- .../fixtures/components/SettingDialog.ts | 2 +- .../fixtures/components/SidebarTab.ts | 10 ++-- .../fixtures/helpers/AppModeHelper.ts | 2 +- .../fixtures/helpers/SubgraphHelper.ts | 2 +- .../fixtures/utils/vueNodeFixtures.ts | 6 +-- .../tests/bottomPanelShortcuts.spec.ts | 4 +- browser_tests/tests/dialog.spec.ts | 13 ++--- browser_tests/tests/featureFlags.spec.ts | 14 ++--- browser_tests/tests/graph.spec.ts | 2 +- browser_tests/tests/groupNode.spec.ts | 6 ++- browser_tests/tests/imageCompare.spec.ts | 4 +- browser_tests/tests/interaction.spec.ts | 4 +- browser_tests/tests/jobHistoryActions.spec.ts | 18 +++---- browser_tests/tests/linearMode.spec.ts | 22 +++----- .../tests/nodeContextMenuOverflow.spec.ts | 4 +- browser_tests/tests/nodeDisplay.spec.ts | 5 ++ .../tests/nodeSearchBoxV2Extended.spec.ts | 4 +- browser_tests/tests/performance.spec.ts | 1 + .../tests/releaseNotifications.spec.ts | 4 +- browser_tests/tests/resultGallery.spec.ts | 2 +- browser_tests/tests/rightClickMenu.spec.ts | 12 ++--- browser_tests/tests/selectionToolbox.spec.ts | 3 +- .../tests/selectionToolboxActions.spec.ts | 4 +- .../tests/selectionToolboxSubmenus.spec.ts | 8 ++- browser_tests/tests/sidebar/assets.spec.ts | 1 + .../tests/sidebar/nodeLibrary.spec.ts | 14 +++-- .../subgraph/subgraphDraftPositions.spec.ts | 2 +- .../tests/subgraph/subgraphPromotion.spec.ts | 4 +- .../tests/subgraph/subgraphSlots.spec.ts | 54 ++++++++++++------- browser_tests/tests/templates.spec.ts | 24 ++++----- .../tests/topbar/workflowTabs.spec.ts | 12 ++--- .../text/multilineStringWidget.spec.ts | 1 + .../vueNodes/widgets/widgetReactivity.spec.ts | 2 + browser_tests/tests/widget.spec.ts | 1 + package.json | 11 ++-- pnpm-lock.yaml | 23 ++++++++ pnpm-workspace.yaml | 3 +- 40 files changed, 218 insertions(+), 141 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 64bb9e86ca7..239d0c0e976 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -116,13 +116,54 @@ }, { "files": ["browser_tests/**/*.ts"], + "jsPlugins": ["eslint-plugin-playwright"], "rules": { "typescript/no-explicit-any": "error", "no-async-promise-executor": "error", "no-control-regex": "error", "no-useless-rename": "error", "no-unused-private-class-members": "error", - "unicorn/no-empty-file": "error" + "unicorn/no-empty-file": "error", + "playwright/consistent-spacing-between-blocks": "error", + "playwright/expect-expect": [ + "error", + { + "assertFunctionNames": [ + "recordMeasurement", + "logMeasurement", + "builderSaveAs" + ], + "assertFunctionPatterns": [ + "^expect", + "^assert", + "^verify", + "^searchAndExpect", + "waitForOpen", + "waitForClosed", + "waitForRequest" + ] + } + ], + "playwright/max-nested-describe": "error", + "playwright/no-duplicate-hooks": "error", + "playwright/no-element-handle": "error", + "playwright/no-eval": "error", + // TODO: Enable in a dedicated PR — requires triaging 28 violations + // (canvas overlay workarounds vs. unnecessary force usage) + "playwright/no-force-option": "off", + "playwright/no-networkidle": "error", + "playwright/no-page-pause": "error", + "playwright/no-useless-await": "error", + "playwright/no-wait-for-navigation": "error", + "playwright/no-wait-for-selector": "error", + "playwright/no-wait-for-timeout": "error", + "playwright/prefer-hooks-on-top": "error", + "playwright/prefer-locator": "error", + "playwright/prefer-to-have-count": "error", + "playwright/prefer-to-have-length": "error", + "playwright/prefer-web-first-assertions": "error", + "playwright/prefer-native-locators": "error", + "playwright/require-to-pass-timeout": "error" } } ] diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index 91dc27f74d4..60e9efbcd5e 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -325,7 +325,7 @@ export class ComfyPage { // window.app.extensionManager => GraphView ready window.app && window.app.extensionManager ) - await this.page.waitForSelector('.p-blockui-mask', { state: 'hidden' }) + await this.page.locator('.p-blockui-mask').waitFor({ state: 'hidden' }) await this.nextFrame() } @@ -375,7 +375,7 @@ export class ComfyPage { } async closeMenu() { - await this.page.click('button.comfy-close-menu-btn') + await this.page.locator('button.comfy-close-menu-btn').click() await this.nextFrame() } diff --git a/browser_tests/fixtures/VueNodeHelpers.ts b/browser_tests/fixtures/VueNodeHelpers.ts index a15336ff280..b20e91f8506 100644 --- a/browser_tests/fixtures/VueNodeHelpers.ts +++ b/browser_tests/fixtures/VueNodeHelpers.ts @@ -37,7 +37,7 @@ export class VueNodeHelpers { */ getNodeByTitle(title: string): Locator { return this.page.locator('[data-node-id]').filter({ - has: this.page.locator('[data-testid="node-title"]', { hasText: title }) + has: this.page.getByTestId('node-title').filter({ hasText: title }) }) } @@ -146,7 +146,7 @@ export class VueNodeHelpers { expectedCount ) } else { - await this.page.waitForSelector('[data-node-id]') + await this.page.locator('[data-node-id]').waitFor() } } diff --git a/browser_tests/fixtures/components/SettingDialog.ts b/browser_tests/fixtures/components/SettingDialog.ts index d5551558863..faf7925f6ea 100644 --- a/browser_tests/fixtures/components/SettingDialog.ts +++ b/browser_tests/fixtures/components/SettingDialog.ts @@ -57,6 +57,6 @@ export class SettingDialog extends BaseDialog { name: 'About' }) await aboutButton.click() - await this.page.waitForSelector('.about-container') + await this.page.locator('.about-container').waitFor() } } diff --git a/browser_tests/fixtures/components/SidebarTab.ts b/browser_tests/fixtures/components/SidebarTab.ts index 031442c8192..c94a922a376 100644 --- a/browser_tests/fixtures/components/SidebarTab.ts +++ b/browser_tests/fixtures/components/SidebarTab.ts @@ -340,13 +340,15 @@ export class AssetsSidebarTab extends SidebarTab { // --- Asset cards --- get assetCards() { - return this.page.locator('[role="button"][data-selected]') + return this.page + .getByRole('button') + .and(this.page.locator('[data-selected]')) } getAssetCardByName(name: string) { - return this.page.locator('[role="button"][data-selected]', { - hasText: name - }) + return this.page + .getByRole('button', { name }) + .and(this.page.locator('[data-selected]')) } get selectedCards() { diff --git a/browser_tests/fixtures/helpers/AppModeHelper.ts b/browser_tests/fixtures/helpers/AppModeHelper.ts index dabb7f5787e..ba5402f9832 100644 --- a/browser_tests/fixtures/helpers/AppModeHelper.ts +++ b/browser_tests/fixtures/helpers/AppModeHelper.ts @@ -105,7 +105,7 @@ export class AppModeHelper { /** The linear-mode widget list container (visible in app mode). */ get linearWidgets(): Locator { - return this.page.locator('[data-testid="linear-widgets"]') + return this.page.getByTestId('linear-widgets') } /** The PrimeVue Popover for the image picker (renders with role="dialog"). */ diff --git a/browser_tests/fixtures/helpers/SubgraphHelper.ts b/browser_tests/fixtures/helpers/SubgraphHelper.ts index 2befe7838b9..5a5e1780f03 100644 --- a/browser_tests/fixtures/helpers/SubgraphHelper.ts +++ b/browser_tests/fixtures/helpers/SubgraphHelper.ts @@ -157,7 +157,7 @@ export class SubgraphHelper { // Wait for the appropriate UI element to appear if (action === 'rightClick') { - await this.page.waitForSelector('.litemenu-entry', { + await this.page.locator('.litemenu-entry').waitFor({ state: 'visible', timeout: 5000 }) diff --git a/browser_tests/fixtures/utils/vueNodeFixtures.ts b/browser_tests/fixtures/utils/vueNodeFixtures.ts index 1a414d88f65..26e1c38c4bb 100644 --- a/browser_tests/fixtures/utils/vueNodeFixtures.ts +++ b/browser_tests/fixtures/utils/vueNodeFixtures.ts @@ -11,11 +11,11 @@ export class VueNodeFixture { } get title(): Locator { - return this.locator.locator('[data-testid="node-title"]') + return this.locator.getByTestId('node-title') } get titleInput(): Locator { - return this.locator.locator('[data-testid="node-title-input"]') + return this.locator.getByTestId('node-title-input') } get body(): Locator { @@ -27,7 +27,7 @@ export class VueNodeFixture { } get collapseButton(): Locator { - return this.locator.locator('[data-testid="node-collapse-button"]') + return this.locator.getByTestId('node-collapse-button') } get collapseIcon(): Locator { diff --git a/browser_tests/tests/bottomPanelShortcuts.spec.ts b/browser_tests/tests/bottomPanelShortcuts.spec.ts index f948c9a13c2..e01ed713413 100644 --- a/browser_tests/tests/bottomPanelShortcuts.spec.ts +++ b/browser_tests/tests/bottomPanelShortcuts.spec.ts @@ -192,9 +192,7 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { await bottomPanel.keyboardShortcutsButton.click() - await expect( - comfyPage.page.locator('[data-testid="shortcuts-columns"]') - ).toBeVisible() + await expect(comfyPage.page.getByTestId('shortcuts-columns')).toBeVisible() const subcategoryTitles = bottomPanel.shortcuts.subcategoryTitles await expect.poll(() => subcategoryTitles.count()).toBeGreaterThanOrEqual(2) diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index fb7a32e0917..33858182656 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -11,9 +11,7 @@ test.beforeEach(async ({ comfyPage }) => { test.describe('Settings', () => { test('@mobile Should be visible on mobile', async ({ comfyPage }) => { await comfyPage.page.keyboard.press('Control+,') - const settingsDialog = comfyPage.page.locator( - '[data-testid="settings-dialog"]' - ) + const settingsDialog = comfyPage.page.getByTestId('settings-dialog') await expect(settingsDialog).toBeVisible() const contentArea = settingsDialog.locator('main') await expect(contentArea).toBeVisible() @@ -26,9 +24,7 @@ test.describe('Settings', () => { await comfyPage.page.keyboard.down('ControlOrMeta') await comfyPage.page.keyboard.press(',') await comfyPage.page.keyboard.up('ControlOrMeta') - const settingsLocator = comfyPage.page.locator( - '[data-testid="settings-dialog"]' - ) + const settingsLocator = comfyPage.page.getByTestId('settings-dialog') await expect(settingsLocator).toBeVisible() await comfyPage.page.keyboard.press('Escape') await expect(settingsLocator).not.toBeVisible() @@ -37,6 +33,7 @@ test.describe('Settings', () => { test('Can change canvas zoom speed setting', async ({ comfyPage }) => { const maxSpeed = 2.5 await comfyPage.settings.setSetting('Comfy.Graph.ZoomSpeed', maxSpeed) + await test.step('Setting should persist', async () => { await expect .poll(() => comfyPage.settings.getSetting('Comfy.Graph.ZoomSpeed')) @@ -49,9 +46,7 @@ test.describe('Settings', () => { await comfyPage.page.keyboard.press('Control+,') // Open the keybinding tab - const settingsDialog = comfyPage.page.locator( - '[data-testid="settings-dialog"]' - ) + const settingsDialog = comfyPage.page.getByTestId('settings-dialog') await expect(settingsDialog).toBeVisible() await settingsDialog .locator('nav [role="button"]', { hasText: 'Keybinding' }) diff --git a/browser_tests/tests/featureFlags.spec.ts b/browser_tests/tests/featureFlags.spec.ts index 595754e1ad3..bea1875aea9 100644 --- a/browser_tests/tests/featureFlags.spec.ts +++ b/browser_tests/tests/featureFlags.spec.ts @@ -69,7 +69,7 @@ test.describe('Feature Flags', { tag: ['@slow', '@settings'] }, () => { expect(flags?.data).not.toBeNull() expect(flags?.data).toHaveProperty('supports_preview_metadata') expect(typeof flags?.data?.supports_preview_metadata).toBe('boolean') - }).toPass() + }).toPass({ timeout: 5000 }) // Verify server sent feature flags back await expect(async () => { @@ -82,7 +82,7 @@ test.describe('Feature Flags', { tag: ['@slow', '@settings'] }, () => { expect(flags).toHaveProperty('max_upload_size') expect(typeof flags?.max_upload_size).toBe('number') expect(Object.keys(flags ?? {}).length).toBeGreaterThan(0) - }).toPass() + }).toPass({ timeout: 5000 }) await newPage.close() }) @@ -102,7 +102,7 @@ test.describe('Feature Flags', { tag: ['@slow', '@settings'] }, () => { expect(typeof flags.supports_preview_metadata).toBe('boolean') expect(flags).toHaveProperty('max_upload_size') expect(typeof flags.max_upload_size).toBe('number') - }).toPass() + }).toPass({ timeout: 5000 }) }) test('serverSupportsFeature method works with real backend flags', async ({ @@ -182,7 +182,7 @@ test.describe('Feature Flags', { tag: ['@slow', '@settings'] }, () => { ) expect(typeof maxUpload).toBe('number') expect(maxUpload as number).toBeGreaterThan(0) - }).toPass() + }).toPass({ timeout: 5000 }) // Test getServerFeature with default value for non-existent feature await expect @@ -210,7 +210,7 @@ test.describe('Feature Flags', { tag: ['@slow', '@settings'] }, () => { expect(typeof features.supports_preview_metadata).toBe('boolean') expect(features).toHaveProperty('max_upload_size') expect(Object.keys(features).length).toBeGreaterThan(0) - }).toPass() + }).toPass({ timeout: 5000 }) }) test('Client feature flags are immutable', async ({ comfyPage }) => { @@ -348,14 +348,14 @@ test.describe('Feature Flags', { tag: ['@slow', '@settings'] }, () => { expect(flags).toHaveProperty('supports_preview_metadata') expect(typeof flags?.supports_preview_metadata).toBe('boolean') expect(flags).toHaveProperty('max_upload_size') - }).toPass() + }).toPass({ timeout: 5000 }) // Verify feature flags were received and API was initialized await expect(async () => { const readiness = await newPage.evaluate(() => window.__appReadiness) expect(readiness?.featureFlagsReceived).toBe(true) expect(readiness?.apiInitialized).toBe(true) - }).toPass() + }).toPass({ timeout: 5000 }) await newPage.close() }) diff --git a/browser_tests/tests/graph.spec.ts b/browser_tests/tests/graph.spec.ts index a3dfa7dd565..1a1db16a377 100644 --- a/browser_tests/tests/graph.spec.ts +++ b/browser_tests/tests/graph.spec.ts @@ -109,6 +109,6 @@ test.describe('Graph', { tag: ['@smoke', '@canvas'] }, () => { expect(r.switchOutputLinkIds).toEqual( expect.arrayContaining([r.cfg85LinkId, r.cfg86LinkId]) ) - }).toPass() + }).toPass({ timeout: 5000 }) }) }) diff --git a/browser_tests/tests/groupNode.spec.ts b/browser_tests/tests/groupNode.spec.ts index 1548ab9de86..8b271a777c2 100644 --- a/browser_tests/tests/groupNode.spec.ts +++ b/browser_tests/tests/groupNode.spec.ts @@ -88,7 +88,9 @@ test.describe('Group Node', { tag: '@node' }, () => { .getNode(groupNodeName) .locator('.bookmark-button') .click() - await comfyPage.page.hover('.p-tree-node-label.tree-explorer-node-label') + await comfyPage.page + .locator('.p-tree-node-label.tree-explorer-node-label') + .hover() await expect( comfyPage.page.locator('.node-lib-node-preview') ).toBeVisible() @@ -99,6 +101,7 @@ test.describe('Group Node', { tag: '@node' }, () => { .click() }) }) + test( 'Can be added to canvas using search', { tag: '@screenshot' }, @@ -349,6 +352,7 @@ test.describe('Group Node', { tag: '@node' }, () => { await comfyPage.page.keyboard.press('Alt+g') await expect(comfyPage.toast.visibleToasts).toHaveCount(1) }) + test('Convert to group node, selected 1 node', async ({ comfyPage }) => { await expect(comfyPage.toast.visibleToasts).toHaveCount(0) await comfyPage.canvas.click({ diff --git a/browser_tests/tests/imageCompare.spec.ts b/browser_tests/tests/imageCompare.spec.ts index 3cac1d0b022..909486ba7f2 100644 --- a/browser_tests/tests/imageCompare.spec.ts +++ b/browser_tests/tests/imageCompare.spec.ts @@ -46,7 +46,7 @@ test.describe('Image Compare', () => { await expect(node).toContainText('No images to compare') await expect(node.locator('img')).toHaveCount(0) - await expect(node.locator('[role="presentation"]')).toHaveCount(0) + await expect(node.getByRole('presentation')).toHaveCount(0) } ) @@ -67,7 +67,7 @@ test.describe('Image Compare', () => { await expect(beforeImg).toBeVisible() await expect(afterImg).toBeVisible() - const handle = node.locator('[role="presentation"]') + const handle = node.getByRole('presentation') await expect(handle).toBeVisible() expect( diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 055a5918b57..5e6ce708617 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -1252,7 +1252,7 @@ test.describe('Canvas Navigation', { tag: '@screenshot' }, () => { test('Space + left-click drag should pan canvas', async ({ comfyPage }) => { // Click canvas to focus it - await comfyPage.page.click('canvas') + await comfyPage.page.locator('canvas').click() await comfyPage.nextFrame() await comfyPage.page.keyboard.down('Space') @@ -1321,7 +1321,7 @@ test.describe('Canvas Navigation', { tag: '@screenshot' }, () => { 'panning' ) - await comfyPage.page.click('canvas') + await comfyPage.page.locator('canvas').click() await comfyPage.nextFrame() await expect(comfyPage.canvas).toHaveScreenshot('standard-initial.png') diff --git a/browser_tests/tests/jobHistoryActions.spec.ts b/browser_tests/tests/jobHistoryActions.spec.ts index 336a30495b0..3d7ab67265c 100644 --- a/browser_tests/tests/jobHistoryActions.spec.ts +++ b/browser_tests/tests/jobHistoryActions.spec.ts @@ -25,7 +25,7 @@ test.describe('Job History Actions', { tag: '@ui' }, () => { await openMoreOptionsPopover(comfyPage) await expect( - comfyPage.page.locator('[data-testid="docked-job-history-action"]') + comfyPage.page.getByTestId('docked-job-history-action') ).toBeVisible() }) @@ -34,9 +34,7 @@ test.describe('Job History Actions', { tag: '@ui' }, () => { }) => { await openMoreOptionsPopover(comfyPage) - const action = comfyPage.page.locator( - '[data-testid="docked-job-history-action"]' - ) + const action = comfyPage.page.getByTestId('docked-job-history-action') await expect(action).toBeVisible() await expect(action).not.toBeEmpty() }) @@ -45,7 +43,7 @@ test.describe('Job History Actions', { tag: '@ui' }, () => { await openMoreOptionsPopover(comfyPage) await expect( - comfyPage.page.locator('[data-testid="show-run-progress-bar-action"]') + comfyPage.page.getByTestId('show-run-progress-bar-action') ).toBeVisible() }) @@ -53,16 +51,14 @@ test.describe('Job History Actions', { tag: '@ui' }, () => { await openMoreOptionsPopover(comfyPage) await expect( - comfyPage.page.locator('[data-testid="clear-history-action"]') + comfyPage.page.getByTestId('clear-history-action') ).toBeVisible() }) test('Clicking docked job history closes popover', async ({ comfyPage }) => { await openMoreOptionsPopover(comfyPage) - const action = comfyPage.page.locator( - '[data-testid="docked-job-history-action"]' - ) + const action = comfyPage.page.getByTestId('docked-job-history-action') await expect(action).toBeVisible() await action.click() @@ -78,9 +74,7 @@ test.describe('Job History Actions', { tag: '@ui' }, () => { await openMoreOptionsPopover(comfyPage) - const action = comfyPage.page.locator( - '[data-testid="show-run-progress-bar-action"]' - ) + const action = comfyPage.page.getByTestId('show-run-progress-bar-action') await action.click() await expect diff --git a/browser_tests/tests/linearMode.spec.ts b/browser_tests/tests/linearMode.spec.ts index 909eb77f08f..0324e57746b 100644 --- a/browser_tests/tests/linearMode.spec.ts +++ b/browser_tests/tests/linearMode.spec.ts @@ -14,48 +14,38 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { }) => { await comfyPage.appMode.enterAppModeWithInputs([]) - await expect( - comfyPage.page.locator('[data-testid="linear-widgets"]') - ).toBeVisible() + await expect(comfyPage.page.getByTestId('linear-widgets')).toBeVisible() }) test('Run button visible in linear mode', async ({ comfyPage }) => { await comfyPage.appMode.enterAppModeWithInputs([]) - await expect( - comfyPage.page.locator('[data-testid="linear-run-button"]') - ).toBeVisible() + await expect(comfyPage.page.getByTestId('linear-run-button')).toBeVisible() }) test('Workflow info section visible', async ({ comfyPage }) => { await comfyPage.appMode.enterAppModeWithInputs([]) await expect( - comfyPage.page.locator('[data-testid="linear-workflow-info"]') + comfyPage.page.getByTestId('linear-workflow-info') ).toBeVisible() }) test('Returns to graph mode', async ({ comfyPage }) => { await comfyPage.appMode.enterAppModeWithInputs([]) - await expect( - comfyPage.page.locator('[data-testid="linear-widgets"]') - ).toBeVisible() + await expect(comfyPage.page.getByTestId('linear-widgets')).toBeVisible() await comfyPage.appMode.toggleAppMode() await expect(comfyPage.canvas).toBeVisible() - await expect( - comfyPage.page.locator('[data-testid="linear-widgets"]') - ).not.toBeVisible() + await expect(comfyPage.page.getByTestId('linear-widgets')).not.toBeVisible() }) test('Canvas not visible in app mode', async ({ comfyPage }) => { await comfyPage.appMode.enterAppModeWithInputs([]) - await expect( - comfyPage.page.locator('[data-testid="linear-widgets"]') - ).toBeVisible() + await expect(comfyPage.page.getByTestId('linear-widgets')).toBeVisible() await expect(comfyPage.canvas).not.toBeVisible() }) }) diff --git a/browser_tests/tests/nodeContextMenuOverflow.spec.ts b/browser_tests/tests/nodeContextMenuOverflow.spec.ts index 605c0913856..081290bcb13 100644 --- a/browser_tests/tests/nodeContextMenuOverflow.spec.ts +++ b/browser_tests/tests/nodeContextMenuOverflow.spec.ts @@ -39,9 +39,7 @@ test.describe( await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible() - const moreOptionsBtn = comfyPage.page.locator( - '[data-testid="more-options-button"]' - ) + const moreOptionsBtn = comfyPage.page.getByTestId('more-options-button') await expect(moreOptionsBtn).toBeVisible() await moreOptionsBtn.click() await comfyPage.nextFrame() diff --git a/browser_tests/tests/nodeDisplay.spec.ts b/browser_tests/tests/nodeDisplay.spec.ts index a535d143e83..b2ab74c92ba 100644 --- a/browser_tests/tests/nodeDisplay.spec.ts +++ b/browser_tests/tests/nodeDisplay.spec.ts @@ -47,6 +47,7 @@ test.describe('Optional input', { tag: ['@screenshot', '@node'] }, () => { 1 ) }) + test('Old workflow with converted input', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow('inputs/old_workflow_converted_input') const node = await comfyPage.nodeOps.getNodeRefById('1') @@ -62,6 +63,7 @@ test.describe('Optional input', { tag: ['@screenshot', '@node'] }, () => { expect(vaeInput!.link).toBeNull() expect(convertedInput!.link).not.toBeNull() }) + test('Renamed converted input', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow('inputs/renamed_converted_widget') const node = await comfyPage.nodeOps.getNodeRefById('3') @@ -69,10 +71,12 @@ test.describe('Optional input', { tag: ['@screenshot', '@node'] }, () => { const renamedInput = inputs.find((w) => w.name === 'breadth') expect(renamedInput).toBeUndefined() }) + test('slider', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow('inputs/simple_slider') await expect(comfyPage.canvas).toHaveScreenshot('simple_slider.png') }) + test('unknown converted widget', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow( 'missing/missing_nodes_converted_widget' @@ -81,6 +85,7 @@ test.describe('Optional input', { tag: ['@screenshot', '@node'] }, () => { 'missing_nodes_converted_widget.png' ) }) + test('dynamically added input', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow('inputs/dynamically_added_input') await expect(comfyPage.canvas).toHaveScreenshot( diff --git a/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts b/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts index b76bac2ed2f..f77b54e8c78 100644 --- a/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts +++ b/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts @@ -104,9 +104,7 @@ test.describe('Node search box V2 extended', { tag: '@node' }, () => { .click() // Verify filter chip appeared and results changed - const filterChip = searchBoxV2.dialog.locator( - '[data-testid="filter-chip"]' - ) + const filterChip = searchBoxV2.dialog.getByTestId('filter-chip') await expect(filterChip).toBeVisible() await expect(searchBoxV2.results.first()).toBeVisible() await expect diff --git a/browser_tests/tests/performance.spec.ts b/browser_tests/tests/performance.spec.ts index a593eda2bf1..10a0ac8fb4b 100644 --- a/browser_tests/tests/performance.spec.ts +++ b/browser_tests/tests/performance.spec.ts @@ -202,6 +202,7 @@ test.describe('Performance', { tag: ['@perf'] }, () => { 'domNodes' ]) }) + test('subgraph DOM widget clipping during node selection', async ({ comfyPage }) => { diff --git a/browser_tests/tests/releaseNotifications.spec.ts b/browser_tests/tests/releaseNotifications.spec.ts index 1be225477ba..fdfaf897313 100644 --- a/browser_tests/tests/releaseNotifications.spec.ts +++ b/browser_tests/tests/releaseNotifications.spec.ts @@ -72,7 +72,7 @@ test.describe('Release Notifications', () => { ).toBeVisible() // Close help center by dismissable mask - await comfyPage.page.click('.help-center-backdrop') + await comfyPage.page.locator('.help-center-backdrop').click() await expect(helpMenu).not.toBeVisible() }) @@ -325,7 +325,7 @@ test.describe('Release Notifications', () => { await expect(whatsNewSection).toBeVisible() // Close help center - await comfyPage.page.click('.help-center-backdrop') + await comfyPage.page.locator('.help-center-backdrop').click() // Disable notifications await comfyPage.settings.setSetting( diff --git a/browser_tests/tests/resultGallery.spec.ts b/browser_tests/tests/resultGallery.spec.ts index b2a9cb3e2d4..d991c7eef05 100644 --- a/browser_tests/tests/resultGallery.spec.ts +++ b/browser_tests/tests/resultGallery.spec.ts @@ -31,7 +31,7 @@ test.describe('MediaLightbox', { tag: ['@slow'] }, () => { // Wait for any asset card to appear (may contain img or video) const assetCard = comfyPage.page - .locator('[role="button"]') + .getByRole('button') .filter({ has: comfyPage.page.locator('img, video') }) .first() diff --git a/browser_tests/tests/rightClickMenu.spec.ts b/browser_tests/tests/rightClickMenu.spec.ts index 6f379b85b47..ca5b0f54415 100644 --- a/browser_tests/tests/rightClickMenu.spec.ts +++ b/browser_tests/tests/rightClickMenu.spec.ts @@ -135,7 +135,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => { await comfyPage.page.mouse.move(10, 10) await comfyPage.nextFrame() await expect(comfyPage.canvas).toHaveScreenshot('right-click-node.png') - await comfyPage.page.click('.litemenu-entry:has-text("Pin")') + await comfyPage.page.locator('.litemenu-entry:has-text("Pin")').click() await comfyPage.contextMenu.waitForHidden() await comfyPage.nextFrame() @@ -153,7 +153,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => { await expect(comfyPage.canvas).toHaveScreenshot( 'right-click-pinned-node.png' ) - await comfyPage.page.click('.litemenu-entry:has-text("Unpin")') + await comfyPage.page.locator('.litemenu-entry:has-text("Unpin")').click() await comfyPage.contextMenu.waitForHidden() await comfyPage.canvas.click({ position: DefaultGraphPositions.emptyLatentWidgetClick, @@ -173,7 +173,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => { }) await comfyPage.page.mouse.move(10, 10) await comfyPage.nextFrame() - await comfyPage.page.click('.litemenu-entry:has-text("Pin")') + await comfyPage.page.locator('.litemenu-entry:has-text("Pin")').click() await comfyPage.contextMenu.waitForHidden() await comfyPage.canvas.click({ position: DefaultGraphPositions.emptyLatentWidgetClick, @@ -181,7 +181,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => { }) await comfyPage.page.mouse.move(10, 10) await comfyPage.nextFrame() - await comfyPage.page.click('.litemenu-entry:has-text("Unpin")') + await comfyPage.page.locator('.litemenu-entry:has-text("Unpin")').click() await comfyPage.contextMenu.waitForHidden() await comfyPage.nextFrame() @@ -203,7 +203,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => { }) await comfyPage.page.mouse.move(10, 10) await comfyPage.nextFrame() - await comfyPage.page.click('.litemenu-entry:has-text("Pin")') + await comfyPage.page.locator('.litemenu-entry:has-text("Pin")').click() await comfyPage.page.keyboard.up('Control') await comfyPage.contextMenu.waitForHidden() await comfyPage.nextFrame() @@ -214,7 +214,7 @@ test.describe('Node Right Click Menu', { tag: ['@screenshot', '@ui'] }, () => { }) await comfyPage.page.mouse.move(10, 10) await comfyPage.nextFrame() - await comfyPage.page.click('.litemenu-entry:has-text("Unpin")') + await comfyPage.page.locator('.litemenu-entry:has-text("Unpin")').click() await comfyPage.contextMenu.waitForHidden() await comfyPage.nextFrame() await expect(comfyPage.canvas).toHaveScreenshot( diff --git a/browser_tests/tests/selectionToolbox.spec.ts b/browser_tests/tests/selectionToolbox.spec.ts index 3708a7db95d..380c2de3993 100644 --- a/browser_tests/tests/selectionToolbox.spec.ts +++ b/browser_tests/tests/selectionToolbox.spec.ts @@ -9,6 +9,7 @@ const test = comfyPageFixture test.beforeEach(async ({ comfyPage }) => { await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Disabled') }) + const BLUE_COLOR = 'rgb(51, 51, 85)' const RED_COLOR = 'rgb(85, 51, 51)' @@ -127,7 +128,7 @@ test.describe('Selection Toolbox', { tag: ['@screenshot', '@ui'] }, () => { await comfyPage.workflow.loadWorkflow('groups/single_group') // Select group + node should show bypass button - await comfyPage.page.focus('canvas') + await comfyPage.page.locator('canvas').focus() await comfyPage.page.keyboard.press('Control+A') await expect( comfyPage.page.locator( diff --git a/browser_tests/tests/selectionToolboxActions.spec.ts b/browser_tests/tests/selectionToolboxActions.spec.ts index bce0198a256..f51311fdfd2 100644 --- a/browser_tests/tests/selectionToolboxActions.spec.ts +++ b/browser_tests/tests/selectionToolboxActions.spec.ts @@ -204,7 +204,9 @@ test.describe('Selection Toolbox - Button Actions', { tag: '@ui' }, () => { name: /Frame Nodes/i }) await expect(frameButton).toBeVisible() - await frameButton.click({ force: true }) + await comfyPage.page + .getByRole('button', { name: /Frame Nodes/i }) + .click({ force: true }) await comfyPage.nextFrame() await expect diff --git a/browser_tests/tests/selectionToolboxSubmenus.spec.ts b/browser_tests/tests/selectionToolboxSubmenus.spec.ts index ecd076a1a43..b5c56987401 100644 --- a/browser_tests/tests/selectionToolboxSubmenus.spec.ts +++ b/browser_tests/tests/selectionToolboxSubmenus.spec.ts @@ -47,12 +47,10 @@ test.describe( await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible() - const moreOptionsBtn = comfyPage.page.locator( - '[data-testid="more-options-button"]' - ) + const moreOptionsBtn = comfyPage.page.getByTestId('more-options-button') await expect(moreOptionsBtn).toBeVisible() - await comfyPage.page.click('[data-testid="more-options-button"]') + await moreOptionsBtn.click() await comfyPage.nextFrame() @@ -113,7 +111,7 @@ test.describe( await openMoreOptions(comfyPage) await comfyPage.page.getByText('Color', { exact: true }).click() - const blueSwatch = comfyPage.page.locator('[title="Blue"]') + const blueSwatch = comfyPage.page.getByTitle('Blue') await expect(blueSwatch.first()).toBeVisible() await blueSwatch.first().click() await comfyPage.nextFrame() diff --git a/browser_tests/tests/sidebar/assets.spec.ts b/browser_tests/tests/sidebar/assets.spec.ts index ff188af192b..904a0804de3 100644 --- a/browser_tests/tests/sidebar/assets.spec.ts +++ b/browser_tests/tests/sidebar/assets.spec.ts @@ -192,6 +192,7 @@ test.describe('Assets sidebar - grid view display', () => { // Imported tab should show the mocked files await expect.poll(() => tab.assetCards.count()).toBeGreaterThanOrEqual(1) }) + test('Displays svg outputs', async ({ comfyPage }) => { await comfyPage.assets.mockOutputHistory([ createMockJob({ diff --git a/browser_tests/tests/sidebar/nodeLibrary.spec.ts b/browser_tests/tests/sidebar/nodeLibrary.spec.ts index c5300901422..65f2adf8c5c 100644 --- a/browser_tests/tests/sidebar/nodeLibrary.spec.ts +++ b/browser_tests/tests/sidebar/nodeLibrary.spec.ts @@ -58,7 +58,7 @@ test.describe('Node library sidebar', () => { // Hover over a node to display the preview const nodeSelector = tab.nodeSelector('KSampler (Advanced)') - await comfyPage.page.hover(nodeSelector) + await comfyPage.page.locator(nodeSelector).hover() // Verify the preview is displayed await expect(tab.nodePreview).toBeVisible() @@ -78,9 +78,9 @@ test.describe('Node library sidebar', () => { y: canvasBoundingBox.y + canvasBoundingBox.height / 2 } - await comfyPage.page.dragAndDrop(nodeSelector, canvasSelector, { - targetPosition - }) + await comfyPage.page + .locator(nodeSelector) + .dragTo(comfyPage.page.locator(canvasSelector), { targetPosition }) await comfyPage.nextFrame() // Verify the node is added to the canvas @@ -102,7 +102,9 @@ test.describe('Node library sidebar', () => { await expect(tab.getNode('KSampler (Advanced)')).toHaveCount(2) // Hover on the bookmark node to display the preview - await comfyPage.page.hover('.node-lib-bookmark-tree-explorer .tree-leaf') + await comfyPage.page + .locator('.node-lib-bookmark-tree-explorer .tree-leaf') + .hover() await expect(tab.nodePreview).toBeVisible() }) @@ -220,6 +222,7 @@ test.describe('Node library sidebar', () => { .click() await expectBookmarks(comfyPage, []) }) + test('Can customize icon', async ({ comfyPage }) => { await comfyPage.settings.setSetting(bookmarksSettingId, ['foo/']) const tab = comfyPage.menu.nodeLibraryTab @@ -247,6 +250,7 @@ test.describe('Node library sidebar', () => { } }) }) + // If color is left as default, it should not be saved test('Can customize icon (default field)', async ({ comfyPage }) => { await comfyPage.settings.setSetting(bookmarksSettingId, ['foo/']) diff --git a/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts b/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts index 60b93d59a2b..46565be9c60 100644 --- a/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts +++ b/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts @@ -56,7 +56,7 @@ test.describe( await comfyPage.page.waitForFunction( () => window.app && window.app.extensionManager ) - await comfyPage.page.waitForSelector('.p-blockui-mask', { + await comfyPage.page.locator('.p-blockui-mask').waitFor({ state: 'hidden' }) await comfyPage.nextFrame() diff --git a/browser_tests/tests/subgraph/subgraphPromotion.spec.ts b/browser_tests/tests/subgraph/subgraphPromotion.spec.ts index dba5130e8dd..2aa5d8b3207 100644 --- a/browser_tests/tests/subgraph/subgraphPromotion.spec.ts +++ b/browser_tests/tests/subgraph/subgraphPromotion.spec.ts @@ -131,7 +131,7 @@ test.describe( const enterButton = subgraphVueNode.getByTestId('subgraph-enter-button') await expect(enterButton).toBeVisible() - const nodeBody = subgraphVueNode.locator('[data-testid="node-body-11"]') + const nodeBody = subgraphVueNode.getByTestId('node-body-11') await expect(nodeBody).toBeVisible() const widgets = nodeBody.locator('.lg-node-widgets > div') @@ -400,7 +400,7 @@ test.describe( await comfyPage.command.executeCommand('Comfy.QueuePrompt') - const nodeBody = subgraphVueNode.locator('[data-testid="node-body-5"]') + const nodeBody = subgraphVueNode.getByTestId('node-body-5') await expect(nodeBody).toBeVisible() await expect( nodeBody.locator('.lg-node-widgets > div').first() diff --git a/browser_tests/tests/subgraph/subgraphSlots.spec.ts b/browser_tests/tests/subgraph/subgraphSlots.spec.ts index cf1d7f1a2d7..381b37bc594 100644 --- a/browser_tests/tests/subgraph/subgraphSlots.spec.ts +++ b/browser_tests/tests/subgraph/subgraphSlots.spec.ts @@ -132,7 +132,9 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeVisible() - await comfyPage.page.fill(SELECTORS.promptDialog, RENAMED_INPUT_NAME) + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(RENAMED_INPUT_NAME) await comfyPage.page.keyboard.press('Enter') await comfyPage.canvas.click({ position: { x: 100, y: 100 } }) @@ -153,10 +155,12 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.subgraph.doubleClickInputSlot(initialInputLabel!) - await comfyPage.page.waitForSelector(SELECTORS.promptDialog, { + await comfyPage.page.locator(SELECTORS.promptDialog).waitFor({ state: 'visible' }) - await comfyPage.page.fill(SELECTORS.promptDialog, RENAMED_INPUT_NAME) + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(RENAMED_INPUT_NAME) await comfyPage.page.keyboard.press('Enter') // Force re-render @@ -178,11 +182,13 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.subgraph.doubleClickOutputSlot(initialOutputLabel!) - await comfyPage.page.waitForSelector(SELECTORS.promptDialog, { + await comfyPage.page.locator(SELECTORS.promptDialog).waitFor({ state: 'visible' }) const renamedOutputName = 'renamed_output' - await comfyPage.page.fill(SELECTORS.promptDialog, renamedOutputName) + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(renamedOutputName) await comfyPage.page.keyboard.press('Enter') // Force re-render @@ -209,11 +215,13 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.contextMenu.clickLitegraphMenuItem('Rename Slot') await comfyPage.nextFrame() - await comfyPage.page.waitForSelector(SELECTORS.promptDialog, { + await comfyPage.page.locator(SELECTORS.promptDialog).waitFor({ state: 'visible' }) const rightClickRenamedName = 'right_click_renamed' - await comfyPage.page.fill(SELECTORS.promptDialog, rightClickRenamedName) + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(rightClickRenamedName) await comfyPage.page.keyboard.press('Enter') // Force re-render @@ -270,7 +278,9 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeVisible() const labelClickRenamedName = 'label_click_renamed' - await comfyPage.page.fill(SELECTORS.promptDialog, labelClickRenamedName) + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(labelClickRenamedName) await comfyPage.page.keyboard.press('Enter') await comfyPage.canvas.click({ position: { x: 100, y: 100 } }) @@ -303,8 +313,10 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeVisible() - await comfyPage.page.fill(SELECTORS.promptDialog, '') - await comfyPage.page.fill(SELECTORS.promptDialog, RENAMED_SLOT_NAME) + await comfyPage.page.locator(SELECTORS.promptDialog).fill('') + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(RENAMED_SLOT_NAME) await comfyPage.page.keyboard.press('Enter') await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeHidden() @@ -332,8 +344,10 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { RENAMED_SLOT_NAME ) - await comfyPage.page.fill(SELECTORS.promptDialog, '') - await comfyPage.page.fill(SELECTORS.promptDialog, SECOND_RENAMED_NAME) + await comfyPage.page.locator(SELECTORS.promptDialog).fill('') + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(SECOND_RENAMED_NAME) await comfyPage.page.keyboard.press('Enter') await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeHidden() @@ -366,8 +380,10 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeVisible() - await comfyPage.page.fill(SELECTORS.promptDialog, '') - await comfyPage.page.fill(SELECTORS.promptDialog, RENAMED_SLOT_NAME) + await comfyPage.page.locator(SELECTORS.promptDialog).fill('') + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill(RENAMED_SLOT_NAME) await comfyPage.page.keyboard.press('Enter') await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeHidden() @@ -434,8 +450,8 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeVisible() - await comfyPage.page.fill(SELECTORS.promptDialog, '') - await comfyPage.page.fill(SELECTORS.promptDialog, RENAMED_LABEL) + await comfyPage.page.locator(SELECTORS.promptDialog).fill('') + await comfyPage.page.locator(SELECTORS.promptDialog).fill(RENAMED_LABEL) await comfyPage.page.keyboard.press('Enter') await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeHidden() @@ -533,8 +549,10 @@ test.describe('Subgraph Slots', { tag: ['@slow', '@subgraph'] }, () => { await comfyPage.nextFrame() await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeVisible() - await comfyPage.page.fill(SELECTORS.promptDialog, '') - await comfyPage.page.fill(SELECTORS.promptDialog, 'my_custom_prompt') + await comfyPage.page.locator(SELECTORS.promptDialog).fill('') + await comfyPage.page + .locator(SELECTORS.promptDialog) + .fill('my_custom_prompt') await comfyPage.page.keyboard.press('Enter') await expect(comfyPage.page.locator(SELECTORS.promptDialog)).toBeHidden() diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index 77c3a09ce9b..2070b7d1b39 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -185,8 +185,8 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { await comfyPage.command.executeCommand('Comfy.BrowseTemplates') await comfyPage.templates.content.waitFor({ state: 'visible' }) - const templateGrid = comfyPage.page.locator( - '[data-testid="template-workflows-content"]' + const templateGrid = comfyPage.page.getByTestId( + 'template-workflows-content' ) const nav = comfyPage.page.locator('header', { hasText: 'Templates' }) @@ -302,20 +302,18 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { // Wait for cards to load await expect( - comfyPage.page.locator( - '[data-testid="template-workflow-short-description"]' - ) + comfyPage.page.getByTestId('template-workflow-short-description') ).toBeVisible() // Verify all three cards with different descriptions are visible - const shortDescCard = comfyPage.page.locator( - '[data-testid="template-workflow-short-description"]' + const shortDescCard = comfyPage.page.getByTestId( + 'template-workflow-short-description' ) - const mediumDescCard = comfyPage.page.locator( - '[data-testid="template-workflow-medium-description"]' + const mediumDescCard = comfyPage.page.getByTestId( + 'template-workflow-medium-description' ) - const longDescCard = comfyPage.page.locator( - '[data-testid="template-workflow-long-description"]' + const longDescCard = comfyPage.page.getByTestId( + 'template-workflow-long-description' ) await expect(shortDescCard).toBeVisible() @@ -333,8 +331,8 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { await expect(longDesc).toContainText('much longer description') // Verify grid layout maintains consistency - const templateGrid = comfyPage.page.locator( - '[data-testid="template-workflows-content"]' + const templateGrid = comfyPage.page.getByTestId( + 'template-workflows-content' ) await expect(templateGrid).toBeVisible() await expect(templateGrid).toHaveScreenshot( diff --git a/browser_tests/tests/topbar/workflowTabs.spec.ts b/browser_tests/tests/topbar/workflowTabs.spec.ts index a226562ebe6..2f605a97257 100644 --- a/browser_tests/tests/topbar/workflowTabs.spec.ts +++ b/browser_tests/tests/topbar/workflowTabs.spec.ts @@ -64,9 +64,9 @@ test.describe('Workflow tabs', () => { await topbar.getTab(0).click({ button: 'right' }) // Reka UI ContextMenuContent gets data-state="open" when active - const contextMenu = comfyPage.page.locator( - '[role="menu"][data-state="open"]' - ) + const contextMenu = comfyPage.page + .getByRole('menu') + .and(comfyPage.page.locator('[data-state="open"]')) await expect(contextMenu).toBeVisible() await expect( @@ -86,9 +86,9 @@ test.describe('Workflow tabs', () => { await expect.poll(() => topbar.getTabNames()).toHaveLength(2) await topbar.getTab(1).click({ button: 'right' }) - const contextMenu = comfyPage.page.locator( - '[role="menu"][data-state="open"]' - ) + const contextMenu = comfyPage.page + .getByRole('menu') + .and(comfyPage.page.locator('[data-state="open"]')) await expect(contextMenu).toBeVisible() await contextMenu diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index 00e47f8a3bc..e2d8e5f17a4 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -46,6 +46,7 @@ test.describe('Vue Multiline String Widget', () => { await expect(textarea).toHaveValue('Keep me around') }) + test('should use native context menu when focused', async ({ comfyPage }) => { const textarea = getFirstMultilineStringWidget(comfyPage) const vueContextMenu = comfyPage.page.locator('.p-contextmenu') diff --git a/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts b/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts index 3e31ad5b9e6..7da733dfb76 100644 --- a/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/widgetReactivity.spec.ts @@ -9,6 +9,7 @@ test.describe('Vue Widget Reactivity', () => { await comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true) await comfyPage.vueNodes.waitForNodes() }) + test('Should display added widgets', async ({ comfyPage }) => { const loadCheckpointNode = comfyPage.page.locator( 'css=[data-testid="node-body-4"] > .lg-node-widgets > div' @@ -32,6 +33,7 @@ test.describe('Vue Widget Reactivity', () => { }) await expect(loadCheckpointNode).toHaveCount(4) }) + test('Should hide removed widgets', async ({ comfyPage }) => { const loadCheckpointNode = comfyPage.page.locator( 'css=[data-testid="node-body-3"] > .lg-node-widgets > div' diff --git a/browser_tests/tests/widget.spec.ts b/browser_tests/tests/widget.spec.ts index 8faa9ec1976..ed70f5b4f86 100644 --- a/browser_tests/tests/widget.spec.ts +++ b/browser_tests/tests/widget.spec.ts @@ -272,6 +272,7 @@ test.describe('Image widget', { tag: ['@screenshot', '@widget'] }, () => { // Expect the filename combo value to be updated await expect.poll(() => fileComboWidget.getValue()).toBe('image32x32.webp') }) + test('Displays buttons when viewing single image of batch', async ({ comfyPage }) => { diff --git a/package.json b/package.json index 80d008dc372..de6f0b7e968 100644 --- a/package.json +++ b/package.json @@ -28,15 +28,15 @@ "json-schema": "tsx scripts/generate-json-schema.ts", "knip:no-cache": "knip", "knip": "knip --cache", - "lint:fix:no-cache": "oxlint src --type-aware --fix && eslint src --fix", - "lint:fix": "oxlint src --type-aware --fix && eslint src --cache --fix", - "lint:no-cache": "pnpm exec stylelint '{apps,packages,src}/**/*.{css,vue}' && oxlint src --type-aware && eslint src", + "lint:fix:no-cache": "oxlint src browser_tests --type-aware --fix && eslint src --fix", + "lint:fix": "oxlint src browser_tests --type-aware --fix && eslint src --cache --fix", + "lint:no-cache": "pnpm exec stylelint '{apps,packages,src}/**/*.{css,vue}' && oxlint src browser_tests --type-aware && eslint src", "lint:unstaged:fix": "git diff --name-only HEAD | grep -E '\\.(js|ts|vue|mts)$' | xargs -r eslint --cache --fix", "lint:unstaged": "git diff --name-only HEAD | grep -E '\\.(js|ts|vue|mts)$' | xargs -r eslint --cache", - "lint": "pnpm stylelint && oxlint src --type-aware && eslint src --cache", + "lint": "pnpm stylelint && oxlint src browser_tests --type-aware && eslint src --cache", "lint:desktop": "nx run @comfyorg/desktop-ui:lint", "locale": "lobe-i18n locale", - "oxlint": "oxlint src --type-aware", + "oxlint": "oxlint src browser_tests --type-aware", "prepare": "husky || true && git config blame.ignoreRevsFile .git-blame-ignore-revs || true", "preview": "nx preview", "storybook": "nx storybook", @@ -159,6 +159,7 @@ "eslint-plugin-better-tailwindcss": "catalog:", "eslint-plugin-import-x": "catalog:", "eslint-plugin-oxlint": "catalog:", + "eslint-plugin-playwright": "catalog:", "eslint-plugin-storybook": "catalog:", "eslint-plugin-testing-library": "catalog:", "eslint-plugin-unused-imports": "catalog:", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4bc077fa30..d7eff98c6f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -222,6 +222,9 @@ catalogs: eslint-plugin-oxlint: specifier: 1.59.0 version: 1.59.0 + eslint-plugin-playwright: + specifier: ^2.10.1 + version: 2.10.1 eslint-plugin-storybook: specifier: ^10.2.10 version: 10.2.10 @@ -717,6 +720,9 @@ importers: eslint-plugin-oxlint: specifier: 'catalog:' version: 1.59.0(oxlint@1.59.0(oxlint-tsgolint@0.20.0)) + eslint-plugin-playwright: + specifier: 'catalog:' + version: 2.10.1(eslint@9.39.1(jiti@2.6.1)) eslint-plugin-storybook: specifier: 'catalog:' version: 10.2.10(eslint@9.39.1(jiti@2.6.1))(storybook@10.2.10(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(typescript@5.9.3) @@ -6144,6 +6150,12 @@ packages: peerDependencies: oxlint: ~1.59.0 + eslint-plugin-playwright@2.10.1: + resolution: {integrity: sha512-qea3UxBOb8fTwJ77FMApZKvRye5DOluDHcev0LDJwID3RELeun0JlqzrNIXAB/SXCyB/AesCW/6sZfcT9q3Edg==} + engines: {node: '>=16.9.0'} + peerDependencies: + eslint: '>=8.40.0' + eslint-plugin-storybook@10.2.10: resolution: {integrity: sha512-aWkoh2rhTaEsMA4yB1iVIcISM5wb0uffp09ZqhwpoD4GAngCs131uq6un+QdnOMc7vXyAnBBfsuhtOj8WwCUgw==} peerDependencies: @@ -6563,6 +6575,10 @@ packages: resolution: {integrity: sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==} engines: {node: '>=18'} + globals@17.4.0: + resolution: {integrity: sha512-hjrNztw/VajQwOLsMNT1cbJiH2muO3OROCHnbehc8eY5JyD2gqz4AcMHPqgaOR59DjgUjYAYLeH699g/eWi2jw==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -15581,6 +15597,11 @@ snapshots: jsonc-parser: 3.3.1 oxlint: 1.59.0(oxlint-tsgolint@0.20.0) + eslint-plugin-playwright@2.10.1(eslint@9.39.1(jiti@2.6.1)): + dependencies: + eslint: 9.39.1(jiti@2.6.1) + globals: 17.4.0 + eslint-plugin-storybook@10.2.10(eslint@9.39.1(jiti@2.6.1))(storybook@10.2.10(@testing-library/dom@10.4.1)(prettier@3.7.4)(react-dom@19.2.4(react@19.2.4))(react@19.2.4))(typescript@5.9.3): dependencies: '@typescript-eslint/utils': 8.56.0(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -16092,6 +16113,8 @@ snapshots: globals@16.5.0: {} + globals@17.4.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 2536de8e707..3e99a7994fc 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -31,12 +31,12 @@ catalog: '@sentry/vite-plugin': ^4.6.0 '@sentry/vue': ^10.32.1 '@sparkjsdev/spark': ^0.1.10 - '@tanstack/vue-virtual': ^3.13.12 '@storybook/addon-docs': ^10.2.10 '@storybook/addon-mcp': 0.1.6 '@storybook/vue3': ^10.2.10 '@storybook/vue3-vite': ^10.2.10 '@tailwindcss/vite': ^4.2.0 + '@tanstack/vue-virtual': ^3.13.12 '@testing-library/jest-dom': ^6.9.1 '@testing-library/user-event': ^14.6.1 '@testing-library/vue': ^8.1.0 @@ -75,6 +75,7 @@ catalog: eslint-plugin-better-tailwindcss: ^4.3.1 eslint-plugin-import-x: ^4.16.1 eslint-plugin-oxlint: 1.59.0 + eslint-plugin-playwright: ^2.10.1 eslint-plugin-storybook: ^10.2.10 eslint-plugin-testing-library: ^7.16.1 eslint-plugin-unused-imports: ^4.3.0 From c7ecfabbca9b3c9e0e870c8d220cdca5a9296cd7 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:03:27 -0700 Subject: [PATCH 06/14] fix: remove JSONC comments from .oxlintrc.json CI JSON validation uses jq which requires strict JSON. The // comments on no-force-option broke the parse. Amp-Thread-ID: https://ampcode.com/threads/T-019d795b-2ebb-748d-a7a1-3e7fb7e84b1b Co-authored-by: Amp --- .oxlintrc.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 239d0c0e976..4b5448ecac6 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -148,8 +148,6 @@ "playwright/no-duplicate-hooks": "error", "playwright/no-element-handle": "error", "playwright/no-eval": "error", - // TODO: Enable in a dedicated PR — requires triaging 28 violations - // (canvas overlay workarounds vs. unnecessary force usage) "playwright/no-force-option": "off", "playwright/no-networkidle": "error", "playwright/no-page-pause": "error", From c2d2c18e4db812eafec4c3b7b025cca2965edc3e Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:32:45 -0700 Subject: [PATCH 07/14] fix: use .first() in waitForNodes to avoid strict mode violation waitForSelector tolerates multiple matches but locator().waitFor() enforces strict single-element matching. The default workflow has 7 nodes, so the bare locator always fails. Amp-Thread-ID: https://ampcode.com/threads/T-019d797f-578f-7399-bc07-e278fa246f3f Co-authored-by: Amp --- browser_tests/fixtures/VueNodeHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser_tests/fixtures/VueNodeHelpers.ts b/browser_tests/fixtures/VueNodeHelpers.ts index 260245cbc74..97126180577 100644 --- a/browser_tests/fixtures/VueNodeHelpers.ts +++ b/browser_tests/fixtures/VueNodeHelpers.ts @@ -146,7 +146,7 @@ export class VueNodeHelpers { expectedCount ) } else { - await this.page.locator('[data-node-id]').waitFor() + await this.page.locator('[data-node-id]').first().waitFor() } } From 1daa15f583ddd830c865c67549ccd70086d81b56 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:56:22 -0700 Subject: [PATCH 08/14] fix: use .first() in SubgraphHelper to avoid strict mode violation Amp-Thread-ID: https://ampcode.com/threads/T-019d798e-81c1-7460-86bf-f6ad7a703f8c Co-authored-by: Amp --- browser_tests/fixtures/helpers/SubgraphHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser_tests/fixtures/helpers/SubgraphHelper.ts b/browser_tests/fixtures/helpers/SubgraphHelper.ts index 5a5e1780f03..0aeb4eb8561 100644 --- a/browser_tests/fixtures/helpers/SubgraphHelper.ts +++ b/browser_tests/fixtures/helpers/SubgraphHelper.ts @@ -157,7 +157,7 @@ export class SubgraphHelper { // Wait for the appropriate UI element to appear if (action === 'rightClick') { - await this.page.locator('.litemenu-entry').waitFor({ + await this.page.locator('.litemenu-entry').first().waitFor({ state: 'visible', timeout: 5000 }) From 9605700795e394343d9dbc8eff1018fbecbf8628 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:20:08 -0700 Subject: [PATCH 09/14] fix: enable all recommended eslint-plugin-playwright rules Enable 8 missing recommended rules from eslint-plugin-playwright: - no-focused-test, no-skipped-test, no-unsafe-references, no-unused-locators, no-useless-not, valid-expect, valid-expect-in-promise, valid-title Auto-fix 158 no-useless-not violations (.not.toBeVisible() -> .toBeHidden()). Refactor customMatchers.ts to avoid valid-expect false positive. Add oxlint-disable for 2 intentional test.skip() calls with issue links. Amp-Thread-ID: https://ampcode.com/threads/T-019d799d-7c10-711e-83db-3af43ffb1e00 Co-authored-by: Amp --- .oxlintrc.json | 10 +++++++++- browser_tests/fixtures/utils/customMatchers.ts | 9 +++++---- browser_tests/tests/appModeWelcome.spec.ts | 10 +++++----- browser_tests/tests/bottomPanelLogs.spec.ts | 6 +++--- browser_tests/tests/bottomPanelShortcuts.spec.ts | 8 ++++---- browser_tests/tests/builderReorder.spec.ts | 2 +- browser_tests/tests/builderSaveFlow.spec.ts | 16 ++++++++-------- browser_tests/tests/canvasModeSelector.spec.ts | 8 ++++---- browser_tests/tests/defaultKeybindings.spec.ts | 12 ++++++------ browser_tests/tests/dialog.spec.ts | 2 +- .../tests/dialogs/managerDialog.spec.ts | 4 ++-- .../tests/dialogs/queueClearHistory.spec.ts | 8 ++++---- .../tests/dialogs/settingsDialog.spec.ts | 4 ++-- browser_tests/tests/domWidget.spec.ts | 8 ++++---- browser_tests/tests/errorDialog.spec.ts | 4 ++-- browser_tests/tests/errorOverlay.spec.ts | 16 ++++++++-------- browser_tests/tests/focusMode.spec.ts | 12 ++++++------ browser_tests/tests/graphCanvasMenu.spec.ts | 2 +- browser_tests/tests/groupNode.spec.ts | 4 ++-- browser_tests/tests/jobHistoryActions.spec.ts | 2 +- browser_tests/tests/linearMode.spec.ts | 4 ++-- browser_tests/tests/menu.spec.ts | 6 +++--- browser_tests/tests/minimap.spec.ts | 6 +++--- browser_tests/tests/nodeDisplay.spec.ts | 2 +- browser_tests/tests/nodeHelp.spec.ts | 4 ++-- browser_tests/tests/nodeSearchBox.spec.ts | 2 +- browser_tests/tests/nodeSearchBoxV2.spec.ts | 6 +++--- .../tests/nodeSearchBoxV2Extended.spec.ts | 6 +++--- .../tests/propertiesPanel/ErrorsTabHelper.ts | 2 +- .../propertiesPanel/PropertiesPanelHelper.ts | 2 +- .../tests/propertiesPanel/errorsTab.spec.ts | 4 ++-- .../propertiesPanel/errorsTabExecution.spec.ts | 2 +- .../errorsTabMissingMedia.spec.ts | 7 ++++--- .../errorsTabMissingModels.spec.ts | 2 +- .../errorsTabMissingNodes.spec.ts | 2 +- .../tests/propertiesPanel/nodeSelection.spec.ts | 4 ++-- .../tests/propertiesPanel/nodeSettings.spec.ts | 6 +++--- .../tests/propertiesPanel/openClose.spec.ts | 6 +++--- .../tests/propertiesPanel/titleEditing.spec.ts | 4 ++-- .../propertiesPanel/workflowOverview.spec.ts | 2 +- browser_tests/tests/queue/queueOverlay.spec.ts | 4 ++-- browser_tests/tests/releaseNotifications.spec.ts | 16 ++++++++-------- browser_tests/tests/resultGallery.spec.ts | 4 ++-- browser_tests/tests/selectionToolbox.spec.ts | 8 ++++---- .../tests/selectionToolboxActions.spec.ts | 4 ++-- .../tests/selectionToolboxSubmenus.spec.ts | 4 ++-- browser_tests/tests/sidebar/assets.spec.ts | 4 ++-- browser_tests/tests/sidebar/modelLibrary.spec.ts | 2 +- .../tests/sidebar/nodeLibraryV2.spec.ts | 4 ++-- .../tests/sidebar/workflowSearch.spec.ts | 8 ++++---- browser_tests/tests/sidebar/workflows.spec.ts | 6 +++--- browser_tests/tests/templates.spec.ts | 1 + browser_tests/tests/useSettingSearch.spec.ts | 2 +- .../tests/versionMismatchWarnings.spec.ts | 4 ++-- .../interactions/node/contextMenu.spec.ts | 16 ++++++++-------- .../vueNodes/interactions/node/rename.spec.ts | 2 +- .../tests/vueNodes/nodeStates/collapse.spec.ts | 2 +- .../tests/vueNodes/nodeStates/pin.spec.ts | 6 +++--- .../vueNodes/widgets/advancedWidgets.spec.ts | 6 +++--- .../vueNodes/widgets/load/uploadWidgets.spec.ts | 2 +- .../widgets/text/multilineStringWidget.spec.ts | 2 +- browser_tests/tests/workflowTabThumbnail.spec.ts | 2 +- browser_tests/tests/zoomControls.spec.ts | 2 +- 63 files changed, 174 insertions(+), 163 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 4b5448ecac6..d987990e23f 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -148,10 +148,15 @@ "playwright/no-duplicate-hooks": "error", "playwright/no-element-handle": "error", "playwright/no-eval": "error", + "playwright/no-focused-test": "error", "playwright/no-force-option": "off", "playwright/no-networkidle": "error", "playwright/no-page-pause": "error", + "playwright/no-skipped-test": "error", + "playwright/no-unsafe-references": "error", + "playwright/no-unused-locators": "error", "playwright/no-useless-await": "error", + "playwright/no-useless-not": "error", "playwright/no-wait-for-navigation": "error", "playwright/no-wait-for-selector": "error", "playwright/no-wait-for-timeout": "error", @@ -161,7 +166,10 @@ "playwright/prefer-to-have-length": "error", "playwright/prefer-web-first-assertions": "error", "playwright/prefer-native-locators": "error", - "playwright/require-to-pass-timeout": "error" + "playwright/require-to-pass-timeout": "error", + "playwright/valid-expect": "error", + "playwright/valid-expect-in-promise": "error", + "playwright/valid-title": "error" } } ] diff --git a/browser_tests/fixtures/utils/customMatchers.ts b/browser_tests/fixtures/utils/customMatchers.ts index 65814eb3bfd..6acae370fd0 100644 --- a/browser_tests/fixtures/utils/customMatchers.ts +++ b/browser_tests/fixtures/utils/customMatchers.ts @@ -14,10 +14,11 @@ function makeMatcher( ) { await expect(async () => { const value = await getValue(node) - const assertion = this.isNot - ? expect(value, 'Node is ' + type).not - : expect(value, 'Node is not ' + type) - assertion.toBeTruthy() + if (this.isNot) { + expect(value, 'Node is ' + type).not.toBeTruthy() + } else { + expect(value, 'Node is not ' + type).toBeTruthy() + } }).toPass({ timeout: 5000, ...options }) return { pass: !this.isNot, diff --git a/browser_tests/tests/appModeWelcome.spec.ts b/browser_tests/tests/appModeWelcome.spec.ts index 350ca38afbd..494e07ec390 100644 --- a/browser_tests/tests/appModeWelcome.spec.ts +++ b/browser_tests/tests/appModeWelcome.spec.ts @@ -16,7 +16,7 @@ test.describe('App mode welcome states', { tag: '@ui' }, () => { await expect(comfyPage.appMode.welcome).toBeVisible() await expect(comfyPage.appMode.emptyWorkflowText).toBeVisible() - await expect(comfyPage.appMode.buildAppButton).not.toBeVisible() + await expect(comfyPage.appMode.buildAppButton).toBeHidden() }) test('Build app button is visible when no outputs selected', async ({ @@ -26,7 +26,7 @@ test.describe('App mode welcome states', { tag: '@ui' }, () => { await expect(comfyPage.appMode.welcome).toBeVisible() await expect(comfyPage.appMode.buildAppButton).toBeVisible() - await expect(comfyPage.appMode.emptyWorkflowText).not.toBeVisible() + await expect(comfyPage.appMode.emptyWorkflowText).toBeHidden() }) test('Empty workflow and build app are hidden when app has outputs', async ({ @@ -35,8 +35,8 @@ test.describe('App mode welcome states', { tag: '@ui' }, () => { await comfyPage.appMode.enterAppModeWithInputs([['3', 'seed']]) await expect(comfyPage.appMode.linearWidgets).toBeVisible() - await expect(comfyPage.appMode.emptyWorkflowText).not.toBeVisible() - await expect(comfyPage.appMode.buildAppButton).not.toBeVisible() + await expect(comfyPage.appMode.emptyWorkflowText).toBeHidden() + await expect(comfyPage.appMode.buildAppButton).toBeHidden() }) test('Back to workflow returns to graph mode', async ({ comfyPage }) => { @@ -46,7 +46,7 @@ test.describe('App mode welcome states', { tag: '@ui' }, () => { await comfyPage.appMode.backToWorkflowButton.click() await expect(comfyPage.canvas).toBeVisible() - await expect(comfyPage.appMode.welcome).not.toBeVisible() + await expect(comfyPage.appMode.welcome).toBeHidden() }) test('Load template opens template selector', async ({ comfyPage }) => { diff --git a/browser_tests/tests/bottomPanelLogs.spec.ts b/browser_tests/tests/bottomPanelLogs.spec.ts index fd23297d53c..9ae383ffdaf 100644 --- a/browser_tests/tests/bottomPanelLogs.spec.ts +++ b/browser_tests/tests/bottomPanelLogs.spec.ts @@ -11,7 +11,7 @@ test.describe('Bottom Panel Logs', { tag: '@ui' }, () => { test('should open bottom panel via toggle button', async ({ comfyPage }) => { const { bottomPanel } = comfyPage - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() await bottomPanel.toggleButton.click() await expect(bottomPanel.root).toBeVisible() }) @@ -35,7 +35,7 @@ test.describe('Bottom Panel Logs', { tag: '@ui' }, () => { await expect(bottomPanel.root).toBeVisible() await bottomPanel.toggleButton.click() - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() }) test('should switch between shortcuts and terminal panels', async ({ @@ -55,7 +55,7 @@ test.describe('Bottom Panel Logs', { tag: '@ui' }, () => { await expect(logsTab).toBeVisible() await expect( comfyPage.page.locator('[id*="tab_shortcuts-essentials"]') - ).not.toBeVisible() + ).toBeHidden() }) test('should persist Logs tab content in bottom panel', async ({ diff --git a/browser_tests/tests/bottomPanelShortcuts.spec.ts b/browser_tests/tests/bottomPanelShortcuts.spec.ts index e01ed713413..852dc761b38 100644 --- a/browser_tests/tests/bottomPanelShortcuts.spec.ts +++ b/browser_tests/tests/bottomPanelShortcuts.spec.ts @@ -10,11 +10,11 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { test('should toggle shortcuts panel visibility', async ({ comfyPage }) => { const { bottomPanel } = comfyPage - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() await bottomPanel.keyboardShortcutsButton.click() await expect(bottomPanel.root).toBeVisible() await bottomPanel.keyboardShortcutsButton.click() - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() }) test('should display essentials shortcuts tab', async ({ comfyPage }) => { @@ -182,7 +182,7 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { await expect(bottomPanel.root).toBeVisible() await bottomPanel.keyboardShortcutsButton.click() - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() }) test('should display shortcuts in organized columns', async ({ @@ -203,7 +203,7 @@ test.describe('Bottom Panel Shortcuts', { tag: '@ui' }, () => { }) => { const { bottomPanel } = comfyPage - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() await comfyPage.page.keyboard.press('Control+Shift+KeyK') diff --git a/browser_tests/tests/builderReorder.spec.ts b/browser_tests/tests/builderReorder.spec.ts index 049ecb99337..f499c25593e 100644 --- a/browser_tests/tests/builderReorder.spec.ts +++ b/browser_tests/tests/builderReorder.spec.ts @@ -22,7 +22,7 @@ async function saveCloseAndReopenAsApp( await appMode.steps.goToPreview() await builderSaveAs(appMode, workflowName) await appMode.saveAs.closeButton.click() - await expect(appMode.saveAs.successDialog).not.toBeVisible() + await expect(appMode.saveAs.successDialog).toBeHidden() await appMode.footer.exitBuilder() await openWorkflowFromSidebar(comfyPage, workflowName) diff --git a/browser_tests/tests/builderSaveFlow.spec.ts b/browser_tests/tests/builderSaveFlow.spec.ts index efbef2413e3..38265f6f6d7 100644 --- a/browser_tests/tests/builderSaveFlow.spec.ts +++ b/browser_tests/tests/builderSaveFlow.spec.ts @@ -31,7 +31,7 @@ async function dismissSuccessDialog( ) { const btn = button === 'close' ? saveAs.closeButton : saveAs.dismissButton await btn.click() - await expect(saveAs.successDialog).not.toBeVisible() + await expect(saveAs.successDialog).toBeHidden() } test.describe('Builder save flow', { tag: ['@ui'] }, () => { @@ -113,7 +113,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await comfyPage.page.keyboard.press('Escape') await comfyPage.nextFrame() - await expect(comfyPage.appMode.steps.toolbar).not.toBeVisible() + await expect(comfyPage.appMode.steps.toolbar).toBeHidden() }) test('Exit builder button exits builder mode', async ({ comfyPage }) => { @@ -121,7 +121,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await expect(comfyPage.appMode.steps.toolbar).toBeVisible() await comfyPage.appMode.footer.exitBuilder() - await expect(comfyPage.appMode.steps.toolbar).not.toBeVisible() + await expect(comfyPage.appMode.steps.toolbar).toBeHidden() }) test('Save button directly saves for previously saved workflow', async ({ @@ -141,7 +141,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await footer.saveButton.click() await comfyPage.nextFrame() - await expect(saveAs.dialog).not.toBeVisible() + await expect(saveAs.dialog).toBeHidden() await expect(footer.saveButton).toBeDisabled() }) @@ -253,7 +253,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await builderSaveAs(comfyPage.appMode, `${Date.now()} app-view`, 'App') await comfyPage.appMode.saveAs.viewAppButton.click() - await expect(comfyPage.appMode.saveAs.successDialog).not.toBeVisible() + await expect(comfyPage.appMode.saveAs.successDialog).toBeHidden() await expect .poll(() => comfyPage.workflow.getActiveWorkflowActiveAppMode()) @@ -271,9 +271,9 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { ) await comfyPage.appMode.saveAs.exitBuilderButton.click() - await expect(comfyPage.appMode.saveAs.successDialog).not.toBeVisible() + await expect(comfyPage.appMode.saveAs.successDialog).toBeHidden() - await expect(comfyPage.appMode.steps.toolbar).not.toBeVisible() + await expect(comfyPage.appMode.steps.toolbar).toBeHidden() }) test('save as with different mode does not modify the original workflow', async ({ @@ -327,7 +327,7 @@ test.describe('Builder save flow', { tag: ['@ui'] }, () => { await expect(appMode.saveAs.overwriteDialog).toBeVisible() await appMode.saveAs.overwriteButton.click() - await expect(appMode.saveAs.overwriteDialog).not.toBeVisible() + await expect(appMode.saveAs.overwriteDialog).toBeHidden() await expect(appMode.saveAs.successMessage).toBeVisible() diff --git a/browser_tests/tests/canvasModeSelector.spec.ts b/browser_tests/tests/canvasModeSelector.spec.ts index d345f6e1b85..93e6523933c 100644 --- a/browser_tests/tests/canvasModeSelector.spec.ts +++ b/browser_tests/tests/canvasModeSelector.spec.ts @@ -70,7 +70,7 @@ test.describe('CanvasModeSelector', { tag: '@canvas' }, () => { await expect(menu).toBeVisible() await trigger.click() await comfyPage.nextFrame() - await expect(menu).not.toBeVisible() + await expect(menu).toBeHidden() await expect(trigger).toHaveAttribute('aria-expanded', 'false') }) @@ -81,7 +81,7 @@ test.describe('CanvasModeSelector', { tag: '@canvas' }, () => { await expect(menu).toBeVisible() await handItem.click() await comfyPage.nextFrame() - await expect(menu).not.toBeVisible() + await expect(menu).toBeHidden() }) test('closes when Escape is pressed', async ({ comfyPage }) => { @@ -91,7 +91,7 @@ test.describe('CanvasModeSelector', { tag: '@canvas' }, () => { await expect(menu).toBeVisible() await selectItem.press('Escape') await comfyPage.nextFrame() - await expect(menu).not.toBeVisible() + await expect(menu).toBeHidden() await expect(trigger).toHaveAttribute('aria-expanded', 'false') }) }) @@ -197,7 +197,7 @@ test.describe('CanvasModeSelector', { tag: '@canvas' }, () => { await selectItem.press('ArrowDown') await handItem.press('Escape') await comfyPage.nextFrame() - await expect(menu).not.toBeVisible() + await expect(menu).toBeHidden() await expect(trigger).toBeFocused() }) }) diff --git a/browser_tests/tests/defaultKeybindings.spec.ts b/browser_tests/tests/defaultKeybindings.spec.ts index a5d9197f2ce..9f61c153b96 100644 --- a/browser_tests/tests/defaultKeybindings.spec.ts +++ b/browser_tests/tests/defaultKeybindings.spec.ts @@ -38,13 +38,13 @@ test.describe('Default Keybindings', { tag: '@keyboard' }, () => { `.${tabId}-tab-button.side-bar-button-selected` ) - await expect(selectedButton).not.toBeVisible() + await expect(selectedButton).toBeHidden() await comfyPage.canvas.press(key) await expect(selectedButton).toBeVisible() await comfyPage.canvas.press(key) - await expect(selectedButton).not.toBeVisible() + await expect(selectedButton).toBeHidden() }) } }) @@ -172,7 +172,7 @@ test.describe('Default Keybindings', { tag: '@keyboard' }, () => { // Toggle off with Alt+m await comfyPage.page.keyboard.press('Alt+KeyM') - await expect(comfyPage.appMode.linearWidgets).not.toBeVisible() + await expect(comfyPage.appMode.linearWidgets).toBeHidden() // Toggle on again await comfyPage.page.keyboard.press('Alt+KeyM') @@ -189,7 +189,7 @@ test.describe('Default Keybindings', { tag: '@keyboard' }, () => { await expect(minimap).toBeVisible() await comfyPage.page.keyboard.press('Alt+Shift+KeyM') - await expect(minimap).not.toBeVisible() + await expect(minimap).toBeHidden() await comfyPage.page.keyboard.press('Alt+Shift+KeyM') await expect(minimap).toBeVisible() @@ -198,13 +198,13 @@ test.describe('Default Keybindings', { tag: '@keyboard' }, () => { test("'Ctrl+`' toggles terminal/logs panel", async ({ comfyPage }) => { await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top') - await expect(comfyPage.bottomPanel.root).not.toBeVisible() + await expect(comfyPage.bottomPanel.root).toBeHidden() await comfyPage.page.keyboard.press('Control+Backquote') await expect(comfyPage.bottomPanel.root).toBeVisible() await comfyPage.page.keyboard.press('Control+Backquote') - await expect(comfyPage.bottomPanel.root).not.toBeVisible() + await expect(comfyPage.bottomPanel.root).toBeHidden() }) }) diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index 33858182656..fe6a27e8615 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -27,7 +27,7 @@ test.describe('Settings', () => { const settingsLocator = comfyPage.page.getByTestId('settings-dialog') await expect(settingsLocator).toBeVisible() await comfyPage.page.keyboard.press('Escape') - await expect(settingsLocator).not.toBeVisible() + await expect(settingsLocator).toBeHidden() }) test('Can change canvas zoom speed setting', async ({ comfyPage }) => { diff --git a/browser_tests/tests/dialogs/managerDialog.spec.ts b/browser_tests/tests/dialogs/managerDialog.spec.ts index 20c8c61454b..60da8680728 100644 --- a/browser_tests/tests/dialogs/managerDialog.spec.ts +++ b/browser_tests/tests/dialogs/managerDialog.spec.ts @@ -307,7 +307,7 @@ test.describe('ManagerDialog', { tag: '@ui' }, () => { await searchInput.fill('Test Pack B') await expect(dialog.getByText('Test Pack B')).toBeVisible() - await expect(dialog.getByText('Test Pack A')).not.toBeVisible() + await expect(dialog.getByText('Test Pack A')).toBeHidden() }) test('Clicking a pack card opens the info panel', async ({ comfyPage }) => { @@ -360,7 +360,7 @@ test.describe('ManagerDialog', { tag: '@ui' }, () => { await expect(dialog).toBeVisible() await comfyPage.page.keyboard.press('Escape') - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() }) test('Empty search shows no results message', async ({ comfyPage }) => { diff --git a/browser_tests/tests/dialogs/queueClearHistory.spec.ts b/browser_tests/tests/dialogs/queueClearHistory.spec.ts index 993e0a077ab..cbd8a7b5292 100644 --- a/browser_tests/tests/dialogs/queueClearHistory.spec.ts +++ b/browser_tests/tests/dialogs/queueClearHistory.spec.ts @@ -60,7 +60,7 @@ test.describe('Queue Clear History Dialog', { tag: '@ui' }, () => { }) await dialog.getByRole('button', { name: 'Cancel' }).click() - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() expect(clearCalled).toBe(false) await comfyPage.page.unroute('**/api/history') @@ -83,7 +83,7 @@ test.describe('Queue Clear History Dialog', { tag: '@ui' }, () => { }) await dialog.getByLabel('Close').click() - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() expect(clearCalled).toBe(false) await comfyPage.page.unroute('**/api/history') @@ -106,7 +106,7 @@ test.describe('Queue Clear History Dialog', { tag: '@ui' }, () => { const request = await clearPromise expect(request.postDataJSON()).toEqual({ clear: true }) - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() }) test('Dialog state resets after close and reopen', async ({ comfyPage }) => { @@ -114,7 +114,7 @@ test.describe('Queue Clear History Dialog', { tag: '@ui' }, () => { const dialog = comfyPage.confirmDialog.root await expect(dialog).toBeVisible() await dialog.getByRole('button', { name: 'Cancel' }).click() - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() await comfyPage.queuePanel.openClearHistoryDialog() await expect(dialog).toBeVisible() diff --git a/browser_tests/tests/dialogs/settingsDialog.spec.ts b/browser_tests/tests/dialogs/settingsDialog.spec.ts index a243569ecbd..118941dca30 100644 --- a/browser_tests/tests/dialogs/settingsDialog.spec.ts +++ b/browser_tests/tests/dialogs/settingsDialog.spec.ts @@ -61,7 +61,7 @@ test.describe('Settings dialog', { tag: '@ui' }, () => { await expect(dialog.root).toBeVisible() await dialog.close() - await expect(dialog.root).not.toBeVisible() + await expect(dialog.root).toBeHidden() }) test('Escape key closes dialog', async ({ comfyPage }) => { @@ -70,7 +70,7 @@ test.describe('Settings dialog', { tag: '@ui' }, () => { await expect(dialog.root).toBeVisible() await comfyPage.page.keyboard.press('Escape') - await expect(dialog.root).not.toBeVisible() + await expect(dialog.root).toBeHidden() }) test('Search filters settings list', async ({ comfyPage }) => { diff --git a/browser_tests/tests/domWidget.spec.ts b/browser_tests/tests/domWidget.spec.ts index 83498ea78e3..1611d364ab7 100644 --- a/browser_tests/tests/domWidget.spec.ts +++ b/browser_tests/tests/domWidget.spec.ts @@ -10,7 +10,7 @@ test.describe('DOM Widget', { tag: '@widget' }, () => { test('Collapsed multiline textarea is not visible', async ({ comfyPage }) => { await comfyPage.workflow.loadWorkflow('widgets/collapsed_multiline') const textareaWidget = comfyPage.page.locator('.comfy-multiline-input') - await expect(textareaWidget).not.toBeVisible() + await expect(textareaWidget).toBeHidden() }) test('Multiline textarea correctly collapses', async ({ comfyPage }) => { @@ -25,8 +25,8 @@ test.describe('DOM Widget', { tag: '@widget' }, () => { for (const node of nodes) { await node.click('collapse') } - await expect(firstMultiline).not.toBeVisible() - await expect(lastMultiline).not.toBeVisible() + await expect(firstMultiline).toBeHidden() + await expect(lastMultiline).toBeHidden() }) test( @@ -35,7 +35,7 @@ test.describe('DOM Widget', { tag: '@widget' }, () => { async ({ comfyPage }) => { await comfyPage.settings.setSetting('Comfy.UseNewMenu', 'Top') await comfyPage.command.executeCommand('Workspace.ToggleFocusMode') - await expect(comfyPage.menu.sideToolbar).not.toBeVisible() + await expect(comfyPage.menu.sideToolbar).toBeHidden() await expect(comfyPage.canvas).toHaveScreenshot('focus-mode-on.png') } ) diff --git a/browser_tests/tests/errorDialog.spec.ts b/browser_tests/tests/errorDialog.spec.ts index 658a19c7e9f..133dc614862 100644 --- a/browser_tests/tests/errorDialog.spec.ts +++ b/browser_tests/tests/errorDialog.spec.ts @@ -74,7 +74,7 @@ test.describe('Error dialog', () => { }) => { const errorDialog = await triggerConfigureError(comfyPage) await expect(errorDialog).toBeVisible() - await expect(errorDialog.locator('pre')).not.toBeVisible() + await expect(errorDialog.locator('pre')).toBeHidden() await errorDialog.getByTestId(TestIds.dialogs.errorDialogShowReport).click() @@ -83,7 +83,7 @@ test.describe('Error dialog', () => { await expect(reportPre).toHaveText(/\S/) await expect( errorDialog.getByTestId(TestIds.dialogs.errorDialogShowReport) - ).not.toBeVisible() + ).toBeHidden() }) test('Should copy report to clipboard when "Copy to Clipboard" is clicked', async ({ diff --git a/browser_tests/tests/errorOverlay.spec.ts b/browser_tests/tests/errorOverlay.spec.ts index a0e95854e99..f4ac69f5394 100644 --- a/browser_tests/tests/errorOverlay.spec.ts +++ b/browser_tests/tests/errorOverlay.spec.ts @@ -100,7 +100,7 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await errorOverlay .getByTestId(TestIds.dialogs.errorOverlayDismiss) .click() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() await comfyPage.canvas.click() await comfyPage.nextFrame() @@ -112,10 +112,10 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await comfyPage.nextFrame() await comfyPage.keyboard.undo() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() await comfyPage.keyboard.redo() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() }) }) @@ -156,7 +156,7 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await overlay.getByTestId(TestIds.dialogs.errorOverlaySeeErrors).click() - await expect(overlay).not.toBeVisible() + await expect(overlay).toBeHidden() await expect(comfyPage.page.getByTestId('properties-panel')).toBeVisible() }) @@ -168,7 +168,7 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await overlay.getByTestId(TestIds.dialogs.errorOverlaySeeErrors).click() - await expect(overlay).not.toBeVisible() + await expect(overlay).toBeHidden() }) test('"Dismiss" closes overlay without opening panel', async ({ @@ -181,10 +181,10 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await overlay.getByTestId(TestIds.dialogs.errorOverlayDismiss).click() - await expect(overlay).not.toBeVisible() + await expect(overlay).toBeHidden() await expect( comfyPage.page.getByTestId('properties-panel') - ).not.toBeVisible() + ).toBeHidden() }) test('Close button (X) dismisses overlay', async ({ comfyPage }) => { @@ -195,7 +195,7 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await overlay.getByRole('button', { name: /close/i }).click() - await expect(overlay).not.toBeVisible() + await expect(overlay).toBeHidden() }) }) }) diff --git a/browser_tests/tests/focusMode.spec.ts b/browser_tests/tests/focusMode.spec.ts index 7f9c3c24040..3e182c827b6 100644 --- a/browser_tests/tests/focusMode.spec.ts +++ b/browser_tests/tests/focusMode.spec.ts @@ -14,12 +14,12 @@ test.describe('Focus Mode', { tag: '@ui' }, () => { await comfyPage.setFocusMode(true) - await expect(comfyPage.menu.sideToolbar).not.toBeVisible() + await expect(comfyPage.menu.sideToolbar).toBeHidden() }) test('Focus mode restores UI chrome', async ({ comfyPage }) => { await comfyPage.setFocusMode(true) - await expect(comfyPage.menu.sideToolbar).not.toBeVisible() + await expect(comfyPage.menu.sideToolbar).toBeHidden() await comfyPage.setFocusMode(false) await expect(comfyPage.menu.sideToolbar).toBeVisible() @@ -29,7 +29,7 @@ test.describe('Focus Mode', { tag: '@ui' }, () => { await expect(comfyPage.menu.sideToolbar).toBeVisible() await comfyPage.command.executeCommand('Workspace.ToggleFocusMode') - await expect(comfyPage.menu.sideToolbar).not.toBeVisible() + await expect(comfyPage.menu.sideToolbar).toBeHidden() await comfyPage.command.executeCommand('Workspace.ToggleFocusMode') await expect(comfyPage.menu.sideToolbar).toBeVisible() @@ -41,7 +41,7 @@ test.describe('Focus Mode', { tag: '@ui' }, () => { await comfyPage.setFocusMode(true) - await expect(topMenu).not.toBeVisible() + await expect(topMenu).toBeHidden() }) test('Canvas remains visible in focus mode', async ({ comfyPage }) => { @@ -52,12 +52,12 @@ test.describe('Focus Mode', { tag: '@ui' }, () => { test('Focus mode can be toggled multiple times', async ({ comfyPage }) => { await comfyPage.setFocusMode(true) - await expect(comfyPage.menu.sideToolbar).not.toBeVisible() + await expect(comfyPage.menu.sideToolbar).toBeHidden() await comfyPage.setFocusMode(false) await expect(comfyPage.menu.sideToolbar).toBeVisible() await comfyPage.setFocusMode(true) - await expect(comfyPage.menu.sideToolbar).not.toBeVisible() + await expect(comfyPage.menu.sideToolbar).toBeHidden() }) }) diff --git a/browser_tests/tests/graphCanvasMenu.spec.ts b/browser_tests/tests/graphCanvasMenu.spec.ts index c8cc501e310..d311b8a42f6 100644 --- a/browser_tests/tests/graphCanvasMenu.spec.ts +++ b/browser_tests/tests/graphCanvasMenu.spec.ts @@ -94,6 +94,6 @@ test.describe('Graph Canvas Menu', { tag: ['@screenshot', '@canvas'] }, () => { await backdrop.click() // Modal should be hidden - await expect(zoomModal).not.toBeVisible() + await expect(zoomModal).toBeHidden() }) }) diff --git a/browser_tests/tests/groupNode.spec.ts b/browser_tests/tests/groupNode.spec.ts index 8b271a777c2..33af2b28976 100644 --- a/browser_tests/tests/groupNode.spec.ts +++ b/browser_tests/tests/groupNode.spec.ts @@ -157,7 +157,7 @@ test.describe('Group Node', { tag: '@node' }, () => { await comfyPage.nextFrame() await expect(manage1.selectedNodeTypeSelect).toHaveValue('g1') await manage1.close() - await expect(manage1.root).not.toBeVisible() + await expect(manage1.root).toBeHidden() const manage2 = await group2.manageGroupNode() await expect(manage2.selectedNodeTypeSelect).toHaveValue('g2') @@ -244,7 +244,7 @@ test.describe('Group Node', { tag: '@node' }, () => { await expect.poll(() => comfyPage.nodeOps.getGraphNodesCount()).toBe(1) await expect( comfyPage.page.getByTestId(TestIds.dialogs.errorOverlay) - ).not.toBeVisible() + ).toBeHidden() }) test.describe('Copy and paste', () => { diff --git a/browser_tests/tests/jobHistoryActions.spec.ts b/browser_tests/tests/jobHistoryActions.spec.ts index 3d7ab67265c..a936054fcf1 100644 --- a/browser_tests/tests/jobHistoryActions.spec.ts +++ b/browser_tests/tests/jobHistoryActions.spec.ts @@ -62,7 +62,7 @@ test.describe('Job History Actions', { tag: '@ui' }, () => { await expect(action).toBeVisible() await action.click() - await expect(action).not.toBeVisible() + await expect(action).toBeHidden() }) test('Clicking show run progress bar toggles setting', async ({ diff --git a/browser_tests/tests/linearMode.spec.ts b/browser_tests/tests/linearMode.spec.ts index 0324e57746b..93f78ec77a4 100644 --- a/browser_tests/tests/linearMode.spec.ts +++ b/browser_tests/tests/linearMode.spec.ts @@ -39,13 +39,13 @@ test.describe('Linear Mode', { tag: '@ui' }, () => { await comfyPage.appMode.toggleAppMode() await expect(comfyPage.canvas).toBeVisible() - await expect(comfyPage.page.getByTestId('linear-widgets')).not.toBeVisible() + await expect(comfyPage.page.getByTestId('linear-widgets')).toBeHidden() }) test('Canvas not visible in app mode', async ({ comfyPage }) => { await comfyPage.appMode.enterAppModeWithInputs([]) await expect(comfyPage.page.getByTestId('linear-widgets')).toBeVisible() - await expect(comfyPage.canvas).not.toBeVisible() + await expect(comfyPage.canvas).toBeHidden() }) }) diff --git a/browser_tests/tests/menu.spec.ts b/browser_tests/tests/menu.spec.ts index 9eaba5e20d0..7c9c2aaba19 100644 --- a/browser_tests/tests/menu.spec.ts +++ b/browser_tests/tests/menu.spec.ts @@ -101,7 +101,7 @@ test.describe('Menu', { tag: '@ui' }, () => { // Check initial state of bottom panel (it's initially hidden) const { bottomPanel } = comfyPage - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() // Checkmark should be invisible initially (panel is hidden) await expect(checkmark).toHaveClass(/invisible/) @@ -126,7 +126,7 @@ test.describe('Menu', { tag: '@ui' }, () => { await expect(viewSubmenu).toBeVisible() // Verify bottom panel is hidden again - await expect(bottomPanel.root).not.toBeVisible() + await expect(bottomPanel.root).toBeHidden() // Checkmark should be invisible again (panel is hidden) await expect(checkmark).toHaveClass(/invisible/) @@ -138,7 +138,7 @@ test.describe('Menu', { tag: '@ui' }, () => { .click({ position: { x: viewport.width - 10, y: 10 } }) // Verify menu is now closed - await expect(menu).not.toBeVisible() + await expect(menu).toBeHidden() }) test('Displays keybinding next to item', async ({ comfyPage }) => { diff --git a/browser_tests/tests/minimap.spec.ts b/browser_tests/tests/minimap.spec.ts index 23e77787745..2eccf157c45 100644 --- a/browser_tests/tests/minimap.spec.ts +++ b/browser_tests/tests/minimap.spec.ts @@ -53,7 +53,7 @@ test.describe('Minimap', { tag: '@canvas' }, () => { await expect(minimapContainer).toBeVisible() await toggleButton.click() - await expect(minimapContainer).not.toBeVisible() + await expect(minimapContainer).toBeHidden() await toggleButton.click() await expect(minimapContainer).toBeVisible() @@ -65,7 +65,7 @@ test.describe('Minimap', { tag: '@canvas' }, () => { await expect(minimapContainer).toBeVisible() await comfyPage.page.keyboard.press('Alt+KeyM') - await expect(minimapContainer).not.toBeVisible() + await expect(minimapContainer).toBeHidden() await comfyPage.page.keyboard.press('Alt+KeyM') await expect(minimapContainer).toBeVisible() @@ -76,7 +76,7 @@ test.describe('Minimap', { tag: '@canvas' }, () => { await expect(minimap).toBeVisible() await comfyPage.page.getByTestId(TestIds.canvas.closeMinimapButton).click() - await expect(minimap).not.toBeVisible() + await expect(minimap).toBeHidden() const toggleButton = comfyPage.page.getByTestId( TestIds.canvas.toggleMinimapButton diff --git a/browser_tests/tests/nodeDisplay.spec.ts b/browser_tests/tests/nodeDisplay.spec.ts index b2ab74c92ba..cdabd2dcfae 100644 --- a/browser_tests/tests/nodeDisplay.spec.ts +++ b/browser_tests/tests/nodeDisplay.spec.ts @@ -40,7 +40,7 @@ test.describe('Optional input', { tag: ['@screenshot', '@node'] }, () => { await expect.poll(() => comfyPage.nodeOps.getGraphNodesCount()).toBe(1) await expect( comfyPage.page.getByTestId(TestIds.dialogs.errorOverlay) - ).not.toBeVisible() + ).toBeHidden() // If the node's multiline text widget is visible, then it was loaded successfully await expect(comfyPage.page.locator('.comfy-multiline-input')).toHaveCount( diff --git a/browser_tests/tests/nodeHelp.spec.ts b/browser_tests/tests/nodeHelp.spec.ts index 23535d91cef..ee8b37a94ea 100644 --- a/browser_tests/tests/nodeHelp.spec.ts +++ b/browser_tests/tests/nodeHelp.spec.ts @@ -191,7 +191,7 @@ test.describe('Node Help', { tag: ['@slow', '@ui'] }, () => { ).toBeVisible() // Verify help page is no longer visible - await expect(helpPage.locator('.node-help-content')).not.toBeVisible() + await expect(helpPage.locator('.node-help-content')).toBeHidden() }) }) @@ -505,7 +505,7 @@ This is English documentation. // Should show fallback content (node description) await expect(helpPage).toBeVisible() - await expect(helpPage.locator('.p-progressspinner')).not.toBeVisible() + await expect(helpPage.locator('.p-progressspinner')).toBeHidden() // Should show some content even on error await expect(helpPage).not.toHaveText('') diff --git a/browser_tests/tests/nodeSearchBox.spec.ts b/browser_tests/tests/nodeSearchBox.spec.ts index 8b32698f15f..7bf5b6e95a3 100644 --- a/browser_tests/tests/nodeSearchBox.spec.ts +++ b/browser_tests/tests/nodeSearchBox.spec.ts @@ -203,7 +203,7 @@ test.describe('Node search box', { tag: '@node' }, () => { await comfyPage.page.keyboard.press('Escape') // Verify the filter selection panel is hidden - await expect(panel.header).not.toBeVisible() + await expect(panel.header).toBeHidden() // Verify the node search dialog is still visible await expect(comfyPage.searchBox.input).toBeVisible() diff --git a/browser_tests/tests/nodeSearchBoxV2.spec.ts b/browser_tests/tests/nodeSearchBoxV2.spec.ts index f1cc17d9e1f..ee0571a4d41 100644 --- a/browser_tests/tests/nodeSearchBoxV2.spec.ts +++ b/browser_tests/tests/nodeSearchBoxV2.spec.ts @@ -29,7 +29,7 @@ test.describe('Node search box V2', { tag: '@node' }, () => { await expect(searchBoxV2.results.first()).toBeVisible() await comfyPage.page.keyboard.press('Enter') - await expect(searchBoxV2.input).not.toBeVisible() + await expect(searchBoxV2.input).toBeHidden() await expect .poll(() => comfyPage.nodeOps.getGraphNodesCount()) @@ -48,7 +48,7 @@ test.describe('Node search box V2', { tag: '@node' }, () => { // Enter should add the first (selected) result await comfyPage.page.keyboard.press('Enter') - await expect(searchBoxV2.input).not.toBeVisible() + await expect(searchBoxV2.input).toBeHidden() await expect .poll(() => comfyPage.nodeOps.getGraphNodesCount()) @@ -141,7 +141,7 @@ test.describe('Node search box V2', { tag: '@node' }, () => { // Enter selects and adds node await comfyPage.page.keyboard.press('Enter') - await expect(searchBoxV2.input).not.toBeVisible() + await expect(searchBoxV2.input).toBeHidden() await expect .poll(() => comfyPage.nodeOps.getGraphNodesCount()) diff --git a/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts b/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts index f77b54e8c78..9d2abbf6702 100644 --- a/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts +++ b/browser_tests/tests/nodeSearchBoxV2Extended.spec.ts @@ -39,7 +39,7 @@ test.describe('Node search box V2 extended', { tag: '@node' }, () => { await expect(searchBoxV2.results.first()).toBeVisible() await comfyPage.page.keyboard.press('Escape') - await expect(searchBoxV2.input).not.toBeVisible() + await expect(searchBoxV2.input).toBeHidden() await expect .poll(() => comfyPage.nodeOps.getGraphNodesCount()) @@ -56,7 +56,7 @@ test.describe('Node search box V2 extended', { tag: '@node' }, () => { await expect(searchBoxV2.results.first()).toBeVisible() await comfyPage.page.keyboard.press('Escape') - await expect(searchBoxV2.input).not.toBeVisible() + await expect(searchBoxV2.input).toBeHidden() await comfyPage.canvasOps.doubleClick() await expect(searchBoxV2.input).toBeVisible() @@ -115,7 +115,7 @@ test.describe('Node search box V2 extended', { tag: '@node' }, () => { await filterChip.getByTestId('chip-delete').click() // Filter chip should be removed - await expect(filterChip).not.toBeVisible() + await expect(filterChip).toBeHidden() await expect(searchBoxV2.results.first()).toBeVisible() }) }) diff --git a/browser_tests/tests/propertiesPanel/ErrorsTabHelper.ts b/browser_tests/tests/propertiesPanel/ErrorsTabHelper.ts index 6b664cb4ab8..7e67c6b8e06 100644 --- a/browser_tests/tests/propertiesPanel/ErrorsTabHelper.ts +++ b/browser_tests/tests/propertiesPanel/ErrorsTabHelper.ts @@ -13,5 +13,5 @@ export async function openErrorsTabViaSeeErrors( await expect(errorOverlay).toBeVisible() await errorOverlay.getByTestId(TestIds.dialogs.errorOverlaySeeErrors).click() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() } diff --git a/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts b/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts index 190f1545832..d7b425af8d7 100644 --- a/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts +++ b/browser_tests/tests/propertiesPanel/PropertiesPanelHelper.ts @@ -76,7 +76,7 @@ export class PropertiesPanelHelper { async close(): Promise { if (await this.root.isVisible()) { await this.closeButton.click() - await expect(this.root).not.toBeVisible() + await expect(this.root).toBeHidden() } } diff --git a/browser_tests/tests/propertiesPanel/errorsTab.spec.ts b/browser_tests/tests/propertiesPanel/errorsTab.spec.ts index cd2c2cdfd73..87d61cdd8fc 100644 --- a/browser_tests/tests/propertiesPanel/errorsTab.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTab.spec.ts @@ -33,7 +33,7 @@ test.describe('Errors tab - common', { tag: '@ui' }, () => { await comfyPage.actionbar.propertiesButton.click() const panel = new PropertiesPanelHelper(comfyPage.page) - await expect(panel.errorsTabIcon).not.toBeVisible() + await expect(panel.errorsTabIcon).toBeHidden() }) }) @@ -55,7 +55,7 @@ test.describe('Errors tab - common', { tag: '@ui' }, () => { await errorOverlay .getByTestId(TestIds.dialogs.errorOverlaySeeErrors) .click() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() const runtimePanel = comfyPage.page.getByTestId( TestIds.dialogs.runtimeErrorPanel diff --git a/browser_tests/tests/propertiesPanel/errorsTabExecution.spec.ts b/browser_tests/tests/propertiesPanel/errorsTabExecution.spec.ts index 11c8b519cdd..8bcad029f78 100644 --- a/browser_tests/tests/propertiesPanel/errorsTabExecution.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTabExecution.spec.ts @@ -26,7 +26,7 @@ test.describe('Errors tab - Execution errors', { tag: '@ui' }, () => { await errorOverlay .getByTestId(TestIds.dialogs.errorOverlaySeeErrors) .click() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() } test('Should show Find on GitHub and Copy buttons in error card', async ({ diff --git a/browser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.ts b/browser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.ts index be6578a581a..5d367395ef0 100644 --- a/browser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTabMissingMedia.spec.ts @@ -104,6 +104,7 @@ test.describe('Errors tab - Missing media', { tag: '@ui' }, () => { const optionCount = await comfyPage.page.getByRole('option').count() if (optionCount === 0) { + // oxlint-disable-next-line playwright/no-skipped-test -- no library options available in CI test.skip() return } @@ -125,13 +126,13 @@ test.describe('Errors tab - Missing media', { tag: '@ui' }, () => { await uploadFileViaDropzone(comfyPage) await expect(getStatusCard(comfyPage)).toBeVisible() - await expect(getDropzone(comfyPage)).not.toBeVisible() + await expect(getDropzone(comfyPage)).toBeHidden() await comfyPage.page .getByTestId(TestIds.dialogs.missingMediaCancelButton) .click() - await expect(getStatusCard(comfyPage)).not.toBeVisible() + await expect(getStatusCard(comfyPage)).toBeHidden() await expect(getDropzone(comfyPage)).toBeVisible() }) }) @@ -146,7 +147,7 @@ test.describe('Errors tab - Missing media', { tag: '@ui' }, () => { await expect( comfyPage.page.getByTestId(TestIds.dialogs.missingMediaGroup) - ).not.toBeVisible() + ).toBeHidden() }) }) diff --git a/browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts b/browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts index db58e88f26c..cf3d06a9fcc 100644 --- a/browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts @@ -57,7 +57,7 @@ test.describe('Errors tab - Missing models', { tag: '@ui' }, () => { const locateButton = comfyPage.page.getByTestId( TestIds.dialogs.missingModelLocate ) - await expect(locateButton.first()).not.toBeVisible() + await expect(locateButton.first()).toBeHidden() const expandButton = comfyPage.page.getByTestId( TestIds.dialogs.missingModelExpand diff --git a/browser_tests/tests/propertiesPanel/errorsTabMissingNodes.spec.ts b/browser_tests/tests/propertiesPanel/errorsTabMissingNodes.spec.ts index 7b4932f6598..eecbce22232 100644 --- a/browser_tests/tests/propertiesPanel/errorsTabMissingNodes.spec.ts +++ b/browser_tests/tests/propertiesPanel/errorsTabMissingNodes.spec.ts @@ -74,7 +74,7 @@ test.describe('Errors tab - Missing nodes', { tag: '@ui' }, () => { .click() await expect( missingNodeCard.getByText('MISSING_NODE_TYPE_IN_SUBGRAPH') - ).not.toBeVisible() + ).toBeHidden() }) test('Locate node button is visible for expanded pack nodes', async ({ diff --git a/browser_tests/tests/propertiesPanel/nodeSelection.spec.ts b/browser_tests/tests/propertiesPanel/nodeSelection.spec.ts index ab8f5d981d1..041445939dc 100644 --- a/browser_tests/tests/propertiesPanel/nodeSelection.spec.ts +++ b/browser_tests/tests/propertiesPanel/nodeSelection.spec.ts @@ -27,7 +27,7 @@ test.describe('Properties panel - Node selection', () => { }) test('should not show Nodes tab for single node', async () => { - await expect(panel.getTab('Nodes')).not.toBeVisible() + await expect(panel.getTab('Nodes')).toBeHidden() }) test('should display node widgets in Parameters tab', async () => { @@ -65,7 +65,7 @@ test.describe('Properties panel - Node selection', () => { 'KSampler', 'CLIP Text Encode (Prompt)' ]) - await expect(panel.getTab('Info')).not.toBeVisible() + await expect(panel.getTab('Info')).toBeHidden() }) }) diff --git a/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts b/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts index f0824623241..4b612ce755a 100644 --- a/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts +++ b/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts @@ -42,8 +42,8 @@ test.describe('Properties panel - Node settings', () => { await expect(nodeLocator.getByText('Bypassed')).toBeVisible() await panel.getNodeStateButton('Normal').click() - await expect(nodeLocator.getByText('Bypassed')).not.toBeVisible() - await expect(nodeLocator.getByText('Muted')).not.toBeVisible() + await expect(nodeLocator.getByText('Bypassed')).toBeHidden() + await expect(nodeLocator.getByText('Muted')).toBeHidden() }) }) @@ -116,7 +116,7 @@ test.describe('Properties panel - Node settings', () => { await panel.pinnedSwitch.click() await expect( nodeLocator.getByTestId('node-pin-indicator') - ).not.toBeVisible() + ).toBeHidden() }) }) }) diff --git a/browser_tests/tests/propertiesPanel/openClose.spec.ts b/browser_tests/tests/propertiesPanel/openClose.spec.ts index 33d5a3af756..c190c5d20c3 100644 --- a/browser_tests/tests/propertiesPanel/openClose.spec.ts +++ b/browser_tests/tests/propertiesPanel/openClose.spec.ts @@ -11,7 +11,7 @@ test.describe('Properties panel - Open and close', () => { }) test('should open via actionbar toggle button', async ({ comfyPage }) => { - await expect(panel.root).not.toBeVisible() + await expect(panel.root).toBeHidden() await comfyPage.actionbar.propertiesButton.click() await expect(panel.root).toBeVisible() }) @@ -20,13 +20,13 @@ test.describe('Properties panel - Open and close', () => { await comfyPage.actionbar.propertiesButton.click() await expect(panel.root).toBeVisible() await panel.closeButton.click() - await expect(panel.root).not.toBeVisible() + await expect(panel.root).toBeHidden() }) test('should close via close button after opening', async ({ comfyPage }) => { await comfyPage.actionbar.propertiesButton.click() await expect(panel.root).toBeVisible() await panel.close() - await expect(panel.root).not.toBeVisible() + await expect(panel.root).toBeHidden() }) }) diff --git a/browser_tests/tests/propertiesPanel/titleEditing.spec.ts b/browser_tests/tests/propertiesPanel/titleEditing.spec.ts index fe619552b3e..6656ca48933 100644 --- a/browser_tests/tests/propertiesPanel/titleEditing.spec.ts +++ b/browser_tests/tests/propertiesPanel/titleEditing.spec.ts @@ -34,7 +34,7 @@ test.describe('Properties panel - Title editing', () => { 'KSampler', 'CLIP Text Encode (Prompt)' ]) - await expect(panel.titleEditIcon).not.toBeVisible() + await expect(panel.titleEditIcon).toBeHidden() }) test('should not show pencil icon when nothing is selected', async ({ @@ -44,6 +44,6 @@ test.describe('Properties panel - Title editing', () => { window.app!.canvas.deselectAll() }) await expect(panel.panelTitle).toContainText('Workflow Overview') - await expect(panel.titleEditIcon).not.toBeVisible() + await expect(panel.titleEditIcon).toBeHidden() }) }) diff --git a/browser_tests/tests/propertiesPanel/workflowOverview.spec.ts b/browser_tests/tests/propertiesPanel/workflowOverview.spec.ts index 6eafe759755..d2d715e4057 100644 --- a/browser_tests/tests/propertiesPanel/workflowOverview.spec.ts +++ b/browser_tests/tests/propertiesPanel/workflowOverview.spec.ts @@ -23,7 +23,7 @@ test.describe('Properties panel - Workflow Overview', () => { }) test('should not show Info tab when nothing is selected', async () => { - await expect(panel.getTab('Info')).not.toBeVisible() + await expect(panel.getTab('Info')).toBeHidden() }) test('should switch to Nodes tab and list all workflow nodes', async ({ diff --git a/browser_tests/tests/queue/queueOverlay.spec.ts b/browser_tests/tests/queue/queueOverlay.spec.ts index 8529ec07338..402580aeb0d 100644 --- a/browser_tests/tests/queue/queueOverlay.spec.ts +++ b/browser_tests/tests/queue/queueOverlay.spec.ts @@ -93,7 +93,7 @@ test.describe('Queue overlay', () => { ).toBeVisible() await expect( comfyPage.page.locator('[data-job-id="job-failed-1"]') - ).not.toBeVisible() + ).toBeHidden() }) test('Toggling overlay again closes it', async ({ comfyPage }) => { @@ -106,6 +106,6 @@ test.describe('Queue overlay', () => { await expect( comfyPage.page.locator('[data-job-id]').first() - ).not.toBeVisible() + ).toBeHidden() }) }) diff --git a/browser_tests/tests/releaseNotifications.spec.ts b/browser_tests/tests/releaseNotifications.spec.ts index fdfaf897313..ed3acfa0c68 100644 --- a/browser_tests/tests/releaseNotifications.spec.ts +++ b/browser_tests/tests/releaseNotifications.spec.ts @@ -73,7 +73,7 @@ test.describe('Release Notifications', () => { // Close help center by dismissable mask await comfyPage.page.locator('.help-center-backdrop').click() - await expect(helpMenu).not.toBeVisible() + await expect(helpMenu).toBeHidden() }) test('should not show release notifications when mocked (default behavior)', async ({ @@ -103,10 +103,10 @@ test.describe('Release Notifications', () => { ).toBeVisible() // Should not show any popups or toasts - await expect(comfyPage.page.locator('.whats-new-popup')).not.toBeVisible() + await expect(comfyPage.page.locator('.whats-new-popup')).toBeHidden() await expect( comfyPage.page.locator('.release-notification-toast') - ).not.toBeVisible() + ).toBeHidden() }) test('should handle release API errors gracefully', async ({ comfyPage }) => { @@ -189,13 +189,13 @@ test.describe('Release Notifications', () => { const whatsNewSection = comfyPage.page.getByTestId( TestIds.dialogs.whatsNewSection ) - await expect(whatsNewSection).not.toBeVisible() + await expect(whatsNewSection).toBeHidden() // Should not show any popups or toasts - await expect(comfyPage.page.locator('.whats-new-popup')).not.toBeVisible() + await expect(comfyPage.page.locator('.whats-new-popup')).toBeHidden() await expect( comfyPage.page.locator('.release-notification-toast') - ).not.toBeVisible() + ).toBeHidden() }) test('should not make API calls when notifications are disabled', async ({ @@ -337,7 +337,7 @@ test.describe('Release Notifications', () => { await helpCenterButton.click() // Verify "What's New?" section is now hidden - await expect(whatsNewSection).not.toBeVisible() + await expect(whatsNewSection).toBeHidden() }) test('should handle edge case with empty releases and disabled notifications', async ({ @@ -381,6 +381,6 @@ test.describe('Release Notifications', () => { const whatsNewSection = comfyPage.page.getByTestId( TestIds.dialogs.whatsNewSection ) - await expect(whatsNewSection).not.toBeVisible() + await expect(whatsNewSection).toBeHidden() }) }) diff --git a/browser_tests/tests/resultGallery.spec.ts b/browser_tests/tests/resultGallery.spec.ts index d991c7eef05..d28c60217ec 100644 --- a/browser_tests/tests/resultGallery.spec.ts +++ b/browser_tests/tests/resultGallery.spec.ts @@ -56,13 +56,13 @@ test.describe('MediaLightbox', { tag: ['@slow'] }, () => { await runAndOpenGallery(comfyPage) await comfyPage.page.keyboard.press('Escape') - await expect(comfyPage.mediaLightbox.root).not.toBeVisible() + await expect(comfyPage.mediaLightbox.root).toBeHidden() }) test('closes gallery when clicking close button', async ({ comfyPage }) => { await runAndOpenGallery(comfyPage) await comfyPage.mediaLightbox.closeButton.click() - await expect(comfyPage.mediaLightbox.root).not.toBeVisible() + await expect(comfyPage.mediaLightbox.root).toBeHidden() }) }) diff --git a/browser_tests/tests/selectionToolbox.spec.ts b/browser_tests/tests/selectionToolbox.spec.ts index 380c2de3993..003497c439d 100644 --- a/browser_tests/tests/selectionToolbox.spec.ts +++ b/browser_tests/tests/selectionToolbox.spec.ts @@ -31,7 +31,7 @@ test.describe('Selection Toolbox', { tag: ['@screenshot', '@ui'] }, () => { test('shows selection toolbox', async ({ comfyPage }) => { // By default, selection toolbox should be enabled - await expect(comfyPage.selectionToolbox).not.toBeVisible() + await expect(comfyPage.selectionToolbox).toBeHidden() // Select multiple nodes await comfyPage.nodeOps.selectNodes([ @@ -87,7 +87,7 @@ test.describe('Selection Toolbox', { tag: ['@screenshot', '@ui'] }, () => { await comfyPage.page.mouse.down() await comfyPage.page.mouse.move(nodePos.x + 200, nodePos.y + 200) await comfyPage.nextFrame() - await expect(comfyPage.selectionToolbox).not.toBeVisible() + await expect(comfyPage.selectionToolbox).toBeHidden() }) test('shows border only with multiple selections', async ({ comfyPage }) => { @@ -142,7 +142,7 @@ test.describe('Selection Toolbox', { tag: ['@screenshot', '@ui'] }, () => { comfyPage.page.locator( '.selection-toolbox *[data-testid="bypass-button"]' ) - ).not.toBeVisible() + ).toBeHidden() }) test.describe('Color Picker', () => { @@ -170,7 +170,7 @@ test.describe('Selection Toolbox', { tag: ['@screenshot', '@ui'] }, () => { await blueColorOption.click() // Dropdown should close after selection - await expect(colorPickerGroup).not.toBeVisible() + await expect(colorPickerGroup).toBeHidden() // Node should have the selected color class/style // Note: Exact verification method depends on how color is applied to nodes diff --git a/browser_tests/tests/selectionToolboxActions.spec.ts b/browser_tests/tests/selectionToolboxActions.spec.ts index f51311fdfd2..c68b3c29296 100644 --- a/browser_tests/tests/selectionToolboxActions.spec.ts +++ b/browser_tests/tests/selectionToolboxActions.spec.ts @@ -225,7 +225,7 @@ test.describe('Selection Toolbox - Button Actions', { tag: '@ui' }, () => { const frameButton = comfyPage.page.getByRole('button', { name: /Frame Nodes/i }) - await expect(frameButton).not.toBeVisible() + await expect(frameButton).toBeHidden() }) test('execute button visible when output node selected', async ({ @@ -255,6 +255,6 @@ test.describe('Selection Toolbox - Button Actions', { tag: '@ui' }, () => { const executeButton = comfyPage.page.getByRole('button', { name: /Execute to selected output nodes/i }) - await expect(executeButton).not.toBeVisible() + await expect(executeButton).toBeHidden() }) }) diff --git a/browser_tests/tests/selectionToolboxSubmenus.spec.ts b/browser_tests/tests/selectionToolboxSubmenus.spec.ts index b5c56987401..c4b5e027c0d 100644 --- a/browser_tests/tests/selectionToolboxSubmenus.spec.ts +++ b/browser_tests/tests/selectionToolboxSubmenus.spec.ts @@ -160,7 +160,7 @@ test.describe( await comfyPage.nextFrame() await expect( comfyPage.page.getByText('Rename', { exact: true }) - ).not.toBeVisible() + ).toBeHidden() }) test('closes More Options menu when clicking the button again (toggle)', async ({ @@ -189,7 +189,7 @@ test.describe( await expect( comfyPage.page.getByText('Rename', { exact: true }) - ).not.toBeVisible() + ).toBeHidden() }) } ) diff --git a/browser_tests/tests/sidebar/assets.spec.ts b/browser_tests/tests/sidebar/assets.spec.ts index 904a0804de3..69a258c1ea1 100644 --- a/browser_tests/tests/sidebar/assets.spec.ts +++ b/browser_tests/tests/sidebar/assets.spec.ts @@ -746,7 +746,7 @@ test.describe('Assets sidebar - delete confirmation', () => { await comfyPage.confirmDialog.delete.click() - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() await expect(tab.assetCards).toHaveCount(initialCount - 1) const successToast = comfyPage.page.locator('.p-toast-message-success') @@ -768,7 +768,7 @@ test.describe('Assets sidebar - delete confirmation', () => { await comfyPage.confirmDialog.reject.click() - await expect(dialog).not.toBeVisible() + await expect(dialog).toBeHidden() await expect(tab.assetCards).toHaveCount(initialCount) }) }) diff --git a/browser_tests/tests/sidebar/modelLibrary.spec.ts b/browser_tests/tests/sidebar/modelLibrary.spec.ts index cb09801af27..b49adc7cd58 100644 --- a/browser_tests/tests/sidebar/modelLibrary.spec.ts +++ b/browser_tests/tests/sidebar/modelLibrary.spec.ts @@ -118,7 +118,7 @@ test.describe('Model library sidebar - search', () => { await expect(tab.getLeafByLabel('dreamshaper_8')).toBeVisible() // Other models should not be visible - await expect(tab.getLeafByLabel('sd_xl_base_1.0')).not.toBeVisible() + await expect(tab.getLeafByLabel('sd_xl_base_1.0')).toBeHidden() }) test('Clearing search restores folder view', async ({ comfyPage }) => { diff --git a/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts b/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts index 93dc35e615e..b126b4beacb 100644 --- a/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts +++ b/browser_tests/tests/sidebar/nodeLibraryV2.spec.ts @@ -42,11 +42,11 @@ test.describe('Node library sidebar V2', () => { test('Search filters nodes in All tab', async ({ comfyPage }) => { const tab = comfyPage.menu.nodeLibraryTabV2 - await expect(tab.getNode('KSampler (Advanced)')).not.toBeVisible() + await expect(tab.getNode('KSampler (Advanced)')).toBeHidden() await tab.searchInput.fill('KSampler') await expect(tab.getNode('KSampler (Advanced)')).toBeVisible() - await expect(tab.getNode('CLIPLoader')).not.toBeVisible() + await expect(tab.getNode('CLIPLoader')).toBeHidden() }) test('Drag node to canvas adds it', async ({ comfyPage }) => { diff --git a/browser_tests/tests/sidebar/workflowSearch.spec.ts b/browser_tests/tests/sidebar/workflowSearch.spec.ts index d0b7d094fcc..36a3343038e 100644 --- a/browser_tests/tests/sidebar/workflowSearch.spec.ts +++ b/browser_tests/tests/sidebar/workflowSearch.spec.ts @@ -29,7 +29,7 @@ test.describe('Workflow sidebar - search', () => { await expect(findWorkflow(comfyPage.page, 'alpha-workflow')).toBeVisible() await expect( findWorkflow(comfyPage.page, 'beta-workflow') - ).not.toBeVisible() + ).toBeHidden() }) test('Clearing search restores all workflows', async ({ comfyPage }) => { @@ -40,7 +40,7 @@ test.describe('Workflow sidebar - search', () => { await searchInput.fill('alpha') await expect( findWorkflow(comfyPage.page, 'beta-workflow') - ).not.toBeVisible() + ).toBeHidden() await searchInput.fill('') @@ -57,9 +57,9 @@ test.describe('Workflow sidebar - search', () => { await expect( findWorkflow(comfyPage.page, 'alpha-workflow') - ).not.toBeVisible() + ).toBeHidden() await expect( findWorkflow(comfyPage.page, 'beta-workflow') - ).not.toBeVisible() + ).toBeHidden() }) }) diff --git a/browser_tests/tests/sidebar/workflows.spec.ts b/browser_tests/tests/sidebar/workflows.spec.ts index fc5c4088bb0..603de6f9047 100644 --- a/browser_tests/tests/sidebar/workflows.spec.ts +++ b/browser_tests/tests/sidebar/workflows.spec.ts @@ -265,7 +265,7 @@ test.describe('Workflows sidebar', () => { // Dismiss the error overlay await errorOverlay.getByTestId(TestIds.dialogs.errorOverlayDismiss).click() - await expect(errorOverlay).not.toBeVisible() + await expect(errorOverlay).toBeHidden() // Load blank workflow await comfyPage.menu.workflowsTab.open() @@ -316,7 +316,7 @@ test.describe('Workflows sidebar', () => { await workflowsTab.getOpenedItem(filename).click({ button: 'right' }) await comfyPage.nextFrame() await comfyPage.contextMenu.clickMenuItem('Delete') - await expect(workflowsTab.getOpenedItem(filename)).not.toBeVisible() + await expect(workflowsTab.getOpenedItem(filename)).toBeHidden() await expect .poll(() => workflowsTab.getOpenedWorkflowNames()) .toEqual(['*Unsaved Workflow']) @@ -337,7 +337,7 @@ test.describe('Workflows sidebar', () => { await comfyPage.confirmDialog.click('delete') - await expect(workflowsTab.getOpenedItem(filename)).not.toBeVisible() + await expect(workflowsTab.getOpenedItem(filename)).toBeHidden() await expect .poll(() => workflowsTab.getOpenedWorkflowNames()) .toEqual(['*Unsaved Workflow']) diff --git a/browser_tests/tests/templates.spec.ts b/browser_tests/tests/templates.spec.ts index 2070b7d1b39..24c77373682 100644 --- a/browser_tests/tests/templates.spec.ts +++ b/browser_tests/tests/templates.spec.ts @@ -40,6 +40,7 @@ test.describe('Templates', { tag: ['@slow', '@workflow'] }, () => { // page.route(), and change checkTemplateFileExists to use browser-context // fetch (page.request.head bypasses Playwright routing). // https://github.com/Comfy-Org/ComfyUI_frontend/issues/3992 + // oxlint-disable-next-line playwright/no-skipped-test -- https://github.com/Comfy-Org/ComfyUI_frontend/issues/3992 test.skip('should have all required thumbnail media for each template', async ({ comfyPage }) => { diff --git a/browser_tests/tests/useSettingSearch.spec.ts b/browser_tests/tests/useSettingSearch.spec.ts index 1f3c3c87a40..b9f150294ed 100644 --- a/browser_tests/tests/useSettingSearch.spec.ts +++ b/browser_tests/tests/useSettingSearch.spec.ts @@ -112,7 +112,7 @@ test.describe('Settings Search functionality', { tag: '@settings' }, () => { await dialog.open() await comfyPage.page.keyboard.press('Escape') - await expect(dialog.root).not.toBeVisible() + await expect(dialog.root).toBeHidden() }) test('search box has proper debouncing behavior', async ({ comfyPage }) => { diff --git a/browser_tests/tests/versionMismatchWarnings.spec.ts b/browser_tests/tests/versionMismatchWarnings.spec.ts index 56df24e7522..1e3ac8fd4d9 100644 --- a/browser_tests/tests/versionMismatchWarnings.spec.ts +++ b/browser_tests/tests/versionMismatchWarnings.spec.ts @@ -83,7 +83,7 @@ test.describe('Version Mismatch Warnings', { tag: '@slow' }, () => { // Expect no warning toast to be shown await expect( comfyPage.page.getByText('Version Compatibility Warning') - ).not.toBeVisible() + ).toBeHidden() }) test('should persist dismissed state across sessions', async ({ @@ -121,6 +121,6 @@ test.describe('Version Mismatch Warnings', { tag: '@slow' }, () => { // The same warning from same versions should not be shown to the user again await expect( comfyPage.page.getByText('Version Compatibility Warning') - ).not.toBeVisible() + ).toBeHidden() }) }) diff --git a/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts b/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts index 29e34c3b7f6..023ca1b8cbe 100644 --- a/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts @@ -143,7 +143,7 @@ test.describe('Vue Node Context Menu', () => { await openContextMenu(comfyPage, nodeTitle) await clickExactMenuItem(comfyPage, 'Unpin') - await expect(fixture.pinIndicator).not.toBeVisible() + await expect(fixture.pinIndicator).toBeHidden() await expect.poll(() => nodeRef.isPinned()).toBe(false) }) @@ -178,7 +178,7 @@ test.describe('Vue Node Context Menu', () => { await openContextMenu(comfyPage, 'KSampler') await clickExactMenuItem(comfyPage, 'Minimize Node') - await expect(fixture.body).not.toBeVisible() + await expect(fixture.body).toBeHidden() await openContextMenu(comfyPage, 'KSampler') await clickExactMenuItem(comfyPage, 'Expand Node') @@ -196,7 +196,7 @@ test.describe('Vue Node Context Menu', () => { await expect( comfyPage.vueNodes.getNodeByTitle('KSampler') - ).not.toBeVisible() + ).toBeHidden() }) }) @@ -311,7 +311,7 @@ test.describe('Vue Node Context Menu', () => { await expect(subgraphNode).toBeVisible() await expect( comfyPage.vueNodes.getNodeByTitle('KSampler') - ).not.toBeVisible() + ).toBeHidden() // Unpack the subgraph await openContextMenu(comfyPage, 'New Subgraph') @@ -320,7 +320,7 @@ test.describe('Vue Node Context Menu', () => { await expect(comfyPage.vueNodes.getNodeByTitle('KSampler')).toBeVisible() await expect( comfyPage.vueNodes.getNodeByTitle('New Subgraph') - ).not.toBeVisible() + ).toBeHidden() }) test('should open properties panel via Edit Subgraph Widgets', async ({ @@ -433,7 +433,7 @@ test.describe('Vue Node Context Menu', () => { for (const title of nodeTitles) { const fixture = await comfyPage.vueNodes.getFixtureByTitle(title) - await expect(fixture.pinIndicator).not.toBeVisible() + await expect(fixture.pinIndicator).toBeHidden() } }) @@ -474,8 +474,8 @@ test.describe('Vue Node Context Menu', () => { await openMultiNodeContextMenu(comfyPage, nodeTitles) await clickExactMenuItem(comfyPage, 'Minimize Node') - await expect(fixture1.body).not.toBeVisible() - await expect(fixture2.body).not.toBeVisible() + await expect(fixture1.body).toBeHidden() + await expect(fixture2.body).toBeHidden() await openMultiNodeContextMenu(comfyPage, nodeTitles) await clickExactMenuItem(comfyPage, 'Expand Node') diff --git a/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts b/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts index 54dc8c03d01..2b53202c0f7 100644 --- a/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/rename.spec.ts @@ -50,6 +50,6 @@ test.describe('Vue Nodes Renaming', () => { const editingTitleInput = comfyPage.page.getByTestId( TestIds.node.titleInput ) - await expect(editingTitleInput).not.toBeVisible() + await expect(editingTitleInput).toBeHidden() }) }) diff --git a/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts b/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts index 56d4f06064b..0353e2d00ac 100644 --- a/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/collapse.spec.ts @@ -30,7 +30,7 @@ test.describe('Vue Node Collapse', () => { await comfyPage.nextFrame() // Verify node content is hidden - await expect(body).not.toBeVisible() + await expect(body).toBeHidden() await expect .poll(async () => (await vueNode.boundingBox())?.height) .toBeLessThan(expandedBoundingBox.height) diff --git a/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts b/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts index be2190ad138..313cfb2e273 100644 --- a/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts +++ b/browser_tests/tests/vueNodes/nodeStates/pin.spec.ts @@ -24,7 +24,7 @@ test.describe('Vue Node Pin', () => { await expect(pinIndicator).toBeVisible() await comfyPage.page.keyboard.press(PIN_HOTKEY) - await expect(pinIndicator).not.toBeVisible() + await expect(pinIndicator).toBeHidden() }) test('should allow toggling pin on multiple selected nodes with hotkey', async ({ @@ -43,8 +43,8 @@ test.describe('Vue Node Pin', () => { await expect(pinIndicator2).toBeVisible() await comfyPage.page.keyboard.press(PIN_HOTKEY) - await expect(pinIndicator1).not.toBeVisible() - await expect(pinIndicator2).not.toBeVisible() + await expect(pinIndicator1).toBeHidden() + await expect(pinIndicator2).toBeHidden() }) test('should not allow dragging pinned nodes', async ({ comfyPage }) => { diff --git a/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts b/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts index d27a82b6c64..35bcb80167f 100644 --- a/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts @@ -45,10 +45,10 @@ test.describe('Advanced Widget Visibility', () => { // Advanced widgets should not be rendered await expect( node.getByLabel('max_shift', { exact: true }) - ).not.toBeVisible() + ).toBeHidden() await expect( node.getByLabel('base_shift', { exact: true }) - ).not.toBeVisible() + ).toBeHidden() // "Show advanced inputs" button should be present await expect(node.getByText('Show advanced inputs')).toBeVisible() @@ -97,6 +97,6 @@ test.describe('Advanced Widget Visibility', () => { await expect(node.getByLabel('base_shift', { exact: true })).toBeVisible() // The toggle button should not be shown when global setting is active - await expect(node.getByText('Show advanced inputs')).not.toBeVisible() + await expect(node.getByText('Show advanced inputs')).toBeHidden() }) }) diff --git a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts index 581a4b17f48..c67c4d03ead 100644 --- a/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.ts @@ -17,7 +17,7 @@ test.describe('Vue Upload Widgets', () => { await expect( comfyPage.page.getByText('choose file to upload', { exact: true }) - ).not.toBeVisible() + ).toBeHidden() await expect .poll(() => diff --git a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts index e2d8e5f17a4..29e9041036a 100644 --- a/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.ts @@ -53,7 +53,7 @@ test.describe('Vue Multiline String Widget', () => { await textarea.focus() await textarea.click({ button: 'right' }) - await expect(vueContextMenu).not.toBeVisible() + await expect(vueContextMenu).toBeHidden() await textarea.blur() await textarea.click({ button: 'right' }) diff --git a/browser_tests/tests/workflowTabThumbnail.spec.ts b/browser_tests/tests/workflowTabThumbnail.spec.ts index ff2ab1a74bc..e7fbc96dbfb 100644 --- a/browser_tests/tests/workflowTabThumbnail.spec.ts +++ b/browser_tests/tests/workflowTabThumbnail.spec.ts @@ -83,7 +83,7 @@ test.describe('Workflow Tab Thumbnails', { tag: '@workflow' }, () => { 1, 'Unsaved Workflow (2)' ) - await expect(thumbnailImg).not.toBeVisible() + await expect(thumbnailImg).toBeHidden() }) async function addNode(comfyPage: ComfyPage, category: string, node: string) { diff --git a/browser_tests/tests/zoomControls.spec.ts b/browser_tests/tests/zoomControls.spec.ts index 4bdfb2a63c1..1d9dd9a6152 100644 --- a/browser_tests/tests/zoomControls.spec.ts +++ b/browser_tests/tests/zoomControls.spec.ts @@ -135,6 +135,6 @@ test.describe('Zoom Controls', { tag: '@canvas' }, () => { await zoomButton.click() await comfyPage.nextFrame() - await expect(zoomToFit).not.toBeVisible() + await expect(zoomToFit).toBeHidden() }) }) From 0a7037b6df198f641926e224fd4a3884229aa4d4 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 10 Apr 2026 23:23:27 +0000 Subject: [PATCH 10/14] [automated] Apply ESLint and Oxfmt fixes --- browser_tests/tests/errorOverlay.spec.ts | 4 +--- .../tests/propertiesPanel/nodeSettings.spec.ts | 4 +--- browser_tests/tests/queue/queueOverlay.spec.ts | 4 +--- .../tests/sidebar/workflowSearch.spec.ts | 16 ++++------------ .../interactions/node/contextMenu.spec.ts | 8 ++------ .../vueNodes/widgets/advancedWidgets.spec.ts | 8 ++------ 6 files changed, 11 insertions(+), 33 deletions(-) diff --git a/browser_tests/tests/errorOverlay.spec.ts b/browser_tests/tests/errorOverlay.spec.ts index f4ac69f5394..75e315bb951 100644 --- a/browser_tests/tests/errorOverlay.spec.ts +++ b/browser_tests/tests/errorOverlay.spec.ts @@ -182,9 +182,7 @@ test.describe('Error overlay', { tag: '@ui' }, () => { await overlay.getByTestId(TestIds.dialogs.errorOverlayDismiss).click() await expect(overlay).toBeHidden() - await expect( - comfyPage.page.getByTestId('properties-panel') - ).toBeHidden() + await expect(comfyPage.page.getByTestId('properties-panel')).toBeHidden() }) test('Close button (X) dismisses overlay', async ({ comfyPage }) => { diff --git a/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts b/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts index 4b612ce755a..d3f4923fa68 100644 --- a/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts +++ b/browser_tests/tests/propertiesPanel/nodeSettings.spec.ts @@ -114,9 +114,7 @@ test.describe('Properties panel - Node settings', () => { await expect(nodeLocator.getByTestId('node-pin-indicator')).toBeVisible() await panel.pinnedSwitch.click() - await expect( - nodeLocator.getByTestId('node-pin-indicator') - ).toBeHidden() + await expect(nodeLocator.getByTestId('node-pin-indicator')).toBeHidden() }) }) }) diff --git a/browser_tests/tests/queue/queueOverlay.spec.ts b/browser_tests/tests/queue/queueOverlay.spec.ts index 402580aeb0d..a10d102c3e9 100644 --- a/browser_tests/tests/queue/queueOverlay.spec.ts +++ b/browser_tests/tests/queue/queueOverlay.spec.ts @@ -104,8 +104,6 @@ test.describe('Queue overlay', () => { await toggle.click() - await expect( - comfyPage.page.locator('[data-job-id]').first() - ).toBeHidden() + await expect(comfyPage.page.locator('[data-job-id]').first()).toBeHidden() }) }) diff --git a/browser_tests/tests/sidebar/workflowSearch.spec.ts b/browser_tests/tests/sidebar/workflowSearch.spec.ts index 36a3343038e..c39c38703d3 100644 --- a/browser_tests/tests/sidebar/workflowSearch.spec.ts +++ b/browser_tests/tests/sidebar/workflowSearch.spec.ts @@ -27,9 +27,7 @@ test.describe('Workflow sidebar - search', () => { await searchInput.fill('alpha') await expect(findWorkflow(comfyPage.page, 'alpha-workflow')).toBeVisible() - await expect( - findWorkflow(comfyPage.page, 'beta-workflow') - ).toBeHidden() + await expect(findWorkflow(comfyPage.page, 'beta-workflow')).toBeHidden() }) test('Clearing search restores all workflows', async ({ comfyPage }) => { @@ -38,9 +36,7 @@ test.describe('Workflow sidebar - search', () => { const searchInput = comfyPage.page.getByPlaceholder('Search Workflow...') await searchInput.fill('alpha') - await expect( - findWorkflow(comfyPage.page, 'beta-workflow') - ).toBeHidden() + await expect(findWorkflow(comfyPage.page, 'beta-workflow')).toBeHidden() await searchInput.fill('') @@ -55,11 +51,7 @@ test.describe('Workflow sidebar - search', () => { const searchInput = comfyPage.page.getByPlaceholder('Search Workflow...') await searchInput.fill('nonexistent_xyz') - await expect( - findWorkflow(comfyPage.page, 'alpha-workflow') - ).toBeHidden() - await expect( - findWorkflow(comfyPage.page, 'beta-workflow') - ).toBeHidden() + await expect(findWorkflow(comfyPage.page, 'alpha-workflow')).toBeHidden() + await expect(findWorkflow(comfyPage.page, 'beta-workflow')).toBeHidden() }) }) diff --git a/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts b/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts index 023ca1b8cbe..5784561b525 100644 --- a/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/contextMenu.spec.ts @@ -194,9 +194,7 @@ test.describe('Vue Node Context Menu', () => { const subgraphNode = comfyPage.vueNodes.getNodeByTitle('New Subgraph') await expect(subgraphNode).toBeVisible() - await expect( - comfyPage.vueNodes.getNodeByTitle('KSampler') - ).toBeHidden() + await expect(comfyPage.vueNodes.getNodeByTitle('KSampler')).toBeHidden() }) }) @@ -309,9 +307,7 @@ test.describe('Vue Node Context Menu', () => { const subgraphNode = comfyPage.vueNodes.getNodeByTitle('New Subgraph') await expect(subgraphNode).toBeVisible() - await expect( - comfyPage.vueNodes.getNodeByTitle('KSampler') - ).toBeHidden() + await expect(comfyPage.vueNodes.getNodeByTitle('KSampler')).toBeHidden() // Unpack the subgraph await openContextMenu(comfyPage, 'New Subgraph') diff --git a/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts b/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts index 35bcb80167f..d12f68bbc74 100644 --- a/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts +++ b/browser_tests/tests/vueNodes/widgets/advancedWidgets.spec.ts @@ -43,12 +43,8 @@ test.describe('Advanced Widget Visibility', () => { await expect(node.getByLabel('height', { exact: true })).toBeVisible() // Advanced widgets should not be rendered - await expect( - node.getByLabel('max_shift', { exact: true }) - ).toBeHidden() - await expect( - node.getByLabel('base_shift', { exact: true }) - ).toBeHidden() + await expect(node.getByLabel('max_shift', { exact: true })).toBeHidden() + await expect(node.getByLabel('base_shift', { exact: true })).toBeHidden() // "Show advanced inputs" button should be present await expect(node.getByText('Show advanced inputs')).toBeVisible() From 8746f94d6b17a54a278c51c5c434a38cf685e426 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:30:33 -0700 Subject: [PATCH 11/14] fix: use .first() in bookmark hover test to avoid strict mode violation Amp-Thread-ID: https://ampcode.com/threads/T-019d79b6-b520-7041-b8fb-e8ab573a21a1 Co-authored-by: Amp --- browser_tests/tests/groupNode.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/browser_tests/tests/groupNode.spec.ts b/browser_tests/tests/groupNode.spec.ts index 33af2b28976..0653060ad55 100644 --- a/browser_tests/tests/groupNode.spec.ts +++ b/browser_tests/tests/groupNode.spec.ts @@ -90,6 +90,7 @@ test.describe('Group Node', { tag: '@node' }, () => { .click() await comfyPage.page .locator('.p-tree-node-label.tree-explorer-node-label') + .first() .hover() await expect( comfyPage.page.locator('.node-lib-node-preview') From fbe2614e6347f9c3bbb41e6a7e41674ab640c1f8 Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:38:55 -0700 Subject: [PATCH 12/14] fix: use #graph-canvas locator to avoid strict mode violations Bare 'canvas' selector matches multiple elements (graph canvas, link overlay canvas, minimap, charts). Use comfyPage.canvas which targets Amp-Thread-ID: https://ampcode.com/threads/T-019d79bf-1747-70ce-af0c-79d892ae87ae Co-authored-by: Amp #graph-canvas specifically. --- browser_tests/tests/interaction.spec.ts | 4 ++-- browser_tests/tests/selectionToolbox.spec.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 5e6ce708617..d3dd7c44b10 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -1252,7 +1252,7 @@ test.describe('Canvas Navigation', { tag: '@screenshot' }, () => { test('Space + left-click drag should pan canvas', async ({ comfyPage }) => { // Click canvas to focus it - await comfyPage.page.locator('canvas').click() + await comfyPage.canvas.click() await comfyPage.nextFrame() await comfyPage.page.keyboard.down('Space') @@ -1321,7 +1321,7 @@ test.describe('Canvas Navigation', { tag: '@screenshot' }, () => { 'panning' ) - await comfyPage.page.locator('canvas').click() + await comfyPage.canvas.click() await comfyPage.nextFrame() await expect(comfyPage.canvas).toHaveScreenshot('standard-initial.png') diff --git a/browser_tests/tests/selectionToolbox.spec.ts b/browser_tests/tests/selectionToolbox.spec.ts index 003497c439d..756fa0f727c 100644 --- a/browser_tests/tests/selectionToolbox.spec.ts +++ b/browser_tests/tests/selectionToolbox.spec.ts @@ -128,7 +128,7 @@ test.describe('Selection Toolbox', { tag: ['@screenshot', '@ui'] }, () => { await comfyPage.workflow.loadWorkflow('groups/single_group') // Select group + node should show bypass button - await comfyPage.page.locator('canvas').focus() + await comfyPage.canvas.focus() await comfyPage.page.keyboard.press('Control+A') await expect( comfyPage.page.locator( From c02a852dac4b67e009250b3c632929a91c24408f Mon Sep 17 00:00:00 2001 From: Alexander Brown <448862+DrJKL@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:59:30 -0700 Subject: [PATCH 13/14] fix: replace networkidle with domcontentloaded in subgraph draft test The playwright/no-networkidle lint rule forbids waitUntil: 'networkidle'. The subsequent waitForFunction and locator.waitFor already provide deterministic readiness checks, making networkidle redundant. Amp-Thread-ID: https://ampcode.com/threads/T-019d79d5-58b6-7021-a990-dc51feb86d58 Co-authored-by: Amp --- browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts b/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts index 46565be9c60..31eb0622b90 100644 --- a/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts +++ b/browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts @@ -52,7 +52,7 @@ test.describe( await comfyPage.workflow.waitForDraftPersisted() // Reload the page (draft auto-loads with hash preserved) - await comfyPage.page.reload({ waitUntil: 'networkidle' }) + await comfyPage.page.reload({ waitUntil: 'domcontentloaded' }) await comfyPage.page.waitForFunction( () => window.app && window.app.extensionManager ) From 705a61333c94ff264615c0bf84fd89d6830b4a12 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 11 Apr 2026 01:08:36 +0000 Subject: [PATCH 14/14] [automated] Apply ESLint and Oxfmt fixes --- browser_tests/tests/vueNodes/interactions/node/move.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts index c320366b38e..f6a7681eea3 100644 --- a/browser_tests/tests/vueNodes/interactions/node/move.spec.ts +++ b/browser_tests/tests/vueNodes/interactions/node/move.spec.ts @@ -108,7 +108,7 @@ test.describe('Vue Node Moving', () => { const clickNodeTitleWithMeta = async (title: string) => { await comfyPage.vueNodes .getNodeByTitle(title) - .locator('[data-testid="node-title"]') + .getByTestId('node-title') .first() .click({ modifiers: ['Meta'] }) }