diff --git a/src/pageobjects/workbench/Input.ts b/src/pageobjects/workbench/Input.ts index 703a46d1..47955a31 100644 --- a/src/pageobjects/workbench/Input.ts +++ b/src/pageobjects/workbench/Input.ts @@ -366,15 +366,10 @@ export class QuickOpenBox extends Input { return klass.indexOf('done') < 0 } - /** - * 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 { + async getQuickPicks (): Promise { const picks: QuickPickItem[] = [] const tree = await browser.$(this.locators.quickList) - await tree.waitForExist({ timeout }) + await tree.waitForExist({ timeout: 1000 }) const elements = await tree.$$(this.locators.row) for (const element of elements) { const index = parseInt(await element.getAttribute('aria-posinset'), 10) diff --git a/src/pageobjects/workbench/Workbench.ts b/src/pageobjects/workbench/Workbench.ts index f77ee1f2..a5fb1242 100644 --- a/src/pageobjects/workbench/Workbench.ts +++ b/src/pageobjects/workbench/Workbench.ts @@ -192,7 +192,10 @@ export class Workbench extends BasePage { } } await browser.keys(['F1']) - if (await browser.getVSCodeChannel() === 'vscode' && await browser.getVSCodeVersion() >= '1.44.0') { + if ( + (await browser.getVSCodeChannel() === 'vscode' && await browser.getVSCodeVersion() >= '1.44.0') + || await browser.getVSCodeVersion() === 'insiders' + ) { return new InputBox(this.locatorMap).wait() } return new QuickOpenBox(this.locatorMap).wait() diff --git a/test/specs/basic.e2e.ts b/test/specs/basic.e2e.ts index fb285e32..dd86e4a8 100644 --- a/test/specs/basic.e2e.ts +++ b/test/specs/basic.e2e.ts @@ -139,7 +139,8 @@ describe('WDIO VSCode Service', () => { const messages = await Promise.all(notifs.map((n) => n.getMessage())) return messages.includes(message) }, { - timeoutMsg: 'Could not find custom notification' + timeoutMsg: 'Could not find custom notification', + timeout: 5000 }) }) })