diff --git a/e2e/modal-navigation-ng/e2e/screens/screen.ts b/e2e/modal-navigation-ng/e2e/screens/screen.ts index d45ad05bc..107d34b41 100644 --- a/e2e/modal-navigation-ng/e2e/screens/screen.ts +++ b/e2e/modal-navigation-ng/e2e/screens/screen.ts @@ -44,7 +44,7 @@ export class Screen { } loadedHome = async () => { - const lblHome = await this._driver.findElementByAutomationText(home); + const lblHome = await this._driver.waitForElement(home); assert.isTrue(await lblHome.isDisplayed()); console.log(home + " loaded!"); } @@ -149,7 +149,7 @@ export class Screen { } loadedModalFrame = async () => { - const lblModal = await this._driver.findElementByAutomationText(modal, 1000); + const lblModal = await this._driver.waitForElement(modal, 5000); assert.isTrue(await lblModal.isDisplayed(), `${modal} is not displayed!`); console.log(modal + " loaded!"); } @@ -226,7 +226,7 @@ export class Screen { } loadedSecondPage = async () => { - const lblModalSecond = await this._driver.findElementByAutomationText(modalSecond); + const lblModalSecond = await this._driver.waitForElement(modalSecond, 5000); assert.isTrue(await lblModalSecond.isDisplayed()); console.log(modalSecond + " loaded!"); } @@ -259,7 +259,7 @@ export class Screen { } loadedNestedModalFrame = async () => { - const lblModalNested = await this._driver.findElementByAutomationText(modalNested); + const lblModalNested = await this._driver.waitForElement(modalNested, 5000); assert.isTrue(await lblModalNested.isDisplayed()); console.log(modalNested + " loaded!"); } diff --git a/e2e/renderer/e2e/action-bar.e2e-spec.ts b/e2e/renderer/e2e/action-bar.e2e-spec.ts index f92fc8b97..011c17645 100644 --- a/e2e/renderer/e2e/action-bar.e2e-spec.ts +++ b/e2e/renderer/e2e/action-bar.e2e-spec.ts @@ -6,6 +6,7 @@ import { } from "nativescript-dev-appium"; import { isOnTheLeft } from "./helpers/location"; +import { assert } from "chai"; describe("Action Bar scenario", () => { let driver: AppiumDriver; @@ -132,16 +133,10 @@ describe("Action Bar scenario", () => { conditional = await driver.findElementByAutomationText("conditional"); }); - it("should detach conditional action item when its condition is false", done => { - (async () => { - await toggle(); - - try { - await driver.findElementByAutomationText("conditional"); - } catch (e) { - done(); - } - })(); + it("should detach conditional action item when its condition is false", async () => { + await toggle(); + const conditionalBtn = await driver.waitForElement("conditional", 1000); + assert.isUndefined(conditionalBtn, "Conditional button should not be visible!"); }); it("should reattach conditional action item at correct place", async () => { diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone 7 12/tab-view-binding-first-tab.png b/e2e/renderer/e2e/resources/images/renderer/iPhone 7 12/tab-view-binding-first-tab.png new file mode 100644 index 000000000..a781c90f1 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone 7 12/tab-view-binding-first-tab.png differ