diff --git a/packages/trace-viewer/src/ui/uiModeView.tsx b/packages/trace-viewer/src/ui/uiModeView.tsx index 2a4a81a50d..21c6e54129 100644 --- a/packages/trace-viewer/src/ui/uiModeView.tsx +++ b/packages/trace-viewer/src/ui/uiModeView.tsx @@ -179,7 +179,7 @@ export const UIModeView: React.FC<{}> = ({ React.useEffect(() => { const onShortcutEvent = (e: KeyboardEvent) => { - if (e.key === 'Enter' && e.shiftKey) { + if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); runTests('bounce-if-busy', visibleTestIds); } else if (e.code === 'KeyS' && (e.metaKey || e.ctrlKey)) { diff --git a/tests/playwright-test/ui-mode-test-shortcut.spec.ts b/tests/playwright-test/ui-mode-test-shortcut.spec.ts index 3c7910f330..d32d26e433 100644 --- a/tests/playwright-test/ui-mode-test-shortcut.spec.ts +++ b/tests/playwright-test/ui-mode-test-shortcut.spec.ts @@ -28,13 +28,24 @@ const basicTestTree = { ` }; -test('should run on Enter with Shift', async ({ runUITest }) => { +test('should run on Meta(command) with Enter', async ({ runUITest }) => { const { page } = await runUITest(basicTestTree); await expect(page.getByTitle('Run all')).toBeEnabled(); await expect(page.getByTitle('Stop')).toBeDisabled(); - await page.keyboard.press('Enter+Shift'); + await page.keyboard.press('Meta+Enter'); + + await expect(page.getByTestId('status-line')).toHaveText('Running 1/4 passed (25%)'); +}); + +test('should run on Control with Enter', async ({ runUITest }) => { + const { page } = await runUITest(basicTestTree); + + await expect(page.getByTitle('Run all')).toBeEnabled(); + await expect(page.getByTitle('Stop')).toBeDisabled(); + + await page.keyboard.press('Control+Enter'); await expect(page.getByTestId('status-line')).toHaveText('Running 1/4 passed (25%)'); });