Skip to content

Commit 60b136f

Browse files
committed
small fixes to the waitForElements
1 parent 390f69f commit 60b136f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { By, WebElement, WebviewView } from 'vscode-extension-tester'
77
import { writeToChat } from '../chat/chatHelper'
8-
import { sleep, waitForElement } from '../utils/generalHelper'
8+
import { sleep, waitForElements } from '../utils/generalHelper'
99

1010
/**
1111
* Gets all backslash command menu items
@@ -15,12 +15,11 @@ import { sleep, waitForElement } from '../utils/generalHelper'
1515
export async function getBackslashCommands(webview: WebviewView): Promise<{ items: WebElement[]; texts: string[] }> {
1616
try {
1717
await writeToChat('/', webview, false)
18-
await new Promise((resolve) => setTimeout(resolve, 2000))
18+
await sleep(2000)
1919

20-
const menuItems = await waitForElement(
20+
const menuItems = await waitForElements(
2121
webview,
2222
By.css('.mynah-detailed-list-item.mynah-ui-clickable-item.target-command'),
23-
true,
2423
10000
2524
)
2625

0 commit comments

Comments
 (0)