[fix] Update tests to use event.code format for keyboard shortcuts

This commit is contained in:
snomiao
2025-09-30 01:40:57 +00:00
parent 0f44b5ea58
commit e5adc840fe
4 changed files with 5 additions and 5 deletions

View File

@@ -290,7 +290,7 @@ test.describe('Settings', () => {
const expectedSetting: Keybinding = {
commandId: 'Comfy.NewBlankWorkflow',
combo: {
key: 'n',
key: 'KeyN',
ctrl: false,
alt: true,
shift: false

View File

@@ -69,7 +69,7 @@ test.describe('Topbar commands', () => {
],
keybindings: [
{
combo: { key: 'k' },
combo: { key: 'KeyK' },
commandId: 'TestCommand'
}
]

View File

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

View File

@@ -727,7 +727,7 @@ test.describe('Subgraph Operations', () => {
{
commandId: 'Comfy.Graph.ExitSubgraph',
combo: {
key: 'q',
key: 'KeyQ',
ctrl: false,
alt: true,
shift: false