mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
[fix] Update tests to use event.code format for keyboard shortcuts
This commit is contained in:
@@ -290,7 +290,7 @@ test.describe('Settings', () => {
|
||||
const expectedSetting: Keybinding = {
|
||||
commandId: 'Comfy.NewBlankWorkflow',
|
||||
combo: {
|
||||
key: 'n',
|
||||
key: 'KeyN',
|
||||
ctrl: false,
|
||||
alt: true,
|
||||
shift: false
|
||||
|
||||
@@ -69,7 +69,7 @@ test.describe('Topbar commands', () => {
|
||||
],
|
||||
keybindings: [
|
||||
{
|
||||
combo: { key: 'k' },
|
||||
combo: { key: 'KeyK' },
|
||||
commandId: 'TestCommand'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ test.describe('Subgraph Operations', () => {
|
||||
{
|
||||
commandId: 'Comfy.Graph.ExitSubgraph',
|
||||
combo: {
|
||||
key: 'q',
|
||||
key: 'KeyQ',
|
||||
ctrl: false,
|
||||
alt: true,
|
||||
shift: false
|
||||
|
||||
Reference in New Issue
Block a user