diff --git a/browser_tests/tests/interaction.spec.ts b/browser_tests/tests/interaction.spec.ts index 6d8c4194c..31d6316db 100644 --- a/browser_tests/tests/interaction.spec.ts +++ b/browser_tests/tests/interaction.spec.ts @@ -986,6 +986,41 @@ test.describe('Canvas Navigation', () => { }) }) + test('Shift + mouse wheel should pan canvas horizontally', async ({ + comfyPage + }) => { + await comfyPage.page.click('canvas') + await comfyPage.nextFrame() + + await expect(comfyPage.canvas).toHaveScreenshot('standard-initial.png') + + await comfyPage.page.mouse.move(400, 300) + + await comfyPage.page.keyboard.down('Shift') + await comfyPage.page.mouse.wheel(0, 120) + await comfyPage.page.keyboard.up('Shift') + await comfyPage.nextFrame() + await expect(comfyPage.canvas).toHaveScreenshot( + 'standard-shift-wheel-pan-right.png' + ) + + await comfyPage.page.keyboard.down('Shift') + await comfyPage.page.mouse.wheel(0, -240) + await comfyPage.page.keyboard.up('Shift') + await comfyPage.nextFrame() + await expect(comfyPage.canvas).toHaveScreenshot( + 'standard-shift-wheel-pan-left.png' + ) + + await comfyPage.page.keyboard.down('Shift') + await comfyPage.page.mouse.wheel(0, 120) + await comfyPage.page.keyboard.up('Shift') + await comfyPage.nextFrame() + await expect(comfyPage.canvas).toHaveScreenshot( + 'standard-shift-wheel-pan-center.png' + ) + }) + test.describe('Edge Cases', () => { test('Multiple modifier keys work correctly in legacy mode', async ({ comfyPage diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/standard-initial-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/standard-initial-chromium-linux.png new file mode 100644 index 000000000..c09736577 Binary files /dev/null and b/browser_tests/tests/interaction.spec.ts-snapshots/standard-initial-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-center-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-center-chromium-linux.png new file mode 100644 index 000000000..c9d79512f Binary files /dev/null and b/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-center-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-left-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-left-chromium-linux.png new file mode 100644 index 000000000..c09736577 Binary files /dev/null and b/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-left-chromium-linux.png differ diff --git a/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-right-chromium-linux.png b/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-right-chromium-linux.png new file mode 100644 index 000000000..c9d79512f Binary files /dev/null and b/browser_tests/tests/interaction.spec.ts-snapshots/standard-shift-wheel-pan-right-chromium-linux.png differ