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
This commit is contained in:
Rizumu Ayaka
2026-05-06 17:19:24 +08:00
parent ef0cd18616
commit bb732bb158
2 changed files with 7 additions and 9 deletions

View File

@@ -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()

View File

@@ -197,5 +197,6 @@ LiteGraphGlobal {
"use_uuids": false,
"uuidv4": [Function],
"vueNodesMode": false,
"wheelInputMode": "auto",
}
`;