Skip to content

Commit

Permalink
increase timeout and make it configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 14, 2022
1 parent 01840d1 commit fd68277
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pageobjects/workbench/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,15 @@ export class QuickOpenBox extends Input {
return klass.indexOf('done') < 0
}

async getQuickPicks (): Promise<QuickPickItem[]> {
/**
* 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<QuickPickItem[]> {
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)
Expand Down

0 comments on commit fd68277

Please sign in to comment.