From e5adc840fe8a40d89ef92675b170df63c4d6cbb4 Mon Sep 17 00:00:00 2001 From: snomiao Date: Tue, 30 Sep 2025 01:40:57 +0000 Subject: [PATCH] [fix] Update tests to use event.code format for keyboard shortcuts --- browser_tests/tests/dialog.spec.ts | 2 +- browser_tests/tests/extensionAPI.spec.ts | 2 +- browser_tests/tests/keybindings.spec.ts | 4 ++-- browser_tests/tests/subgraph.spec.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/browser_tests/tests/dialog.spec.ts b/browser_tests/tests/dialog.spec.ts index 7459acf58..d09e71d44 100644 --- a/browser_tests/tests/dialog.spec.ts +++ b/browser_tests/tests/dialog.spec.ts @@ -290,7 +290,7 @@ test.describe('Settings', () => { const expectedSetting: Keybinding = { commandId: 'Comfy.NewBlankWorkflow', combo: { - key: 'n', + key: 'KeyN', ctrl: false, alt: true, shift: false diff --git a/browser_tests/tests/extensionAPI.spec.ts b/browser_tests/tests/extensionAPI.spec.ts index 38f4a6c1d..1be47a43f 100644 --- a/browser_tests/tests/extensionAPI.spec.ts +++ b/browser_tests/tests/extensionAPI.spec.ts @@ -69,7 +69,7 @@ test.describe('Topbar commands', () => { ], keybindings: [ { - combo: { key: 'k' }, + combo: { key: 'KeyK' }, commandId: 'TestCommand' } ] diff --git a/browser_tests/tests/keybindings.spec.ts b/browser_tests/tests/keybindings.spec.ts index f4244ae66..8677f5a33 100644 --- a/browser_tests/tests/keybindings.spec.ts +++ b/browser_tests/tests/keybindings.spec.ts @@ -10,7 +10,7 @@ test.describe('Keybindings', () => { test('Should not trigger non-modifier keybinding when typing in input fields', async ({ comfyPage }) => { - await comfyPage.registerKeybinding({ key: 'k' }, () => { + await comfyPage.registerKeybinding({ key: 'KeyK' }, () => { window['TestCommand'] = true }) @@ -26,7 +26,7 @@ test.describe('Keybindings', () => { test('Should not trigger modifier keybinding when typing in input fields', async ({ comfyPage }) => { - await comfyPage.registerKeybinding({ key: 'k', ctrl: true }, () => { + await comfyPage.registerKeybinding({ key: 'KeyK', ctrl: true }, () => { window['TestCommand'] = true }) diff --git a/browser_tests/tests/subgraph.spec.ts b/browser_tests/tests/subgraph.spec.ts index 87ea504bb..833129ea4 100644 --- a/browser_tests/tests/subgraph.spec.ts +++ b/browser_tests/tests/subgraph.spec.ts @@ -727,7 +727,7 @@ test.describe('Subgraph Operations', () => { { commandId: 'Comfy.Graph.ExitSubgraph', combo: { - key: 'q', + key: 'KeyQ', ctrl: false, alt: true, shift: false