Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
beyang committed Nov 4, 2024
1 parent 3c13a25 commit c5b76db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
},
{
"command": "cody.chat.new",
"key": "shift+alt+/",
"key": "shift+ctrl+/",
"when": "cody.activated"
},
{
Expand Down
12 changes: 6 additions & 6 deletions vscode/test/e2e/chat-keyboard-shortcuts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ')
})

Expand All @@ -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$/)
})

0 comments on commit c5b76db

Please sign in to comment.