Skip to content

Commit 098c829

Browse files
committed
change all the backslash words to quick actions
1 parent 60b136f commit 098c829

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

packages/amazonq/test/e2e_new/amazonq/quickActions/quickActions.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import '../utils/setup'
66
import { WebviewView } from 'vscode-extension-tester'
77
import { closeAllTabs, dismissOverlayIfPresent } from '../utils/cleanupHelper'
88
import { testContext } from '../utils/testContext'
9-
import { clickBackslashCommand } from './quickActionsHelper'
9+
import { clickQuickActionsCommand } from './quickActionsHelper'
1010
import { clearChat } from '../chat/chatHelper'
1111

12-
describe('Amazon Q Chat Backslash Functionality', function () {
12+
describe('Amazon Q Chat Quick Actions Functionality', function () {
1313
// this timeout is the general timeout for the entire test suite
1414
this.timeout(150000)
1515
let webviewView: WebviewView
@@ -28,7 +28,7 @@ describe('Amazon Q Chat Backslash Functionality', function () {
2828
await clearChat(webviewView)
2929
})
3030

31-
it('Backslash Test', async () => {
32-
await clickBackslashCommand(webviewView, 'dev')
31+
it('Quick Actions Test', async () => {
32+
await clickQuickActionsCommand(webviewView, 'dev')
3333
})
3434
})

packages/amazonq/test/e2e_new/amazonq/quickActions/quickActionsHelper.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { writeToChat } from '../chat/chatHelper'
88
import { sleep, waitForElements } from '../utils/generalHelper'
99

1010
/**
11-
* Gets all backslash command menu items
11+
* Gets all quick action command menu items
1212
* @param webview The WebviewView instance
1313
* @returns Promise<{items: WebElement[], texts: string[]}> Array of menu items and their text labels
1414
*/
15-
export async function getBackslashCommands(webview: WebviewView): Promise<{ items: WebElement[]; texts: string[] }> {
15+
export async function getQuickActionsCommands(webview: WebviewView): Promise<{ items: WebElement[]; texts: string[] }> {
1616
try {
1717
await writeToChat('/', webview, false)
1818
await sleep(2000)
@@ -35,25 +35,25 @@ export async function getBackslashCommands(webview: WebviewView): Promise<{ item
3535
}
3636
}
3737

38-
console.log(`Found ${menuItems.length} backslash command items`)
38+
console.log(`Found ${menuItems.length} quick action command items`)
3939
return { items: menuItems, texts: menuTexts }
4040
} catch (e) {
41-
console.error('Error getting backslash commands:', e)
41+
console.error('Error getting quick action commands:', e)
4242
return { items: [], texts: [] }
4343
}
4444
}
4545

4646
/**
47-
* Clicks a specific backslash command by name
47+
* Clicks a specific quick action command by name
4848
* @param webview The WebviewView instance
4949
* @param commandName The name of the command to click
5050
* @returns Promise<boolean> True if command was found and clicked, false otherwise
5151
*/
52-
export async function clickBackslashCommand(webview: WebviewView, commandName: string): Promise<boolean> {
52+
export async function clickQuickActionsCommand(webview: WebviewView, commandName: string): Promise<boolean> {
5353
try {
54-
const { items, texts } = await getBackslashCommands(webview)
54+
const { items, texts } = await getQuickActionsCommands(webview)
5555
if (items.length === 0) {
56-
console.log('No backslash commands found to click')
56+
console.log('No quick action commands found to click')
5757
return false
5858
}
5959
const indexToClick = texts.findIndex((text) => text === commandName)
@@ -68,7 +68,7 @@ export async function clickBackslashCommand(webview: WebviewView, commandName: s
6868
console.log('Command clicked successfully')
6969
return true
7070
} catch (e) {
71-
console.error('Error clicking backslash command:', e)
71+
console.error('Error clicking quick action command:', e)
7272
return false
7373
}
7474
}

0 commit comments

Comments
 (0)