web smoke tests (#11280)

* distro

* renable web smoke

* add missing script

* update node version

* update node version everywhere

* ensure playwright drivers are installed

* fix screenshot capture

* try this

* rewrite connection dialog code

* fix permissions

* more wip

* replace more $ with ^

* revert changes

* refactor and revert more changes

* add screen shot functionality to playwright

* fix compile

* fix profiler compile

* don't run new files for web

* continue on error for web

* continue on error for web not normal

* revert some changes
This commit is contained in:
Anthony Dresser
2020-07-10 22:12:45 -07:00
committed by GitHub
parent e2b52b97c8
commit d2bdd2bace
16 changed files with 87 additions and 207 deletions

View File

@@ -319,6 +319,11 @@ export class Code {
return await poll<IElement>(() => this.driver.getElements(windowId, selector).then(els => els[0]), accept, `get element '${selector}'`, retryCount);
}
async waitForElementGone(selector: string, accept: (result: IElement | undefined) => boolean = result => !result, retryCount: number = 200): Promise<IElement> {
const windowId = await this.getActiveWindowId();
return await poll<IElement>(() => this.driver.getElements(windowId, selector).then(els => els[0]), accept, `get element gone '${selector}'`, retryCount);
}
async waitForActiveElement(selector: string, retryCount: number = 200): Promise<void> {
const windowId = await this.getActiveWindowId();
await poll(() => this.driver.isActiveElement(windowId, selector), r => r, `is active element '${selector}'`, retryCount);