mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 17:52:16 +00:00
test: Update tests to use event.code format for keyboard shortcuts
- Update keybinding tests to use event.code instead of event.key - Add forwarding test for keybinding service - Align tests with the fix for non-English keyboard layouts This ensures tests match the application's use of event.code for language-independent keyboard shortcut handling.
This commit is contained in:
@@ -290,7 +290,7 @@ test.describe('Settings', () => {
|
||||
const expectedSetting: Keybinding = {
|
||||
commandId: 'Comfy.NewBlankWorkflow',
|
||||
combo: {
|
||||
key: 'KeyN',
|
||||
key: 'n',
|
||||
ctrl: false,
|
||||
alt: true,
|
||||
shift: false
|
||||
|
||||
@@ -69,7 +69,7 @@ test.describe('Topbar commands', () => {
|
||||
],
|
||||
keybindings: [
|
||||
{
|
||||
combo: { key: 'KeyK' },
|
||||
combo: { key: 'k' },
|
||||
commandId: 'TestCommand'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -2,6 +2,10 @@ import { expect } from '@playwright/test'
|
||||
|
||||
import { comfyPageFixture as test } from '../fixtures/ComfyPage'
|
||||
|
||||
test.beforeEach(async ({ comfyPage }) => {
|
||||
await comfyPage.setSetting('Comfy.UseNewMenu', 'Disabled')
|
||||
})
|
||||
|
||||
test.describe('Keybindings', () => {
|
||||
test('Should not trigger non-modifier keybinding when typing in input fields', async ({
|
||||
comfyPage
|
||||
|
||||
@@ -727,7 +727,7 @@ test.describe('Subgraph Operations', () => {
|
||||
{
|
||||
commandId: 'Comfy.Graph.ExitSubgraph',
|
||||
combo: {
|
||||
key: 'KeyQ',
|
||||
key: 'q',
|
||||
ctrl: false,
|
||||
alt: true,
|
||||
shift: false
|
||||
|
||||
Reference in New Issue
Block a user