Skip to content

Commit 168827a

Browse files
committed
changes to rules
1 parent ac7cdc6 commit 168827a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

packages/amazonq/test/e2e_new/amazonq/tests/rules.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ describe('Amazon Q Rules Functionality', function () {
4848

4949
after(async function () {
5050
await closeAllTabs(webviewView)
51+
await VSBrowser.instance.quit()
5152
})
5253

5354
it('Rules Option Test', async () => {

packages/amazonq/test/e2e_new/amazonq/utils/generalUtils.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export async function sleep(timeout: number) {
2020
* @param timeout The timeout in milliseconds (Optional)
2121
* @returns Promise<WebElement> Returns the element found
2222
*/
23-
export async function waitForElement(webview: WebviewView, locator: By, timeout?: number): Promise<WebElement> {
23+
export async function waitForElement(webview: WebviewView, locator: By, timeout: number = 8000): Promise<WebElement> {
2424
const driver = webview.getDriver()
2525
await driver.wait(until.elementsLocated(locator), timeout)
2626
return await webview.findWebElement(locator)
@@ -33,7 +33,11 @@ export async function waitForElement(webview: WebviewView, locator: By, timeout?
3333
* @param timeout The timeout in milliseconds (Optional)
3434
* @returns Promise<WebElement[]> Returns an array of elements found
3535
*/
36-
export async function waitForElements(webview: WebviewView, locator: By, timeout?: number): Promise<WebElement[]> {
36+
export async function waitForElements(
37+
webview: WebviewView,
38+
locator: By,
39+
timeout: number = 8000
40+
): Promise<WebElement[]> {
3741
const driver = webview.getDriver()
3842
await driver.wait(until.elementsLocated(locator), timeout)
3943
return await webview.findWebElements(locator)
@@ -91,7 +95,7 @@ export async function writeToChat(prompt: string, webview: WebviewView, send = t
9195
* @param timeout The timeout in milliseconds
9296
* @returns Promise<boolean> True if a response was detected, false if timeout occurred
9397
*/
94-
export async function waitForChatResponse(webview: WebviewView, timeout = 15000): Promise<boolean> {
98+
export async function waitForChatResponse(webview: WebviewView, timeout = 8000): Promise<boolean> {
9599
const startTime = Date.now()
96100

97101
while (Date.now() - startTime < timeout) {

0 commit comments

Comments
 (0)