From c5b76dbe3fc7a14797489305e656412bd340ca42 Mon Sep 17 00:00:00 2001 From: Beyang Liu Date: Mon, 4 Nov 2024 14:51:04 -0800 Subject: [PATCH] fix test --- vscode/package.json | 2 +- vscode/test/e2e/chat-keyboard-shortcuts.test.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/vscode/package.json b/vscode/package.json index acde142ba5f3..54ead56774e3 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -603,7 +603,7 @@ }, { "command": "cody.chat.new", - "key": "shift+alt+/", + "key": "shift+ctrl+/", "when": "cody.activated" }, { diff --git a/vscode/test/e2e/chat-keyboard-shortcuts.test.ts b/vscode/test/e2e/chat-keyboard-shortcuts.test.ts index 61e5abe1b1c3..5593059abc4a 100644 --- a/vscode/test/e2e/chat-keyboard-shortcuts.test.ts +++ b/vscode/test/e2e/chat-keyboard-shortcuts.test.ts @@ -18,17 +18,17 @@ test('chat keyboard shortcuts for sidebar chat', async ({ page, sidebar }) => { const chatSidebar = getChatSidebarPanel(page) const chatSidebarInput = getChatInputs(chatSidebar).first() - // Shift+Alt+L with no selection opens a new chat in an editor panel (with file mention). + // Ctrl+Alt+L with no selection opens a new chat in an editor panel (with file mention). await openFileInEditorTab(page, 'buzz.ts') await clickEditorTab(page, 'buzz.ts') - await page.keyboard.press('Shift+Alt+L') + await page.keyboard.press('Shift+Control+l') await expect(chatSidebarInput).toContainText('buzz.ts', { timeout: 3_000 }) await executeCommandInPalette(page, 'View: Close Primary Sidebar') - // Alt+L with a selection opens a new chat (with selection mention). + // Shift+Alt+L with a selection opens a new chat (with selection mention). await selectLineRangeInEditorTab(page, 3, 5) - await page.keyboard.press('Alt+/') + await page.keyboard.press('Shift+Alt+/') await expect(chatSidebarInput).toContainText('buzz.ts:3-5 ') }) @@ -43,12 +43,12 @@ test('re-opening chat adds selection', async ({ page, sidebar }) => { await clickEditorTab(page, 'buzz.ts') await selectLineRangeInEditorTab(page, 2, 4) - await page.keyboard.press('Alt+l') + await page.keyboard.press('Shift+Alt+l') await expect(chatInputMentions(lastChatInput)).toHaveText(/^buzz.ts:2-4$/) // Re-opening chat does not add duplicate selection await openFileInEditorTab(page, 'buzz.ts') await selectLineRangeInEditorTab(page, 2, 4) - await page.keyboard.press('Alt+l') + await page.keyboard.press('Shift+Alt+l') await expect(chatInputMentions(lastChatInput)).toHaveText(/^buzz.ts:2-4$/) })