From bb732bb1586ce4aa51147cf005a4fc235bcd5025 Mon Sep 17 00:00:00 2001 From: Rizumu Ayaka Date: Wed, 6 May 2026 17:19:24 +0800 Subject: [PATCH] test: update tests for WheelInputMode migration - Add wheelInputMode property to LiteGraphGlobal snapshot - Migrate canvasSettings e2e tests from deprecated MouseWheelScroll to the new Comfy.Graph.WheelInputMode setting --- browser_tests/tests/canvasSettings.spec.ts | 15 ++++++--------- .../src/__snapshots__/litegraph.test.ts.snap | 1 + 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/browser_tests/tests/canvasSettings.spec.ts b/browser_tests/tests/canvasSettings.spec.ts index e026edc284..409b7d2608 100644 --- a/browser_tests/tests/canvasSettings.spec.ts +++ b/browser_tests/tests/canvasSettings.spec.ts @@ -145,14 +145,11 @@ test.describe('Canvas settings', { tag: '@canvas' }, () => { }) }) - test.describe('Comfy.Canvas.MouseWheelScroll', () => { + test.describe('Comfy.Graph.WheelInputMode', () => { const WHEEL_POS = { x: 400, y: 400 } - test('wheel zooms when set to zoom', async ({ comfyPage }) => { - await comfyPage.settings.setSetting( - 'Comfy.Canvas.MouseWheelScroll', - 'zoom' - ) + test('wheel zooms when input device is mouse', async ({ comfyPage }) => { + await comfyPage.settings.setSetting('Comfy.Graph.WheelInputMode', 'mouse') const initialScale = await comfyPage.canvasOps.getScale() await comfyPage.page.mouse.move(WHEEL_POS.x, WHEEL_POS.y) @@ -166,10 +163,10 @@ test.describe('Canvas settings', { tag: '@canvas' }, () => { ) }) - test('wheel pans when set to panning', async ({ comfyPage }) => { + test('wheel pans when input device is trackpad', async ({ comfyPage }) => { await comfyPage.settings.setSetting( - 'Comfy.Canvas.MouseWheelScroll', - 'panning' + 'Comfy.Graph.WheelInputMode', + 'trackpad' ) const initialScale = await comfyPage.canvasOps.getScale() const initialOffset = await comfyPage.canvasOps.getOffset() diff --git a/src/lib/litegraph/src/__snapshots__/litegraph.test.ts.snap b/src/lib/litegraph/src/__snapshots__/litegraph.test.ts.snap index 31984143b3..f48f6f7c7a 100644 --- a/src/lib/litegraph/src/__snapshots__/litegraph.test.ts.snap +++ b/src/lib/litegraph/src/__snapshots__/litegraph.test.ts.snap @@ -197,5 +197,6 @@ LiteGraphGlobal { "use_uuids": false, "uuidv4": [Function], "vueNodesMode": false, + "wheelInputMode": "auto", } `;