mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(e2e): make the wait logic more flexible
We will now by default wait for something to be hydrated, and then wait for the passed in tag to be visible whether it is hydrated or not. This allows the tag passed in to be associated with a standard (non-stencil) element.
This commit is contained in:
@ -11,8 +11,9 @@ module.exports = class E2ETestPage {
|
||||
async navigate(tagName = '') {
|
||||
this.driver.navigate().to(this.url);
|
||||
this.driver.manage().timeouts().implicitlyWait(10000);
|
||||
await this.driver.wait(until.elementLocated(By.css(`${tagName}.hydrated`)));
|
||||
return await this.driver.wait(until.elementIsVisible(this.driver.findElement(By.css(`${tagName}.hydrated`))));
|
||||
await this.driver.wait(until.elementLocated(By.css(`.hydrated`)));
|
||||
const tag = tagName || '.hydrated';
|
||||
return await this.driver.wait(until.elementIsVisible(this.driver.findElement(By.css(tag))));
|
||||
}
|
||||
|
||||
async present(clickTarget, options) {
|
||||
|
||||
Reference in New Issue
Block a user