From fd682775b1a3ea579dc6196a704422c2d08c781a Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Mon, 14 Nov 2022 14:22:58 -0800 Subject: [PATCH] increase timeout and make it configurable --- src/pageobjects/workbench/Input.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pageobjects/workbench/Input.ts b/src/pageobjects/workbench/Input.ts index 47955a31..703a46d1 100644 --- a/src/pageobjects/workbench/Input.ts +++ b/src/pageobjects/workbench/Input.ts @@ -366,10 +366,15 @@ export class QuickOpenBox extends Input { return klass.indexOf('done') < 0 } - async getQuickPicks (): Promise { + /** + * Get a set of QuickPickItems + * @param timeout amount time in ms to wait for the tree to appear (default 5000ms) + * @returns QuickPickItem[] + */ + async getQuickPicks (timeout = 5000): Promise { const picks: QuickPickItem[] = [] const tree = await browser.$(this.locators.quickList) - await tree.waitForExist({ timeout: 1000 }) + await tree.waitForExist({ timeout }) const elements = await tree.$$(this.locators.row) for (const element of elements) { const index = parseInt(await element.getAttribute('aria-posinset'), 10)