diff --git a/.github/workflows/chromatic.yaml b/.github/workflows/chromatic.yaml index 558f04fee..11ac26254 100644 --- a/.github/workflows/chromatic.yaml +++ b/.github/workflows/chromatic.yaml @@ -3,14 +3,15 @@ name: 'Chromatic' # - [Automate Chromatic with GitHub Actions • Chromatic docs]( https://www.chromatic.com/docs/github-actions/ ) on: - push: - branches: [main] + workflow_dispatch: # Allow manual triggering pull_request: branches: [main] jobs: chromatic-deployment: runs-on: ubuntu-latest + # Only run for PRs from version-bump-* branches or manual triggers + if: github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'version-bump-') permissions: pull-requests: write issues: write @@ -32,6 +33,7 @@ jobs: - name: Comment PR - Build Started if: github.event_name == 'pull_request' + continue-on-error: true uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} @@ -68,6 +70,7 @@ jobs: - name: Comment PR - Build Complete if: github.event_name == 'pull_request' && always() + continue-on-error: true uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} diff --git a/.github/workflows/test-ui.yaml b/.github/workflows/test-ui.yaml index 45a84d23a..a41964d7f 100644 --- a/.github/workflows/test-ui.yaml +++ b/.github/workflows/test-ui.yaml @@ -47,6 +47,7 @@ jobs: - name: Comment PR - Tests Started if: github.event_name == 'pull_request' + continue-on-error: true uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} @@ -134,6 +135,7 @@ jobs: - name: Comment PR - Browser Test Started if: github.event_name == 'pull_request' + continue-on-error: true uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} @@ -238,6 +240,7 @@ jobs: - name: Comment PR - Browser Test Complete if: always() && github.event_name == 'pull_request' + continue-on-error: true uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} @@ -323,6 +326,7 @@ jobs: fi - name: Comment PR - Tests Complete + continue-on-error: true uses: edumserrano/find-create-or-update-comment@v3 with: issue-number: ${{ github.event.pull_request.number }} diff --git a/.gitignore b/.gitignore index 8d19ceec5..60cca8f98 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ dist-ssr *.local # Claude configuration .claude/*.local.json -.claude/settings.json # Editor directories and files .vscode/* diff --git a/browser_tests/fixtures/components/Topbar.ts b/browser_tests/fixtures/components/Topbar.ts index b138ff7b7..f2c9dfa16 100644 --- a/browser_tests/fixtures/components/Topbar.ts +++ b/browser_tests/fixtures/components/Topbar.ts @@ -65,6 +65,7 @@ export class Topbar { } async openTopbarMenu() { + await this.page.waitForTimeout(1000) await this.page.locator('.comfyui-logo-wrapper').click() const menu = this.page.locator('.comfy-command-menu') await menu.waitFor({ state: 'visible' }) diff --git a/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png b/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png index 765aa1126..3acc073ff 100644 Binary files a/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png and b/browser_tests/tests/domWidget.spec.ts-snapshots/focus-mode-on-chromium-linux.png differ diff --git a/browser_tests/tests/graphCanvasMenu.spec.ts b/browser_tests/tests/graphCanvasMenu.spec.ts index e8994e4f0..9ae090975 100644 --- a/browser_tests/tests/graphCanvasMenu.spec.ts +++ b/browser_tests/tests/graphCanvasMenu.spec.ts @@ -7,13 +7,11 @@ test.describe('Graph Canvas Menu', () => { // Set link render mode to spline to make sure it's not affected by other tests' // side effects. await comfyPage.setSetting('Comfy.LinkRenderMode', 2) + // Enable canvas menu for all tests + await comfyPage.setSetting('Comfy.Graph.CanvasMenu', true) }) test('Can toggle link visibility', async ({ comfyPage }) => { - // Note: `Comfy.Graph.CanvasMenu` is disabled in comfyPage setup. - // so no cleanup is needed. - await comfyPage.setSetting('Comfy.Graph.CanvasMenu', true) - const button = comfyPage.page.getByTestId('toggle-link-visibility-button') await button.click() await comfyPage.nextFrame() @@ -36,4 +34,45 @@ test.describe('Graph Canvas Menu', () => { hiddenLinkRenderMode ) }) + + test('Focus mode button is clickable and has correct test id', async ({ + comfyPage + }) => { + const focusButton = comfyPage.page.getByTestId('focus-mode-button') + await expect(focusButton).toBeVisible() + await expect(focusButton).toBeEnabled() + + // Test that the button can be clicked without error + await focusButton.click() + await comfyPage.nextFrame() + }) + + test('Zoom controls popup opens and closes', async ({ comfyPage }) => { + // Find the zoom button by its percentage text content + const zoomButton = comfyPage.page.locator('button').filter({ + hasText: '%' + }) + await expect(zoomButton).toBeVisible() + + // Click to open zoom controls + await zoomButton.click() + await comfyPage.nextFrame() + + // Zoom controls modal should be visible + const zoomModal = comfyPage.page + .locator('div') + .filter({ + hasText: 'Zoom To Fit' + }) + .first() + await expect(zoomModal).toBeVisible() + + // Click backdrop to close + const backdrop = comfyPage.page.locator('.fixed.inset-0').first() + await backdrop.click() + await comfyPage.nextFrame() + + // Modal should be hidden + await expect(zoomModal).not.toBeVisible() + }) }) diff --git a/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-hidden-links-chromium-linux.png b/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-hidden-links-chromium-linux.png index 2b1678631..72749caf3 100644 Binary files a/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-hidden-links-chromium-linux.png and b/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-hidden-links-chromium-linux.png differ diff --git a/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-visible-links-chromium-linux.png b/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-visible-links-chromium-linux.png index fb46d991f..3d86bdfc0 100644 Binary files a/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-visible-links-chromium-linux.png and b/browser_tests/tests/graphCanvasMenu.spec.ts-snapshots/canvas-with-visible-links-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 2ddf9e086..de46bca2e 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -780,9 +780,18 @@ test.describe('Viewport settings', () => { // Screenshot the canvas element await comfyPage.setSetting('Comfy.Graph.CanvasMenu', true) - const toggleButton = comfyPage.page.getByTestId('toggle-minimap-button') + // Open zoom controls dropdown first + const zoomControlsButton = comfyPage.page.getByTestId( + 'zoom-controls-button' + ) + await zoomControlsButton.click() + + const toggleButton = comfyPage.page.getByTestId('toggle-minimap-button') await toggleButton.click() + // close zoom menu + await zoomControlsButton.click() + await comfyPage.setSetting('Comfy.Graph.CanvasMenu', false) await comfyPage.menu.topbar.saveWorkflow('Workflow A') await comfyPage.nextFrame() diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/group-selected-nodes-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/group-selected-nodes-chromium-linux.png index f0ca5e712..603c598ad 100644 Binary files a/browser_tests/tests/interaction.spec.ts-snapshots/group-selected-nodes-chromium-linux.png and b/browser_tests/tests/interaction.spec.ts-snapshots/group-selected-nodes-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-bypassed-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-bypassed-chromium-linux.png index f5c4af9bc..7cc712f74 100644 Binary files a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-bypassed-chromium-linux.png and b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-bypassed-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-pinned-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-pinned-chromium-linux.png index 11356a8da..895e429a1 100644 Binary files a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-pinned-chromium-linux.png and b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-pinned-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unbypassed-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unbypassed-chromium-linux.png index dfccbf641..a37ea3f8c 100644 Binary files a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unbypassed-chromium-linux.png and b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unbypassed-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unpinned-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unpinned-chromium-linux.png index dfccbf641..a37ea3f8c 100644 Binary files a/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unpinned-chromium-linux.png and b/browser_tests/tests/interaction.spec.ts-snapshots/nodes-unpinned-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/standard-left-drag-select-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/standard-left-drag-select-chromium-linux.png index dfccbf641..a37ea3f8c 100644 Binary files a/browser_tests/tests/interaction.spec.ts-snapshots/standard-left-drag-select-chromium-linux.png and b/browser_tests/tests/interaction.spec.ts-snapshots/standard-left-drag-select-chromium-linux.png differ diff --git a/browser_tests/tests/minimap.spec.ts b/browser_tests/tests/minimap.spec.ts index 366a6634d..df967d911 100644 --- a/browser_tests/tests/minimap.spec.ts +++ b/browser_tests/tests/minimap.spec.ts @@ -35,34 +35,44 @@ test.describe('Minimap', () => { }) test('Validate minimap toggle button state', async ({ comfyPage }) => { + // Open zoom controls dropdown first + const zoomControlsButton = comfyPage.page.getByTestId( + 'zoom-controls-button' + ) + await zoomControlsButton.click() + const toggleButton = comfyPage.page.getByTestId('toggle-minimap-button') await expect(toggleButton).toBeVisible() - await expect(toggleButton).toHaveClass(/minimap-active/) - const minimapContainer = comfyPage.page.locator('.litegraph-minimap') await expect(minimapContainer).toBeVisible() }) test('Validate minimap can be toggled off and on', async ({ comfyPage }) => { const minimapContainer = comfyPage.page.locator('.litegraph-minimap') + + // Open zoom controls dropdown first + const zoomControlsButton = comfyPage.page.getByTestId( + 'zoom-controls-button' + ) + await zoomControlsButton.click() + const toggleButton = comfyPage.page.getByTestId('toggle-minimap-button') await expect(minimapContainer).toBeVisible() - await expect(toggleButton).toHaveClass(/minimap-active/) await toggleButton.click() await comfyPage.nextFrame() await expect(minimapContainer).not.toBeVisible() - await expect(toggleButton).not.toHaveClass(/minimap-active/) + await expect(toggleButton).toContainText('Show Minimap') await toggleButton.click() await comfyPage.nextFrame() await expect(minimapContainer).toBeVisible() - await expect(toggleButton).toHaveClass(/minimap-active/) + await expect(toggleButton).toContainText('Hide Minimap') }) test('Validate minimap keyboard shortcut Alt+M', async ({ comfyPage }) => { diff --git a/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png b/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png index e059ce642..cf3fe09a1 100644 Binary files a/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png and b/browser_tests/tests/rerouteNode.spec.ts-snapshots/reroute-inserted-chromium-linux.png differ diff --git a/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-2-nodes-chromium-linux.png b/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-2-nodes-chromium-linux.png index dfccbf641..a37ea3f8c 100644 Binary files a/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-2-nodes-chromium-linux.png and b/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-2-nodes-chromium-linux.png differ diff --git a/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-pinned-chromium-linux.png b/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-pinned-chromium-linux.png index d67b73fc3..4512bc9da 100644 Binary files a/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-pinned-chromium-linux.png and b/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-pinned-chromium-linux.png differ diff --git a/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-unpinned-chromium-linux.png b/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-unpinned-chromium-linux.png index d6976c27e..821129dcb 100644 Binary files a/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-unpinned-chromium-linux.png and b/browser_tests/tests/rightClickMenu.spec.ts-snapshots/selected-nodes-unpinned-chromium-linux.png differ diff --git a/browser_tests/tests/sidebar/workflows.spec.ts b/browser_tests/tests/sidebar/workflows.spec.ts index 658d9bb34..1b3f21ff4 100644 --- a/browser_tests/tests/sidebar/workflows.spec.ts +++ b/browser_tests/tests/sidebar/workflows.spec.ts @@ -193,6 +193,7 @@ test.describe('Workflows sidebar', () => { await comfyPage.menu.topbar.saveWorkflowAs('workflow5.json') await comfyPage.confirmDialog.click('overwrite') + await comfyPage.page.waitForTimeout(200) expect(await comfyPage.menu.workflowsTab.getOpenedWorkflowNames()).toEqual([ 'workflow5.json' ]) diff --git a/browser_tests/tests/widget.spec.ts b/browser_tests/tests/widget.spec.ts index 0d8978c79..b23faabfc 100644 --- a/browser_tests/tests/widget.spec.ts +++ b/browser_tests/tests/widget.spec.ts @@ -256,6 +256,7 @@ test.describe('Animated image widget', () => { await comfyPage.dragAndDropFile('animated_webp.webp', { dropPosition: { x, y } }) + await comfyPage.page.waitForTimeout(200) // Expect the filename combo value to be updated const fileComboWidget = await loadAnimatedWebpNode.getWidget(0) diff --git a/browser_tests/tests/widget.spec.ts-snapshots/animated-image-preview-saved-webp-chromium-linux.png b/browser_tests/tests/widget.spec.ts-snapshots/animated-image-preview-saved-webp-chromium-linux.png index c1fb924d4..32edf383c 100644 Binary files a/browser_tests/tests/widget.spec.ts-snapshots/animated-image-preview-saved-webp-chromium-linux.png and b/browser_tests/tests/widget.spec.ts-snapshots/animated-image-preview-saved-webp-chromium-linux.png differ diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index 335e6427f..b8b8baa4f 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -2,13 +2,11 @@ - -