diff --git a/CHANGELOG.md b/CHANGELOG.md index b3b1d1d4b..d2ececf88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ + +# [7.0.0](https://github.com/NativeScript/nativescript-angular/compare/7.0.0-rc.0...7.0.0) (2018-11-12) + + +### Bug Fixes + +* crash in deactivate page router outlet ([#1590](https://github.com/NativeScript/nativescript-angular/issues/1590)) ([f8c7468](https://github.com/NativeScript/nativescript-angular/commit/f8c7468)) + + + + + +# [7.0.0-rc.0](https://github.com/NativeScript/nativescript-angular/compare/6.2.0...7.0.0-rc.0) (2018-11-05) + + +### Bug Fixes + +* **location-strategy:** crash on going back to TabView with nested outlets ([#1582](https://github.com/NativeScript/nativescript-angular/issues/1582)) ([f755991](https://github.com/NativeScript/nativescript-angular/commit/f755991)) + + +### Features + +* Angular 7 support + + + # [6.2.0](https://github.com/NativeScript/nativescript-angular/compare/6.1.0...6.2.0) (2018-10-30) diff --git a/e2e/config/appium.capabilities.json b/e2e/config/appium.capabilities.json index f33ede526..5f36a351c 100644 --- a/e2e/config/appium.capabilities.json +++ b/e2e/config/appium.capabilities.json @@ -37,7 +37,7 @@ }, "android22": { "platformName": "Android", - "platformVersion": "5.0", + "platformVersion": "5.1", "deviceName": "Emulator-Api22-Default", "avd": "Emulator-Api22-Default", "lt": 60000, @@ -155,6 +155,13 @@ "noReset": true, "fullReset": false }, + "sim.iPhoneXS.latest": { + "platformName": "iOS", + "platformVersion": "12.1", + "deviceName": "iPhone XS", + "noReset": true, + "fullReset": false + }, "sim.iPhoneXR": { "platformName": "iOS", "platformVersion": "12.0", diff --git a/e2e/modal-navigation-ng/app/home/home.component.html b/e2e/modal-navigation-ng/app/home/home.component.html index 9601e29ce..a632c3a92 100644 --- a/e2e/modal-navigation-ng/app/home/home.component.html +++ b/e2e/modal-navigation-ng/app/home/home.component.html @@ -1,5 +1,5 @@ - + @@ -9,7 +9,7 @@ - + diff --git a/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.html b/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.html index 13c391cb7..3ffe16a18 100644 --- a/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.html +++ b/e2e/modal-navigation-ng/app/modal-nested/modal-nested.component.html @@ -4,5 +4,5 @@ - + \ No newline at end of file diff --git a/e2e/modal-navigation-ng/app/modal-second/modal-second.component.html b/e2e/modal-navigation-ng/app/modal-second/modal-second.component.html index 9c6b4052e..f1086298f 100644 --- a/e2e/modal-navigation-ng/app/modal-second/modal-second.component.html +++ b/e2e/modal-navigation-ng/app/modal-second/modal-second.component.html @@ -5,5 +5,5 @@ - + \ No newline at end of file diff --git a/e2e/modal-navigation-ng/app/modal/modal.component.html b/e2e/modal-navigation-ng/app/modal/modal.component.html index 2077becc8..d49c5720f 100644 --- a/e2e/modal-navigation-ng/app/modal/modal.component.html +++ b/e2e/modal-navigation-ng/app/modal/modal.component.html @@ -8,6 +8,6 @@ - + \ No newline at end of file diff --git a/e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts b/e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts index 79010a093..c26ee077c 100644 --- a/e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts +++ b/e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts @@ -28,7 +28,6 @@ describe("modal-frame:", () => { }); beforeEach(async function () { - await screen.loadModalFrame(); }); afterEach(async function () { @@ -45,30 +44,37 @@ describe("modal-frame:", () => { }); it("should show dialog confirm, run in background", async () => { + await screen.loadModalFrame(true); await testDialogBackground(driver, screen); }); it("should run modal page with frame in background", async () => { + await screen.loadModalFrame(false); await modalFrameBackground(driver, screen); }); it("should navigate to second page, run in background, go back", async () => { + await screen.loadModalFrame(false); await testSecondPageBackground(driver, screen); }); it("should show nested modal page with frame, run in background, close", async () => { + await screen.loadModalFrame(false); await testNestedModalFrameBackground(driver, screen); }); it("should show nested modal page, run in background, close", async () => { + await screen.loadModalFrame(false); await testNestedModalPageBackground(driver, screen); }); it("should navigate to second page, close", async () => { + await screen.loadModalFrame(false); await testSecondPageClose(driver, screen); }); it("should navigate to second page, run in background, go back", async () => { + await screen.loadModalFrame(true); await testSecondPageBackground(driver, screen); }); }); diff --git a/e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts b/e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts index 6d6846d58..5cb412226 100644 --- a/e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts +++ b/e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts @@ -2,10 +2,6 @@ import { AppiumDriver, createDriver } from "nativescript-dev-appium"; import { Screen } from "./screen" import { roots, - modalFrameBackground, - testSecondPageBackground, - testSecondPageClose, - testNestedModalFrameBackground, testNestedModalPageBackground, testDialogBackground, } from "./shared.e2e-spec" @@ -22,15 +18,10 @@ describe("modal-layout:", () => { roots.forEach(root => { describe(`${root} modal no frame background scenarios:`, () => { - before(async () => { await screen[root](); }); - beforeEach(async function () { - await screen.loadModalNoFrame(); - }); - afterEach(async function () { if (this.currentTest.state === "failed") { await driver.logTestArtifacts(this.currentTest.title); @@ -45,10 +36,13 @@ describe("modal-layout:", () => { }); it("should show nested modal page, run in background, close", async () => { + await screen.loadModalNoFrame(true); await testNestedModalPageBackground(driver, screen, false); + }); it("should show dialog confirm inside modal view with no frame, run in background", async () => { + await screen.loadModalNoFrame(false); await testDialogBackground(driver, screen, false); }); }); diff --git a/e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts b/e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts index b7fbbe9be..cbeafec35 100644 --- a/e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts +++ b/e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts @@ -11,11 +11,6 @@ describe("Shared modal from home and back", () => { await driver.resetApp(); }); - after(async () => { - await driver.quit(); - console.log("Quit driver!"); - }); - afterEach(async function () { if (this.currentTest.state === "failed") { await driver.logTestArtifacts(this.currentTest.title); @@ -93,8 +88,7 @@ describe("Shared modal from different components", () => { afterEach(async function () { if (this.currentTest.state === "failed") { - await driver.logPageSource(this.currentTest.title); - await driver.logScreenshot(this.currentTest.title); + await driver.logTestArtifacts(this.currentTest.title); } }); diff --git a/e2e/modal-navigation-ng/e2e/screen.ts b/e2e/modal-navigation-ng/e2e/screen.ts index ba44fdeea..0fdbcb183 100644 --- a/e2e/modal-navigation-ng/e2e/screen.ts +++ b/e2e/modal-navigation-ng/e2e/screen.ts @@ -38,36 +38,36 @@ export class Screen { } loadedHome = async () => { - const lblHome = await this._driver.findElementByText(home); + const lblHome = await this._driver.findElementByAutomationText(home); assert.isTrue(await lblHome.isDisplayed()); console.log(home + " loaded!"); } resetFrameRootView = async () => { console.log("Setting frame root ..."); - const btnResetFrameRootView = await this._driver.findElementByText(resetFrameRootView); + const btnResetFrameRootView = await this._driver.findElementByAutomationText(resetFrameRootView); await btnResetFrameRootView.tap(); } resetNamedFrameRootView = async () => { console.log("Setting named frame root ..."); - const btnResetFrameRootView = await this._driver.findElementByText(resetNamedFrameRootView); + const btnResetFrameRootView = await this._driver.findElementByAutomationText(resetNamedFrameRootView); await btnResetFrameRootView.tap(); } resetLayoutRootView = async () => { console.log("Setting layout root ..."); - const btnResetLayoutRootView = await this._driver.findElementByText(resetLayoutRootView); - await btnResetLayoutRootView.tap(); + const btnResetLayoutRootView = await this._driver.waitForElement(resetLayoutRootView); + await btnResetLayoutRootView.click(); } resetTabRootView = async () => { - const btnResetTabRootView = await this._driver.findElementByText(resetTabRootView); + const btnResetTabRootView = await this._driver.findElementByAutomationText(resetTabRootView); await btnResetTabRootView.tap(); } loadedTabRootView = async () => { - const tabFirst = await this._driver.findElementByText(first); + const tabFirst = await this._driver.findElementByAutomationText(first); assert.isTrue(await tabFirst.isDisplayed()); console.log("Tab root view loaded!"); } @@ -87,12 +87,8 @@ export class Screen { setTabRootView = async () => { // should load tab root await this.loadedHome(); - try { - await this.loadedTabRootView(); - } catch (err) { - await this.resetTabRootView(); - await this.loadedTabRootView(); - } + await this.resetTabRootView(); + await this.loadedTabRootView(); } setLayoutRootView = async () => { @@ -102,29 +98,29 @@ export class Screen { } showModalFrame = async () => { - const btnModalFrame = await this._driver.findElementByText(modalFrame); + const btnModalFrame = await this._driver.findElementByAutomationText(modalFrame); await btnModalFrame.tap(); } loadedModalFrame = async () => { - const lblModal = await this._driver.findElementByText(modal); - assert.isTrue(await lblModal.isDisplayed()); + const lblModal = await this._driver.findElementByAutomationText(modal, 1000); + assert.isTrue(await lblModal.isDisplayed(), `${modal} is not displayed!`); console.log(modal + " loaded!"); } showModalNoFrame = async () => { - const btnModalPage = await this._driver.findElementByText(modalNoFrame); + const btnModalPage = await this._driver.findElementByAutomationText(modalNoFrame); await btnModalPage.tap(); } loadedModalPage = async () => { - const btnShowNestedModalPage = await this._driver.findElementByText(showNestedModalPage); - assert.isTrue(await btnShowNestedModalPage.isDisplayed()); + const btnShowNestedModalPage = await this._driver.findElementByAutomationText(showNestedModalPage); + assert.isTrue(await btnShowNestedModalPage.isDisplayed(), `${showNestedModalPage} is not displayed`); console.log("Modal Page loaded!"); } showModalLayout = async () => { - const btnModalLayout = await this._driver.findElementByText(modalLayout); + const btnModalLayout = await this._driver.findElementByAutomationText(modalLayout); await btnModalLayout.tap(); } @@ -133,127 +129,123 @@ export class Screen { } showModalTabView = async () => { - const btnModalTabView = await this._driver.findElementByText(modalTabView); + const btnModalTabView = await this._driver.findElementByAutomationText(modalTabView); await btnModalTabView.tap(); } loadedModalTabView = async () => { - const itemModalFirst = await this._driver.findElementByText(modalFirst); + const itemModalFirst = await this._driver.findElementByAutomationText(modalFirst); assert.isTrue(await itemModalFirst.isDisplayed()); console.log("Modal TabView loaded!"); } navigateToSecondPage = async () => { - const btnNavToSecondPage = await this._driver.findElementByText(navToSecondPage); + const btnNavToSecondPage = await this._driver.findElementByAutomationText(navToSecondPage); await btnNavToSecondPage.tap(); } showDialogConfirm = async () => { - const btnShowDialogConfirm = await this._driver.findElementByText(showDialog); + const btnShowDialogConfirm = await this._driver.findElementByAutomationText(showDialog); await btnShowDialogConfirm.tap(); } navigateToFirstItem = async () => { - const itemModalFirst = await this._driver.findElementByText(modalFirst); + const itemModalFirst = await this._driver.findElementByAutomationText(modalFirst); await itemModalFirst.tap(); } navigateToSecondItem = async () => { - const itemModalSecond = await this._driver.findElementByText(modalSecond); + const itemModalSecond = await this._driver.findElementByAutomationText(modalSecond); await itemModalSecond.tap(); } loadedModalNoFrame = async () => { - const btnShowDialogConfirm = await this._driver.findElementByText(showDialog); - const btnCloseModal = await this._driver.findElementByText(closeModal); + const btnShowDialogConfirm = await this._driver.waitForElement(showDialog); + const btnCloseModal = await this._driver.waitForElement(closeModal); assert.isTrue(await btnShowDialogConfirm.isDisplayed()); assert.isTrue(await btnCloseModal.isDisplayed()); console.log("Modal Without Frame shown!"); } loadedConfirmDialog = async () => { - const lblDialogMessage = await this._driver.findElementByText(confirmDialogMessage); + const lblDialogMessage = await this._driver.findElementByAutomationText(confirmDialogMessage); assert.isTrue(await lblDialogMessage.isDisplayed()); console.log(dialogConfirm + " shown!"); } loadedSecondPage = async () => { - const lblModalSecond = await this._driver.findElementByText(modalSecond); + const lblModalSecond = await this._driver.findElementByAutomationText(modalSecond); assert.isTrue(await lblModalSecond.isDisplayed()); console.log(modalSecond + " loaded!"); } loadedFirstItem = async () => { - const lblModal = await this._driver.findElementByText(modal); + const lblModal = await this._driver.findElementByAutomationText(modal); assert.isTrue(await lblModal.isDisplayed()); console.log("First Item loaded!"); } loadedSecondItem = async () => { - const btnGoBack = await this._driver.findElementByText(goBack); + const btnGoBack = await this._driver.findElementByAutomationText(goBack); assert.isTrue(await btnGoBack.isDisplayed()); console.log("Second Item loaded!"); } closeDialog = async () => { - const btnYesDialog = await this._driver.findElementByText(confirmDialog); + const btnYesDialog = await this._driver.findElementByAutomationText(confirmDialog); await btnYesDialog.tap(); } goBackFromSecondPage = async () => { - const btnGoBackFromSecondPage = await this._driver.findElementByText(goBack); + const btnGoBackFromSecondPage = await this._driver.findElementByAutomationText(goBack); await btnGoBackFromSecondPage.tap(); } showNestedModalFrame = async () => { - const btnShowNestedModalFrame = await this._driver.findElementByText(showNestedModalFrame); + const btnShowNestedModalFrame = await this._driver.findElementByAutomationText(showNestedModalFrame); await btnShowNestedModalFrame.tap(); } loadedNestedModalFrame = async () => { - const lblModalNested = await this._driver.findElementByText(modalNested); + const lblModalNested = await this._driver.findElementByAutomationText(modalNested); assert.isTrue(await lblModalNested.isDisplayed()); console.log(modalNested + " loaded!"); } closeModalNested = async () => { - const btnCloseNestedModal = await this._driver.findElementByText(closeModalNested); + const btnCloseNestedModal = await this._driver.findElementByAutomationText(closeModalNested); await btnCloseNestedModal.tap(); } showNestedModalPage = async () => { - const btnShowNestedModalPage = await this._driver.findElementByText(showNestedModalPage); + const btnShowNestedModalPage = await this._driver.findElementByAutomationText(showNestedModalPage); await btnShowNestedModalPage.tap(); } loadedNestedModalPage = async () => { - const btnCloseModalNested = await this._driver.findElementByText(closeModalNested); - assert.isTrue(await btnCloseModalNested.isDisplayed()); + const btnCloseModalNested = await this._driver.findElementByAutomationText(closeModalNested); + assert.isTrue(await btnCloseModalNested.isDisplayed(), `${closeModalNested} is not shown`); console.log(closeModalNested + " loaded!"); } closeModal = async () => { - const btnCloseModal = await this._driver.findElementByText(closeModal); + const btnCloseModal = await this._driver.waitForElement(closeModal, 10000); await btnCloseModal.tap(); } - loadModalNoFrame = async () => { - try { - await this.loadedModalNoFrame(); - } catch (err) { - // should show modal with no frame + loadModalNoFrame = async (loadShowModalPageWithFrame: boolean) => { + if (loadShowModalPageWithFrame) { await this.showModalNoFrame(); - await this.loadedModalNoFrame(); } + + await this.loadedModalNoFrame(); } - loadModalFrame = async () => { - try { - await this.loadedModalFrame(); - } catch (err) { - // should show modal page with frame + loadModalFrame = async (loadShowModalPageWithFrame: boolean) => { + if (loadShowModalPageWithFrame) { await this.showModalFrame(); - await this.loadedModalFrame(); } + + await this.loadedModalFrame(); } } \ No newline at end of file diff --git a/e2e/modal-navigation-ng/e2e/shared.e2e-spec.ts b/e2e/modal-navigation-ng/e2e/shared.e2e-spec.ts index f0c6e3192..54e9f6a90 100644 --- a/e2e/modal-navigation-ng/e2e/shared.e2e-spec.ts +++ b/e2e/modal-navigation-ng/e2e/shared.e2e-spec.ts @@ -1,9 +1,10 @@ -import { AppiumDriver, createDriver } from "nativescript-dev-appium"; +import { AppiumDriver } from "nativescript-dev-appium"; import { Screen } from "./screen" const time = 1; export const roots = ["setFrameRootView", "setLayoutRootView", "setTabRootView", "setNamedFrameRootView"]; +// export const roots = ["setTabRootView", "setNamedFrameRootView"]; export async function modalFrameBackground(driver: AppiumDriver, screen: Screen) { await driver.backgroundApp(time); diff --git a/e2e/modal-navigation-ng/package.json b/e2e/modal-navigation-ng/package.json index 0fd0f8b0f..8938a8a85 100644 --- a/e2e/modal-navigation-ng/package.json +++ b/e2e/modal-navigation-ng/package.json @@ -13,25 +13,25 @@ } }, "dependencies": { - "@angular/animations": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/animations": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "nativescript-angular": "file:../../nativescript-angular", "nativescript-theme-core": "~1.0.4", "reflect-metadata": "~0.1.8", - "rxjs": "~6.1.0", + "rxjs": "~6.3.3", "tns-core-modules": "next", "zone.js": "~0.8.2" }, "devDependencies": { - "@angular/compiler-cli": "~6.1.0", - "@ngtools/webpack": "~6.1.0", + "@ngtools/webpack": "~7.0.0", + "@angular/compiler-cli": "~7.0.0", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -52,7 +52,7 @@ "nativescript-worker-loader": "~0.9.0", "raw-loader": "~0.5.1", "resolve-url-loader": "~2.3.0", - "typescript": "~2.7.2", + "typescript": "~3.1.1", "uglifyjs-webpack-plugin": "~1.2.5", "webpack": "~4.6.0", "webpack-bundle-analyzer": "~2.13.0", diff --git a/e2e/nested-router-tab-view/app/about/about.component.html b/e2e/nested-router-tab-view/app/about/about.component.html new file mode 100644 index 000000000..92f893d2d --- /dev/null +++ b/e2e/nested-router-tab-view/app/about/about.component.html @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/e2e/nested-router-tab-view/app/about/about.component.ts b/e2e/nested-router-tab-view/app/about/about.component.ts new file mode 100644 index 000000000..2d8eed10c --- /dev/null +++ b/e2e/nested-router-tab-view/app/about/about.component.ts @@ -0,0 +1,24 @@ +import { Component, ViewContainerRef } from "@angular/core"; +import { ModalDialogService, ModalDialogOptions } from "nativescript-angular/directives/dialogs"; +import { RouterExtensions } from "nativescript-angular/router"; +import { ActivatedRoute } from "@angular/router"; + +@Component({ + moduleId: module.id, + selector: "about-page", + templateUrl: "./about.component.html" +}) +export class AboutComponent { + constructor( + private modal: ModalDialogService, + private vcRef: ViewContainerRef, + private activeRoute: ActivatedRoute, + private routerExtension: RouterExtensions) { } + + ngOnInit() { + } + + backActivatedRoute() { + this.routerExtension.back({ relativeTo: this.activeRoute }); + } +} diff --git a/e2e/nested-router-tab-view/app/app.routing.ts b/e2e/nested-router-tab-view/app/app.routing.ts index 8dd38fb0e..e7b630902 100644 --- a/e2e/nested-router-tab-view/app/app.routing.ts +++ b/e2e/nested-router-tab-view/app/app.routing.ts @@ -9,6 +9,7 @@ import { TeamDetailComponent } from "./team/team-detail.component"; import { LoginComponent } from "./login/login.component"; import { TabsComponent } from "./tabs/tabs.component"; import { HomeComponent } from "./home/home.component"; +import { AboutComponent } from "./about/about.component"; import { ModalComponent } from "./modal/modal.component"; import { NestedModalComponent } from "./modal-nested/modal-nested.component"; @@ -54,7 +55,8 @@ const routes: Routes = [ { path: "teams", component: TeamsComponent, outlet: "teamTab" }, { path: "team/:id", component: TeamDetailComponent, outlet: "teamTab" }, ] - } + }, + { path: "about", component: AboutComponent } ]; @NgModule({ diff --git a/e2e/nested-router-tab-view/app/shared.module.ts b/e2e/nested-router-tab-view/app/shared.module.ts index 03a4b7152..5f60aaaf3 100644 --- a/e2e/nested-router-tab-view/app/shared.module.ts +++ b/e2e/nested-router-tab-view/app/shared.module.ts @@ -7,6 +7,7 @@ import { NativeScriptRouterModule } from "nativescript-angular/router"; import { DataService } from "./data.service"; import { HomeComponent } from "./home/home.component"; +import { AboutComponent } from "./about/about.component"; import { PlayerComponent } from "./player/players.component"; import { PlayerDetailComponent } from "./player/player-detail.component"; import { TeamsComponent } from "./team/teams.component"; @@ -19,6 +20,7 @@ import { TeamDetailComponent } from "./team/team-detail.component"; ], declarations: [ HomeComponent, + AboutComponent, PlayerComponent, PlayerDetailComponent, TeamsComponent, @@ -26,6 +28,7 @@ import { TeamDetailComponent } from "./team/team-detail.component"; ], exports: [ HomeComponent, + AboutComponent, PlayerComponent, PlayerDetailComponent, TeamsComponent, diff --git a/e2e/nested-router-tab-view/app/tabs/tabs.component.html b/e2e/nested-router-tab-view/app/tabs/tabs.component.html index 8bb946b66..0542dbc71 100644 --- a/e2e/nested-router-tab-view/app/tabs/tabs.component.html +++ b/e2e/nested-router-tab-view/app/tabs/tabs.component.html @@ -3,6 +3,7 @@ + diff --git a/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts b/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts index b2a7b9613..da759348c 100644 --- a/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts +++ b/e2e/nested-router-tab-view/e2e/home-tabs.e2e-spec.ts @@ -42,6 +42,24 @@ describe("home-tabs:", () => { await screen.loadedTeamList(); }); + it("should navigate to Tabs then to About forward", async () => { + await screen.navigateToTabsPage(); + await screen.loadedTabs(); + await screen.loadedPlayersList(); + await screen.navigateToAboutPage(); + await screen.loadedAbout(); + }); + + it("should go back to Tabs and then back to Home", async () => { + await backActivatedRoute(driver); + await screen.loadedTabs(); + await screen.loadedPlayersList(); + await backActivatedRoute(driver); + await screen.loadedHome(); + await screen.loadedPlayersList(); + await screen.loadedTeamList(); + }); + it("should navigate to Tabs without Players/Teams navigation", async () => { await screen.navigateToTabsPage(); await screen.loadedTabs(); diff --git a/e2e/nested-router-tab-view/e2e/screen.ts b/e2e/nested-router-tab-view/e2e/screen.ts index 9aa2e8971..53eefdd20 100644 --- a/e2e/nested-router-tab-view/e2e/screen.ts +++ b/e2e/nested-router-tab-view/e2e/screen.ts @@ -2,6 +2,7 @@ import { AppiumDriver, SearchOptions } from "nativescript-dev-appium"; import { assert } from "chai"; const home = "Home Component"; +const about = "About Component"; const login = "Login Component"; const tabs = "Tabs Component"; @@ -16,6 +17,7 @@ const gotoNextTeam = "next team"; const gotoTeams = "teams"; const gotoHomePage = "Go To Home Page"; +const gotoAboutPage = "Go To About Page"; const gotoTabsPage = "Go To Tabs Page"; const confirmDialog = "Ok"; @@ -65,6 +67,12 @@ export class Screen { console.log(home + " loaded!"); } + loadedAbout= async () => { + const lblAbout = await this._driver.findElementByAutomationText(about); + assert.isTrue(await lblAbout.isDisplayed()); + console.log(home + " loaded!"); + } + loadedTabs = async () => { const lblTabs = await this._driver.findElementByAutomationText(tabs); assert.isTrue(await lblTabs.isDisplayed()); @@ -113,6 +121,11 @@ export class Screen { await btnNavToHomePage.tap(); } + navigateToAboutPage = async () => { + const btnNavToAboutPage = await this._driver.findElementByAutomationText(gotoAboutPage); + await btnNavToAboutPage.tap(); + } + navigateToPlayer = async (player: string) => { const btnNavPlayerPage = await this._driver.findElementByAutomationText(player); await btnNavPlayerPage.tap(); diff --git a/e2e/renderer/app/list.component.ts b/e2e/renderer/app/list.component.ts index e486262f5..168370525 100644 --- a/e2e/renderer/app/list.component.ts +++ b/e2e/renderer/app/list.component.ts @@ -1,8 +1,9 @@ import { Component } from "@angular/core"; @Component({ + styles: ["Button { font-size: 10; margin: 0; padding: 0 }"], template: ` - + diff --git a/e2e/renderer/e2e/action-bar.e2e-spec.ts b/e2e/renderer/e2e/action-bar.e2e-spec.ts index 312df8a19..f92fc8b97 100644 --- a/e2e/renderer/e2e/action-bar.e2e-spec.ts +++ b/e2e/renderer/e2e/action-bar.e2e-spec.ts @@ -21,21 +21,27 @@ describe("Action Bar scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("ActionBar dynamic", SearchOptions.exact); + await driver.findElementByAutomationText("ActionBar dynamic"); await navigationButton.click(); const actionBar = - await driver.findElementByText("Action Bar Dynamic Items", SearchOptions.exact); + await driver.findElementByAutomationText("Action Bar Dynamic Items"); }); it("should find elements", async () => { - firstActionItem = await driver.findElementByText("one"); - secondActionItem = await driver.findElementByText("two"); + firstActionItem = await driver.findElementByAutomationText("one"); + secondActionItem = await driver.findElementByAutomationText("two"); - toggleFirstButton = await driver.findElementByText("toggle 1"); - toggleSecondButton = await driver.findElementByText("toggle 2"); + toggleFirstButton = await driver.findElementByAutomationText("toggle 1"); + toggleSecondButton = await driver.findElementByAutomationText("toggle 2"); }); it("should initially render the action items in the correct order", async () => { @@ -47,7 +53,7 @@ describe("Action Bar scenario", () => { await toggleFirst(); try { - await driver.findElementByText("one", SearchOptions.exact); + await driver.findElementByAutomationText("one"); } catch (e) { done(); } @@ -64,7 +70,7 @@ describe("Action Bar scenario", () => { await toggleSecond(); try { - await driver.findElementByText("two", SearchOptions.exact); + await driver.findElementByAutomationText("two"); } catch (e) { done(); } @@ -109,15 +115,21 @@ describe("Action Bar scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("ActionBarExtension", SearchOptions.exact); + await driver.findElementByAutomationText("ActionBarExtension"); await navigationButton.click(); }); it("should find elements", async () => { - toggleButton = await driver.findElementByText("toggle"); - conditional = await driver.findElementByText("conditional"); + toggleButton = await driver.findElementByAutomationText("toggle"); + conditional = await driver.findElementByAutomationText("conditional"); }); it("should detach conditional action item when its condition is false", done => { @@ -125,7 +137,7 @@ describe("Action Bar scenario", () => { await toggle(); try { - await driver.findElementByText("conditional", SearchOptions.exact); + await driver.findElementByAutomationText("conditional"); } catch (e) { done(); } diff --git a/e2e/renderer/e2e/ngfor.e2e-spec.ts b/e2e/renderer/e2e/ngfor.e2e-spec.ts index ff0f0a162..007def76f 100644 --- a/e2e/renderer/e2e/ngfor.e2e-spec.ts +++ b/e2e/renderer/e2e/ngfor.e2e-spec.ts @@ -19,22 +19,28 @@ describe("ngFor scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgFor", SearchOptions.exact); + await driver.findElementByAutomationText("NgFor"); await navigationButton.click(); const actionBar = - await driver.findElementByText("ngFor", SearchOptions.exact); + await driver.findElementByAutomationText("ngFor"); }); it("should find elements", async () => { - const first = await driver.findElementByText( - lastAddedElementId.toString(), SearchOptions.exact); + const first = await driver.findElementByAutomationText( + lastAddedElementId.toString()); elements.push(first); - addButton = await driver.findElementByText("add", SearchOptions.exact); - removeButton = await driver.findElementByText("remove", SearchOptions.exact); + addButton = await driver.findElementByAutomationText("add"); + removeButton = await driver.findElementByAutomationText("remove"); await isAbove(first, addButton); }); @@ -75,8 +81,8 @@ describe("ngFor scenario", () => { await addButton.click(); lastAddedElementId += 1; - const newElement = await driver.findElementByText( - lastAddedElementId.toString(), SearchOptions.exact); + const newElement = await driver.findElementByAutomationText( + lastAddedElementId.toString()); elements.push(newElement); }; @@ -96,8 +102,8 @@ describe("ngFor scenario", () => { }; const checkAppendedCorrectly = async () => { - const lastAdded = await driver.findElementByText( - lastAddedElementId.toString(), SearchOptions.exact); + const lastAdded = await driver.findElementByAutomationText( + lastAddedElementId.toString()); await isAbove(elements.slice(-2)[0], lastAdded); await isAbove(lastAdded, addButton); diff --git a/e2e/renderer/e2e/ngforof.e2e-spec.ts b/e2e/renderer/e2e/ngforof.e2e-spec.ts index e82406777..219fa08bb 100644 --- a/e2e/renderer/e2e/ngforof.e2e-spec.ts +++ b/e2e/renderer/e2e/ngforof.e2e-spec.ts @@ -25,21 +25,27 @@ describe("ngForOf scenario", function () { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgForOf", SearchOptions.exact); + await driver.findElementByAutomationText("NgForOf"); await navigationButton.click(); const actionBar = - await driver.findElementByText("ngForOf", SearchOptions.exact); + await driver.findElementByAutomationText("ngForOf"); }); it("should find elements", async () => { const firstElement = await getElement(lastAddedElementId); elements.push(firstElement); - addButton = await driver.findElementByText("add", SearchOptions.exact); - removeButton = await driver.findElementByText("remove", SearchOptions.exact); + addButton = await driver.findElementByAutomationText("add"); + removeButton = await driver.findElementByAutomationText("remove"); await elementTupleCorrectlyRendered(firstElement); await isAbove(firstElement.button, addButton); @@ -150,11 +156,11 @@ describe("ngForOf scenario", function () { button = await driver.findElementByAccessibilityId( id.toString()); } else { - label = await driver.findElementByText( - "label: " + id.toString(), SearchOptions.exact); + label = await driver.findElementByAutomationText( + "label: " + id.toString()); - button = await driver.findElementByText( - id.toString(), SearchOptions.exact); + button = await driver.findElementByAutomationText( + id.toString()); } return { label, button }; diff --git a/e2e/renderer/e2e/ngif.e2e-spec.ts b/e2e/renderer/e2e/ngif.e2e-spec.ts index 4684fe4df..e164114f8 100644 --- a/e2e/renderer/e2e/ngif.e2e-spec.ts +++ b/e2e/renderer/e2e/ngif.e2e-spec.ts @@ -19,24 +19,30 @@ describe("ngIf scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgIf no layout", SearchOptions.exact); + await driver.findElementByAutomationText("NgIf no layout"); await navigationButton.click(); const actionBar = - await driver.findElementByText("ngIf - no layout", SearchOptions.exact); + await driver.findElementByAutomationText("ngIf - no layout"); }); it("should find elements", async () => { - await driver.findElementByText("false", SearchOptions.exact); - toggleButton = await driver.findElementByText("Toggle", SearchOptions.exact); + await driver.findElementByAutomationText("false"); + toggleButton = await driver.findElementByAutomationText("Toggle"); }); it("show 'true' button when show is true", async () => { await toggleButton.click(); - await driver.findElementByText("true", SearchOptions.exact); + await driver.findElementByAutomationText("true"); }); }); @@ -51,21 +57,27 @@ describe("ngIf scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgIf inbetween", SearchOptions.exact); + await driver.findElementByAutomationText("NgIf inbetween"); await navigationButton.click(); const actionBar = - await driver.findElementByText("ngIf - inbetween", SearchOptions.exact); + await driver.findElementByAutomationText("ngIf - inbetween"); }); it("should find elements", async () => { - firstButton = await driver.findElementByText("Button 1", SearchOptions.exact); - secondButton = await driver.findElementByText("Button 2", SearchOptions.exact); - toggleButton = await driver.findElementByText("Toggle", SearchOptions.exact); + firstButton = await driver.findElementByAutomationText("Button 1"); + secondButton = await driver.findElementByAutomationText("Button 2"); + toggleButton = await driver.findElementByAutomationText("Toggle"); - conditionalLabel = await driver.findElementByText("Label", SearchOptions.exact); + conditionalLabel = await driver.findElementByAutomationText("Label"); const labelIsDisplayed = await conditionalLabel.isDisplayed(); assert.isTrue(labelIsDisplayed); }); @@ -75,7 +87,7 @@ describe("ngIf scenario", () => { await toggleButton.click(); try { - await driver.findElementByText("Label", SearchOptions.exact); + await driver.findElementByAutomationText("Label"); } catch (e) { done(); } @@ -93,22 +105,28 @@ describe("ngIf scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgIfElse", SearchOptions.exact); + await driver.findElementByAutomationText("NgIfElse"); await navigationButton.click(); const actionBar = - await driver.findElementByText("ngIfElse", SearchOptions.exact); + await driver.findElementByAutomationText("ngIfElse"); }); it("should find elements", async () => { - toggleButton = await driver.findElementByText("Toggle", SearchOptions.exact); - ifButton = await driver.findElementByText("If", SearchOptions.exact); + toggleButton = await driver.findElementByAutomationText("Toggle"); + ifButton = await driver.findElementByAutomationText("If"); }); it("shouldn't render 'else' template when condition is true", done => { - driver.findElementByText("Else", SearchOptions.exact) + driver.findElementByAutomationText("Else", SearchOptions.exact) .then(_ => { throw new Error("Else template found!"); }) .catch(() => done()); }); @@ -116,11 +134,11 @@ describe("ngIf scenario", () => { it("should attach 'else' template when condition is changed to false", async () => { await toggleButton.click(); - elseButton = await driver.findElementByText("Else", SearchOptions.exact); + elseButton = await driver.findElementByAutomationText("Else"); }); it("should detach 'if' template when condition is changed to false", done => { - driver.findElementByText("If", SearchOptions.exact) + driver.findElementByAutomationText("If", SearchOptions.exact) .then(_ => { throw new Error("If template found!"); }) .catch(() => done()); }); @@ -130,7 +148,7 @@ describe("ngIf scenario", () => { await toggleButton.click(); try { - await driver.findElementByText("Else", SearchOptions.exact); + await driver.findElementByAutomationText("Else"); } catch (e) { done(); } @@ -148,22 +166,28 @@ describe("ngIf scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgIf Then Else", SearchOptions.exact); + await driver.findElementByAutomationText("NgIf Then Else"); await navigationButton.click(); const actionBar = - await driver.findElementByText("ngIf Then Else", SearchOptions.exact); + await driver.findElementByAutomationText("ngIf Then Else"); }); it("should find elements", async () => { - toggleButton = await driver.findElementByText("Toggle", SearchOptions.exact); - thenButton = await driver.findElementByText("Then", SearchOptions.exact); + toggleButton = await driver.findElementByAutomationText("Toggle"); + thenButton = await driver.findElementByAutomationText("Then"); }); it("shouldn't render 'else' template when condition is true", done => { - driver.findElementByText("Else", SearchOptions.exact) + driver.findElementByAutomationText("Else", SearchOptions.exact) .then(_ => { throw new Error("Else template found!"); }) .catch(() => done()); }); @@ -171,11 +195,11 @@ describe("ngIf scenario", () => { it("should attach 'else' template when condition is changed to false", async () => { await toggleButton.click(); - elseButton = await driver.findElementByText("Else", SearchOptions.exact); + elseButton = await driver.findElementByAutomationText("Else"); }); it("should detach 'then' template when condition is changed to false", done => { - driver.findElementByText("Then", SearchOptions.exact) + driver.findElementByAutomationText("Then", SearchOptions.exact) .then(_ => { throw new Error("Then template found!"); }) .catch(() => done()); }); @@ -185,7 +209,7 @@ describe("ngIf scenario", () => { await toggleButton.click(); try { - await driver.findElementByText("Else", SearchOptions.exact); + await driver.findElementByAutomationText("Else"); } catch (e) { done(); } @@ -203,22 +227,28 @@ describe("ngIf scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("Content view", SearchOptions.exact); + await driver.findElementByAutomationText("Content view"); await navigationButton.click(); const actionBar = - await driver.findElementByText("Content View", SearchOptions.exact); + await driver.findElementByAutomationText("Content View"); }); it("should find elements", async () => { - toggleButton = await driver.findElementByText("Toggle", SearchOptions.exact); - thenButton = await driver.findElementByText("Then", SearchOptions.exact); + toggleButton = await driver.findElementByAutomationText("Toggle"); + thenButton = await driver.findElementByAutomationText("Then"); }); it("shouldn't render 'else' template when condition is true", done => { - driver.findElementByText("Else", SearchOptions.exact) + driver.findElementByAutomationText("Else", SearchOptions.exact) .then(_ => { throw new Error("Else template found!"); }) .catch(() => done()); }); @@ -226,11 +256,11 @@ describe("ngIf scenario", () => { it("should attach 'else' template when condition is changed to false", async () => { await toggleButton.click(); - elseButton = await driver.findElementByText("Else", SearchOptions.exact); + elseButton = await driver.findElementByAutomationText("Else"); }); it("should detach 'then' template when condition is changed to false", done => { - driver.findElementByText("Then", SearchOptions.exact) + driver.findElementByAutomationText("Then", SearchOptions.exact) .then(_ => { throw new Error("Then template found!"); }) .catch(() => done()); }); @@ -240,7 +270,7 @@ describe("ngIf scenario", () => { await toggleButton.click(); try { - await driver.findElementByText("Else", SearchOptions.exact); + await driver.findElementByAutomationText("Else"); } catch (e) { done(); } @@ -259,18 +289,24 @@ describe("ngIf scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("NgIf Subsequent Ifs", SearchOptions.exact); + await driver.findElementByAutomationText("NgIf Subsequent Ifs"); await navigationButton.click(); }); it("should find elements", async () => { - firstButton = await driver.findElementByText("Toggle first", SearchOptions.exact); - secondButton = await driver.findElementByText("Toggle second", SearchOptions.exact); + firstButton = await driver.findElementByAutomationText("Toggle first"); + secondButton = await driver.findElementByAutomationText("Toggle second"); - firstLabel = await driver.findElementByText("== 1 ==", SearchOptions.exact); - secondLabel = await driver.findElementByText("== 2 ==", SearchOptions.exact); + firstLabel = await driver.findElementByAutomationText("== 1 =="); + secondLabel = await driver.findElementByAutomationText("== 2 =="); assert.isDefined(firstButton); assert.isDefined(secondButton); @@ -281,7 +317,7 @@ describe("ngIf scenario", () => { it("should toggle on first view", async () => { await firstButton.click(); - let conditional = await driver.findElementByText("first", SearchOptions.exact); + let conditional = await driver.findElementByAutomationText("first"); await isAbove(firstLabel, conditional); await isAbove(conditional, secondLabel); @@ -291,7 +327,7 @@ describe("ngIf scenario", () => { (async () => { await firstButton.click(); - driver.findElementByText("first", SearchOptions.exact, 500) + driver.findElementsByAutomationText("first", 500) .then(_ => { throw new Error("first label found!"); }) .catch(() => done()); })(); @@ -300,7 +336,7 @@ describe("ngIf scenario", () => { it("should toggle on second view", async () => { await secondButton.click(); - let conditional = await driver.findElementByText("second", SearchOptions.exact); + let conditional = await driver.findElementByAutomationText("second"); await isAbove(firstLabel, conditional); await isAbove(conditional, secondLabel); }); @@ -309,7 +345,7 @@ describe("ngIf scenario", () => { (async () => { await secondButton.click(); - driver.findElementByText("first", SearchOptions.exact, 500) + driver.findElementByAutomationText("first", 500) .then(_ => { throw new Error("first label found!"); }) .catch(() => done()); })(); @@ -319,8 +355,8 @@ describe("ngIf scenario", () => { await firstButton.click(); await secondButton.click(); - let conditional1 = await driver.findElementByText("first", SearchOptions.exact); - let conditional2 = await driver.findElementByText("second", SearchOptions.exact); + let conditional1 = await driver.findElementByAutomationText("first"); + let conditional2 = await driver.findElementByAutomationText("second"); await isAbove(firstLabel, conditional1); await isAbove(conditional1, conditional2); await isAbove(conditional2, secondLabel); @@ -331,10 +367,10 @@ describe("ngIf scenario", () => { await firstButton.click(); await secondButton.click(); - driver.findElementByText("first", SearchOptions.exact, 500) + driver.findElementByAutomationText("first", 500) .then(_ => { throw new Error("first label found!"); }) .catch(() => { - driver.findElementByText("second", SearchOptions.exact, 500) + driver.findElementByAutomationText("second", 500) .then(_ => { throw new Error("second label found!"); }) .catch(() => done()); }); @@ -345,8 +381,8 @@ describe("ngIf scenario", () => { await secondButton.click(); await firstButton.click(); - let conditional1 = await driver.findElementByText("first", SearchOptions.exact); - let conditional2 = await driver.findElementByText("second", SearchOptions.exact); + let conditional1 = await driver.findElementByAutomationText("first"); + let conditional2 = await driver.findElementByAutomationText("second"); await isAbove(firstLabel, conditional1); await isAbove(conditional1, conditional2); await isAbove(conditional2, secondLabel); @@ -357,10 +393,10 @@ describe("ngIf scenario", () => { await secondButton.click(); await firstButton.click(); - driver.findElementByText("first", SearchOptions.exact, 500) + driver.findElementByAutomationText("first", 500) .then(_ => { throw new Error("first label found!"); }) .catch(() => { - driver.findElementByText("second", SearchOptions.exact, 500) + driver.findElementByAutomationText("second", 500) .then(_ => { throw new Error("second label found!"); }) .catch(() => done()); }); diff --git a/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts b/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts index 2553cd67b..8746c5707 100644 --- a/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts +++ b/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts @@ -15,12 +15,18 @@ describe("page-router-outlet-scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("ActionBarVisibility Always", SearchOptions.exact); + await driver.findElementByAutomationText("ActionBarVisibility Always"); await navigationButton.click(); - await driver.findElementByText("ShowActionBar", SearchOptions.exact); + await driver.findElementByAutomationText("ShowActionBar"); }); it("should not hide action bar by default", async () => { @@ -29,7 +35,7 @@ describe("page-router-outlet-scenario", () => { }); it("should not hide action bar when hidden by page", async () => { - const hideActionBarButton = await driver.findElementByText("HideActionBar"); + const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar"); hideActionBarButton.click(); const screenMatches = await driver.compareScreen("actionBarVisibility-always-hidden", 5); @@ -37,7 +43,7 @@ describe("page-router-outlet-scenario", () => { }); it("should not do anything when shown action bar by page", async () => { - const showActionBarButton = await driver.findElementByText("ShowActionBar"); + const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar"); showActionBarButton.click(); const screenMatches = await driver.compareScreen("actionBarVisibility-always-shown", 5); @@ -51,12 +57,18 @@ describe("page-router-outlet-scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("ActionBarVisibility Never", SearchOptions.exact); + await driver.findElementByAutomationText("ActionBarVisibility Never"); await navigationButton.click(); - await driver.findElementByText("ShowActionBar", SearchOptions.exact); + await driver.findElementByAutomationText("ShowActionBar"); }); it("should hide action bar by default", async () => { @@ -65,7 +77,7 @@ describe("page-router-outlet-scenario", () => { }); it("should not show action bar when shown by page", async () => { - const showActionBarButton = await driver.findElementByText("ShowActionBar"); + const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar"); showActionBarButton.click(); const screenMatches = await driver.compareScreen("actionBarVisibility-never-shown", 5); @@ -73,7 +85,7 @@ describe("page-router-outlet-scenario", () => { }); it("should not do anything when hidden action bar by page", async () => { - const hideActionBarButton = await driver.findElementByText("HideActionBar"); + const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar"); hideActionBarButton.click(); const screenMatches = await driver.compareScreen("actionBarVisibility-never-hidden", 5); @@ -87,12 +99,18 @@ describe("page-router-outlet-scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("ActionBarVisibility Auto", SearchOptions.exact); + await driver.findElementByAutomationText("ActionBarVisibility Auto"); await navigationButton.click(); - await driver.findElementByText("ShowActionBar", SearchOptions.exact); + await driver.findElementByAutomationText("ShowActionBar"); }); it("should show action bar by default", async () => { @@ -101,7 +119,7 @@ describe("page-router-outlet-scenario", () => { }); it("should hide action bar when hidden by page", async () => { - const hideActionBarButton = await driver.findElementByText("HideActionBar"); + const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar"); hideActionBarButton.click(); const screenMatches = await driver.compareScreen("actionBarVisibility-auto-hidden", 5); @@ -109,7 +127,7 @@ describe("page-router-outlet-scenario", () => { }); it("should show action bar when shown by page", async () => { - const showActionBarButton = await driver.findElementByText("ShowActionBar"); + const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar"); showActionBarButton.click(); const screenMatches = await driver.compareScreen("actionBarVisibility-auto-shown", 5); diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-default.png new file mode 100644 index 000000000..af6e05907 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..af6e05907 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..af6e05907 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..22ffb753d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..1820d9968 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..22ffb753d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-default.png new file mode 100644 index 000000000..5e169fead Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..77157b59b Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..77157b59b Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api19-Default/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-default.png new file mode 100644 index 000000000..9cd345ecc Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..9cd345ecc Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..e017d9953 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..edf61335c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..edf61335c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..445b7c3ed Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-default.png new file mode 100644 index 000000000..a2518a90d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..3e918bcfe Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..a2518a90d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api21-Default/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-default.png new file mode 100644 index 000000000..9cd345ecc Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..9cd345ecc Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..e017d9953 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..edf61335c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..edf61335c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..445b7c3ed Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-default.png new file mode 100644 index 000000000..a2518a90d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..3e918bcfe Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..a2518a90d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api22-Default/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-default.png new file mode 100644 index 000000000..782f0f32c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..782f0f32c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..1608b2c8b Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..e7a1e22ab Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..e7a1e22ab Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..9aace1b2f Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-default.png new file mode 100644 index 000000000..8fd59b248 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..b8581a8bf Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..8fd59b248 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api24-Default/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-default.png new file mode 100644 index 000000000..6a817111d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..6a817111d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..cbbde7786 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..313a64685 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..313a64685 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..71f266277 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-default.png new file mode 100644 index 000000000..def293798 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..79ad4bb71 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..def293798 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api25-Google/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-default.png new file mode 100644 index 000000000..f056bfa0d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..f056bfa0d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..015a4398b Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..938b019c9 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..938b019c9 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..b47cb9e45 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-default.png new file mode 100644 index 000000000..69c7c667c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..3f2ee27fd Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..69c7c667c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api26-Google/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-default.png new file mode 100644 index 000000000..1ddb743a1 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..1ddb743a1 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..87ca98260 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..ebea2dea8 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..ebea2dea8 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..7414e39c4 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-default.png new file mode 100644 index 000000000..203e68d79 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..738e9dccc Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..cd58d6bbe Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api27-Google/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-default.png new file mode 100644 index 000000000..bc0d1a05f Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..bc0d1a05f Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..bc0d1a05f Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..35f7b558f Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..35f7b558f Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..e9d1bf64a Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-default.png new file mode 100644 index 000000000..3559eb226 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..1af63885d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..3559eb226 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-first-tab.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-first-tab.png new file mode 100644 index 000000000..485cdec79 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-first-tab.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-second-tab.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-second-tab.png new file mode 100644 index 000000000..a5738294d Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-second-tab.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-third-tab.png b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-third-tab.png new file mode 100644 index 000000000..c5f16603a Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/Emulator-Api28-Google/tab-view-binding-third-tab.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-default_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-default.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-default_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-default.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-hidden_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-hidden.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-hidden_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-hidden.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-shown_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-shown.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-shown_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-always-shown.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-default_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-default.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-default_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-default.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-hidden_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-hidden.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-hidden_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-hidden.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-shown_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-shown.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-shown_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-auto-shown.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-default.png new file mode 100644 index 000000000..99ebc13a7 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..a9efd56f9 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-shown_actual.png b/e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-shown.png similarity index 100% rename from e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-shown_actual.png rename to e2e/renderer/e2e/resources/images/renderer/iPhone X 110/actionBarVisibility-never-shown.png diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-default.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-default.png new file mode 100644 index 000000000..fc09b4860 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-hidden.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-hidden.png new file mode 100644 index 000000000..d68c4ec93 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-shown.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-shown.png new file mode 100644 index 000000000..d68c4ec93 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-always-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-default.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-default.png new file mode 100644 index 000000000..e43126a22 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-hidden.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-hidden.png new file mode 100644 index 000000000..4af0cf3d8 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-shown.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-shown.png new file mode 100644 index 000000000..2b50a8104 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-auto-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-default.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-default.png new file mode 100644 index 000000000..de5e9bd34 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-default.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-hidden.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-hidden.png new file mode 100644 index 000000000..653bf602c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-hidden.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-shown.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-shown.png new file mode 100644 index 000000000..653bf602c Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/actionBarVisibility-never-shown.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-first-tab.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-first-tab.png new file mode 100644 index 000000000..090808fcd Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-first-tab.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-second-tab.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-second-tab.png new file mode 100644 index 000000000..aac9eda44 Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-second-tab.png differ diff --git a/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-third-tab.png b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-third-tab.png new file mode 100644 index 000000000..82796824e Binary files /dev/null and b/e2e/renderer/e2e/resources/images/renderer/iPhone XS 12/tab-view-binding-third-tab.png differ diff --git a/e2e/renderer/e2e/setup.ts b/e2e/renderer/e2e/setup.ts index 2d1daceda..d52e381d0 100644 --- a/e2e/renderer/e2e/setup.ts +++ b/e2e/renderer/e2e/setup.ts @@ -10,10 +10,4 @@ before("start server", async () => { after("stop server", async () => { await driver.quit(); await stopServer(); -}); - -afterEach(async function () { - if (this.currentTest.state === "failed") { - await driver.logTestArtifacts(this.currentTest.title); - } }); \ No newline at end of file diff --git a/e2e/renderer/e2e/tab-view.e2e-spec.ts b/e2e/renderer/e2e/tab-view.e2e-spec.ts index fd9ab15f0..f5415289f 100644 --- a/e2e/renderer/e2e/tab-view.e2e-spec.ts +++ b/e2e/renderer/e2e/tab-view.e2e-spec.ts @@ -19,54 +19,60 @@ describe("TabView-scenario", () => { await driver.driver.resetApp(); }); + afterEach(async function () { + if (this.currentTest.state === "failed") { + await driver.logTestArtifacts(this.currentTest.title); + } + }); + it("should navigate to page", async () => { const navigationButton = - await driver.findElementByText("TabItem Binding", SearchOptions.exact); + await driver.findElementByAutomationText("TabItem Binding"); await navigationButton.click(); - await driver.findElementByText("Tab Item Binding", SearchOptions.exact); + await driver.findElementByAutomationText("Tab Item Binding"); }); it("should find elements", async () => { - await driver.findElementByText("First Tab"); + await driver.findElementByAutomationText("First Tab"); const notSelectedTabItems = await driver.findElementsByText("not selected"); - firstTabItem = await driver.findElementByText("SELECTED"); + firstTabItem = await driver.findElementByAutomationText("SELECTED"); secondTabItem = notSelectedTabItems[0]; thirdTabItem = notSelectedTabItems[1]; - const screenMatches = await driver.compareScreen("tab-view-binding-first-tab", 5); + const screenMatches = await driver.compareScreen("tab-view-binding-first-tab", 5); assert(screenMatches); }); it("should navigate to second tab item", async () => { await secondTabItem.click(); - await driver.findElementByText("Second Tab"); + await driver.findElementByAutomationText("Second Tab"); const notSelectedTabItems = await driver.findElementsByText("not selected"); firstTabItem = notSelectedTabItems[0]; - secondTabItem = await driver.findElementByText("SELECTED"); + secondTabItem = await driver.findElementByAutomationText("SELECTED"); thirdTabItem = notSelectedTabItems[1]; - const screenMatches = await driver.compareScreen("tab-view-binding-second-tab", 5); + const screenMatches = await driver.compareScreen("tab-view-binding-second-tab", 5); assert(screenMatches); }); it("should navigate to third tab item", async () => { await thirdTabItem.click(); - await driver.findElementByText("Third Tab"); + await driver.findElementByAutomationText("Third Tab"); const notSelectedTabItems = await driver.findElementsByText("not selected"); firstTabItem = notSelectedTabItems[0]; secondTabItem = notSelectedTabItems[1]; - thirdTabItem = await driver.findElementByText("SELECTED"); + thirdTabItem = await driver.findElementByAutomationText("SELECTED"); - const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5); + const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5); assert(screenMatches); }); }); diff --git a/e2e/renderer/package.json b/e2e/renderer/package.json index 4a83c5f87..f003dd9ef 100644 --- a/e2e/renderer/package.json +++ b/e2e/renderer/package.json @@ -7,23 +7,23 @@ "id": "org.nativescript.renderer" }, "dependencies": { - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "nativescript-angular": "file:../../nativescript-angular", "nativescript-intl": "^3.0.0", "reflect-metadata": "~0.1.8", - "rxjs": "~6.1.0", + "rxjs": "~6.3.3", "tns-core-modules": "next", "zone.js": "^0.8.4" }, "devDependencies": { - "@angular/compiler-cli": "~6.1.0", + "@angular/compiler-cli": "~7.0.0", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -41,8 +41,8 @@ "nativescript-dev-typescript": "~0.7.1", "nativescript-dev-webpack": "next", "tslib": "^1.7.1", - "typescript": "~2.7.2", - "@ngtools/webpack": "~6.1.0" + "typescript": "~3.1.1", + "@ngtools/webpack": "~7.0.0" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", diff --git a/e2e/router-tab-view/e2e/tab-view-navigation.e2e-spec.ts b/e2e/router-tab-view/e2e/tab-view-navigation.e2e-spec.ts index b52412004..b57be824d 100644 --- a/e2e/router-tab-view/e2e/tab-view-navigation.e2e-spec.ts +++ b/e2e/router-tab-view/e2e/tab-view-navigation.e2e-spec.ts @@ -20,13 +20,13 @@ describe("TabView with page-router-outlet in each tab", () => { }); it("should find any tabs by text", async () => { - await driver.findElementByText("Players", SearchOptions.exact); - await driver.findElementByText("Teams", SearchOptions.exact); - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Players"); + await driver.findElementByAutomationText("Teams"); + await driver.findElementByAutomationText("Player List"); }); it("should be able to switch between tabs", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); await selectTeamTab(driver); @@ -34,29 +34,29 @@ describe("TabView with page-router-outlet in each tab", () => { }); it("should go forward and go back on first(player) tab", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); await navigateToPlayerItem(driver, "Player One", "1"); await driver.navBack(); - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); }); it("should go forward and go back on second(team) tab", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); await selectTeamTab(driver); await navigateToTeamItem(driver, "Team Two", "2"); await driver.navBack(); - await driver.findElementByText("Team List", SearchOptions.exact); + await driver.findElementByAutomationText("Team List"); await selectPlayerTab(driver); }); it("should navigate first(player) tab, second(team) tab and back in the same order ", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); // Go forward in player tab await navigateToPlayerItem(driver, "Player Three", "3"); @@ -71,16 +71,16 @@ describe("TabView with page-router-outlet in each tab", () => { // Go back in team tab await driver.navBack(); - await driver.findElementByText("Team List", SearchOptions.exact); + await driver.findElementByAutomationText("Team List"); // Go back in player tab await selectPlayerTab(driver, false); await driver.navBack(); - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); }); it("should navigate second(team) tab, first(player) and back in the same order ", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); // Go forward in team tab await selectTeamTab(driver); @@ -96,18 +96,18 @@ describe("TabView with page-router-outlet in each tab", () => { // Go back in player tab await driver.navBack(); - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); // Go back in team tab await selectTeamTab(driver, false); await driver.navBack(); - await driver.findElementByText("Team List", SearchOptions.exact); + await driver.findElementByAutomationText("Team List"); await selectPlayerTab(driver); }); it("should navigate first(player) tab, second(team) tab and back in reverse order ", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); // Go forward in player tab await navigateToPlayerItem(driver, "Player Three", "3"); @@ -119,21 +119,21 @@ describe("TabView with page-router-outlet in each tab", () => { // Go back in player tab await selectPlayerTab(driver, false); await driver.navBack(); - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); // Go back in player tab await selectTeamTab(driver, false); - await driver.findElementByText("1", SearchOptions.exact); - await driver.findElementByText("Team One", SearchOptions.exact); + await driver.findElementByAutomationText("1"); + await driver.findElementByAutomationText("Team One"); await driver.navBack(); - await driver.findElementByText("Team List", SearchOptions.exact); + await driver.findElementByAutomationText("Team List"); await selectPlayerTab(driver); }); it("should navigate second(team) tab, first(player) tab and back in reverse order ", async () => { - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); // Go forward in team tab await selectTeamTab(driver); @@ -146,48 +146,48 @@ describe("TabView with page-router-outlet in each tab", () => { // Go back in team tab await selectTeamTab(driver, false); await driver.navBack(); - await driver.findElementByText("Team List", SearchOptions.exact); + await driver.findElementByAutomationText("Team List"); // Go back in player tab await selectPlayerTab(driver, false); - await driver.findElementByText("3", SearchOptions.exact); - await driver.findElementByText("Player Three", SearchOptions.exact); + await driver.findElementByAutomationText("3"); + await driver.findElementByAutomationText("Player Three"); await driver.navBack(); - await driver.findElementByText("Player List", SearchOptions.exact); + await driver.findElementByAutomationText("Player List"); }); }); async function navigateToTeamItem(driver: AppiumDriver, name: string, id: string) { - const team = await driver.findElementByText(name, SearchOptions.exact); + const team = await driver.findElementByAutomationText(name); await team.click(); - await driver.findElementByText("Team Details", SearchOptions.exact); - await driver.findElementByText(id, SearchOptions.exact); - await driver.findElementByText(name, SearchOptions.exact); + await driver.findElementByAutomationText("Team Details"); + await driver.findElementByAutomationText(id); + await driver.findElementByAutomationText(name); } async function navigateToPlayerItem(driver: AppiumDriver, name: string, id: string) { - let player = await driver.findElementByText(name, SearchOptions.exact); + let player = await driver.findElementByAutomationText(name); await player.click(); - await driver.findElementByText("Player Details", SearchOptions.exact); - await driver.findElementByText(id, SearchOptions.exact); - await driver.findElementByText(name, SearchOptions.exact); + await driver.findElementByAutomationText("Player Details"); + await driver.findElementByAutomationText(id); + await driver.findElementByAutomationText(name); } async function selectTeamTab(driver: AppiumDriver, expectList = true) { - const teamsTab = await driver.findElementByText("Teams", SearchOptions.exact); + const teamsTab = await driver.findElementByAutomationText("Teams"); await teamsTab.click(); const expectedTitle = expectList ? "Team List" : "Team Details"; - await driver.findElementByText(expectedTitle, SearchOptions.exact); + await driver.findElementByAutomationText(expectedTitle); } async function selectPlayerTab(driver: AppiumDriver, expectList = true) { - const playerTab = await driver.findElementByText("Players", SearchOptions.exact); + const playerTab = await driver.findElementByAutomationText("Players"); await playerTab.click(); const expectedTitle = expectList ? "Player List" : "Player Details"; - await driver.findElementByText(expectedTitle, SearchOptions.exact); + await driver.findElementByAutomationText(expectedTitle); } diff --git a/e2e/router-tab-view/package.json b/e2e/router-tab-view/package.json index 334eedea7..5dc6eac6c 100644 --- a/e2e/router-tab-view/package.json +++ b/e2e/router-tab-view/package.json @@ -13,15 +13,15 @@ } }, "dependencies": { - "@angular/animations": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/animations": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "nativescript-angular": "file:../../nativescript-angular", "nativescript-theme-core": "~1.0.4", "reflect-metadata": "~0.1.8", @@ -42,7 +42,7 @@ "mocha-multi": "~1.0.0", "nativescript-dev-appium": "next", "nativescript-dev-typescript": "~0.6.0", - "typescript": "~2.7.2" + "typescript": "~3.1.1" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", diff --git a/e2e/router/app/app.css b/e2e/router/app/app.css index 3890d9f3a..dc9ceffbf 100644 --- a/e2e/router/app/app.css +++ b/e2e/router/app/app.css @@ -4,7 +4,7 @@ } .nested-header { - font-size: 26; + font-size: 16; } .nested-outlet { @@ -14,4 +14,9 @@ Label { text-align: center; + font-size: 12; +} + +Button { + font-size: 12; } \ No newline at end of file diff --git a/e2e/router/app/first/first.component.ts b/e2e/router/app/first/first.component.ts index 9445103e9..acb962c63 100644 --- a/e2e/router/app/first/first.component.ts +++ b/e2e/router/app/first/first.component.ts @@ -11,13 +11,13 @@ import { Page } from "tns-core-modules/ui/page"; - - + + - - + + - + ` }) diff --git a/e2e/router/app/second/second.component.ts b/e2e/router/app/second/second.component.ts index 08347f286..be9baae96 100644 --- a/e2e/router/app/second/second.component.ts +++ b/e2e/router/app/second/second.component.ts @@ -17,7 +17,7 @@ import { map } from "rxjs/operators"; - + diff --git a/e2e/router/e2e/router.e2e-spec.ts b/e2e/router/e2e/router.e2e-spec.ts index 97de5f18a..147d9f948 100644 --- a/e2e/router/e2e/router.e2e-spec.ts +++ b/e2e/router/e2e/router.e2e-spec.ts @@ -50,7 +50,7 @@ describe("Navigate inside nested outlet", () => { }); it("should navigate to Second(1)/detail(1) and back", async () => { - const detailBtn = await driver.findElementByText("DETAIL 1", SearchOptions.exact); + const detailBtn = await driver.findElementByAutomationText("DETAIL 1"); detailBtn.click(); await assureSecondComponent(driver, 1) await assureNestedDetailComponent(driver, 1); @@ -61,7 +61,7 @@ describe("Navigate inside nested outlet", () => { }); it("should navigate to Second(1)/detail(2) and back", async () => { - const detailBtn = await driver.findElementByText("DETAIL 2", SearchOptions.exact); + const detailBtn = await driver.findElementByAutomationText("DETAIL 2"); detailBtn.click(); await assureSecondComponent(driver, 1) await assureNestedDetailComponent(driver, 2); @@ -98,7 +98,7 @@ describe("Navigate to same component with different param", () => { it("should navigate to Second(2)/master", async () => { const navigationButton = - await driver.findElementByText("GO TO NEXT SECOND", SearchOptions.exact); + await driver.findElementByAutomationText("GO TO NEXT SECOND"); navigationButton.click(); await assureSecondComponent(driver, 2) @@ -138,7 +138,7 @@ describe("Nested navigation + page navigation", () => { }); it("should navigate to Second(1)/detail(1)", async () => { - const detailBtn = await driver.findElementByText("DETAIL 1", SearchOptions.exact); + const detailBtn = await driver.findElementByAutomationText("DETAIL 1"); detailBtn.click(); await assureSecondComponent(driver, 1) @@ -147,7 +147,7 @@ describe("Nested navigation + page navigation", () => { it("should navigate to Second(2)/master", async () => { const navigationButton = - await driver.findElementByText("GO TO NEXT SECOND", SearchOptions.exact); + await driver.findElementByAutomationText("GO TO NEXT SECOND"); navigationButton.click(); await assureSecondComponent(driver, 2) @@ -155,7 +155,7 @@ describe("Nested navigation + page navigation", () => { }); it("should navigate to Second(2)/detail(2)", async () => { - const detailBtn = await driver.findElementByText("DETAIL 2", SearchOptions.exact); + const detailBtn = await driver.findElementByAutomationText("DETAIL 2"); detailBtn.click(); await assureSecondComponent(driver, 2) @@ -216,7 +216,7 @@ describe("Nested name navigation + page navigation", () => { it("should navigate to nested named Master Detail/1", async () => { const navigationButton = - await driver.findElementByText("DETAIL-NAMED 1", SearchOptions.exact); + await driver.findElementByAutomationText("DETAIL-NAMED 1"); navigationButton.click(); await assureNamedNestedDetailComponent(driver, 1); @@ -224,13 +224,13 @@ describe("Nested name navigation + page navigation", () => { it("should navigate back to Master and navigate to Detail/2", async () => { let navigationButton = - await driver.findElementByText("BACK-NESTED", SearchOptions.exact); + await driver.findElementByAutomationText("BACK-NESTED"); navigationButton.click(); await assureNamedNestedMasterComponent(driver); navigationButton = - await driver.findElementByText("DETAIL-NAMED 2", SearchOptions.exact); + await driver.findElementByAutomationText("DETAIL-NAMED 2"); navigationButton.click(); await assureNamedNestedDetailComponent(driver, 2); @@ -251,7 +251,7 @@ describe("Shouldn't be able to navigate back on startup", () => { it("shouldn't be able to go back", async () => { await goBack(driver); - await driver.findElementByText("canGoBack() - false", SearchOptions.exact); + await driver.findElementByAutomationText("canGoBack() - false"); }); }); @@ -282,7 +282,7 @@ describe("Shouldn't be able to navigate back after cleared history", () => { it("shouldn't be able to go back", async () => { await goBack(driver); - await driver.findElementByText("canGoBack() - false", SearchOptions.exact); + await driver.findElementByAutomationText("canGoBack() - false"); }); }); @@ -300,7 +300,7 @@ describe("Navigate to componentless route", () => { it("should navigate to ComponentlessSecond(100)/detail(200)", async () => { const navigationButton = - await driver.findElementByText("GO TO C-LESS SECOND", SearchOptions.exact); + await driver.findElementByAutomationText("GO TO C-LESS SECOND"); navigationButton.click(); await assureSecondComponent(driver, 100) @@ -407,49 +407,47 @@ describe("Navigate to componentless lazy module route", () => { }); async function assureFirstComponent(driver: AppiumDriver) { - await driver.findElementByText("FirstComponent", SearchOptions.exact); + await driver.findElementByAutomationText("FirstComponent"); } async function assureLazyComponent(driver: AppiumDriver) { - await driver.findElementByText("LazyComponent", SearchOptions.exact); + await driver.findElementByAutomationText("LazyComponent"); } async function assureComponentlessLazyComponent(driver: AppiumDriver) { - await driver.findElementByText("Lazy Componentless Route", SearchOptions.exact); + await driver.findElementByAutomationText("Lazy Componentless Route"); } async function assureNamedNestedMasterComponent(driver: AppiumDriver) { - await driver.findElementByText("NamedNestedMaster", SearchOptions.exact); + await driver.findElementByAutomationText("NamedNestedMaster"); } async function assureNamedNestedDetailComponent(driver: AppiumDriver, param: number) { - await driver.findElementByText("NamedNestedDetail", SearchOptions.exact); - await driver.findElementByText(`nested-named-param: ${param}`, SearchOptions.exact); + await driver.findElementByAutomationText("NamedNestedDetail"); + await driver.findElementByAutomationText(`nested-named-param: ${param}`); } async function assureSecondComponent(driver: AppiumDriver, param: number) { - await driver.findElementByText("SecondComponent", SearchOptions.exact); - await driver.findElementByText(`param: ${param}`, SearchOptions.exact); + await driver.findElementByAutomationText("SecondComponent"); + await driver.findElementByAutomationText(`param: ${param}`); } async function assureNestedMasterComponent(driver: AppiumDriver) { - await driver.findElementByText("NestedMaster", SearchOptions.exact); + await driver.findElementByAutomationText("NestedMaster"); } async function assureNestedDetailComponent(driver: AppiumDriver, param: number) { - await driver.findElementByText("NestedDetail", SearchOptions.exact); - await driver.findElementByText(`nested-param: ${param}`, SearchOptions.exact); + await driver.findElementByAutomationText("NestedDetail"); + await driver.findElementByAutomationText(`nested-param: ${param}`); } async function goBack(driver: AppiumDriver) { - const backButton = await driver.findElementByText("BACK", SearchOptions.exact); + const backButton = await driver.waitForElement("BACK"); await backButton.click(); - //await driver.navBack(); } async function findAndClick(driver: AppiumDriver, text: string) { - const navigationButton = - await driver.findElementByText(text, SearchOptions.exact); - navigationButton.click(); + const navigationButton = await driver.waitForElement(text); + await navigationButton.click(); } \ No newline at end of file diff --git a/e2e/router/e2e/tsconfig.json b/e2e/router/e2e/tsconfig.json index 18b6c4302..43e3b7ee3 100644 --- a/e2e/router/e2e/tsconfig.json +++ b/e2e/router/e2e/tsconfig.json @@ -5,6 +5,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "importHelpers": false, + "sourceMap": true, "types": [ "node", "mocha", diff --git a/e2e/router/package.json b/e2e/router/package.json index 323c7000d..3eefc28f8 100644 --- a/e2e/router/package.json +++ b/e2e/router/package.json @@ -7,25 +7,25 @@ "id": "org.nativescript.router" }, "dependencies": { - "@angular/animations": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/animations": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "nativescript-angular": "file:../../nativescript-angular", "nativescript-intl": "^3.0.0", "reflect-metadata": "~0.1.8", - "rxjs": "~6.1.0", + "rxjs": "~6.3.3", "tns-core-modules": "next", "zone.js": "^0.8.26" }, "devDependencies": { - "@ngtools/webpack": "~6.1.0", - "@angular/compiler-cli": "~6.1.0", + "@ngtools/webpack": "~7.0.0", + "@angular/compiler-cli": "~7.0.0", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -43,7 +43,7 @@ "nativescript-dev-typescript": "~0.4.0", "nativescript-dev-webpack": "next", "tslib": "^1.7.1", - "typescript": "~2.7.2" + "typescript": "~3.1.1" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", diff --git a/e2e/router/tsconfig.json b/e2e/router/tsconfig.json index f89ae0f58..a4ddb2d04 100644 --- a/e2e/router/tsconfig.json +++ b/e2e/router/tsconfig.json @@ -16,6 +16,9 @@ "*": [ "./node_modules/tns-core-modules/*", "./node_modules/*" + ], + "~/*": [ + "app/*" ] } }, @@ -24,4 +27,4 @@ "platforms", "e2e" ] -} +} \ No newline at end of file diff --git a/e2e/single-page/e2e/tests.e2e-spec.ts b/e2e/single-page/e2e/tests.e2e-spec.ts index 275c216bf..54dc65bc1 100644 --- a/e2e/single-page/e2e/tests.e2e-spec.ts +++ b/e2e/single-page/e2e/tests.e2e-spec.ts @@ -1,8 +1,6 @@ import { AppiumDriver, - UIElement, createDriver, - SearchOptions, } from "nativescript-dev-appium"; describe("Single page app", () => { @@ -10,45 +8,40 @@ describe("Single page app", () => { before(async () => { driver = await createDriver(); - await driver.resetApp(); }); it("should load first page", async () => { - await driver.findElementByText("First Component", SearchOptions.exact); + await driver.findElementByAutomationText("First Component"); // ActionBar Title and item - await driver.findElementByText("First Title", SearchOptions.exact); - await driver.findElementByText("ACTION1", SearchOptions.exact); + await driver.findElementByAutomationText("First Title"); + await driver.findElementByAutomationText("ACTION1"); }); it("should load second(1) page", async () => { await findAndClick(driver, "SECOND(1)") - await driver.findElementByText("Second Component: 1", SearchOptions.exact); + await driver.findElementByAutomationText("Second Component: 1"); // ActionBar Title and item - await driver.findElementByText("Second Title", SearchOptions.exact); - await driver.findElementByText("ACTION2", SearchOptions.exact); + await driver.findElementByAutomationText("Second Title"); + await driver.findElementByAutomationText("ACTION2"); }); it("should load second(2) page", async () => { await findAndClick(driver, "SECOND(2)") - await driver.findElementByText("Second Component: 1", SearchOptions.exact); + await driver.findElementByAutomationText("Second Component: 1"); // ActionBar Title and items - await driver.findElementByText("Second Title", SearchOptions.exact); - await driver.findElementByText("ACTION2", SearchOptions.exact); - await driver.findElementByText("ADD", SearchOptions.exact); + await driver.findElementByAutomationText("Second Title"); + await driver.findElementByAutomationText("ACTION2"); + await driver.findElementByAutomationText("ADD"); }); }); -async function assureFirstComponent(driver: AppiumDriver) { - await driver.findElementByText("First Component", SearchOptions.exact); -} - async function findAndClick(driver: AppiumDriver, text: string) { const navigationButton = - await driver.findElementByText(text, SearchOptions.exact); + await driver.findElementByAutomationText(text); navigationButton.click(); } \ No newline at end of file diff --git a/e2e/single-page/package.json b/e2e/single-page/package.json index 0ac534b12..7d1c6d35f 100644 --- a/e2e/single-page/package.json +++ b/e2e/single-page/package.json @@ -13,15 +13,15 @@ } }, "dependencies": { - "@angular/animations": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/animations": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "nativescript-angular": "file:../../nativescript-angular", "nativescript-intl": "^3.0.0", "reflect-metadata": "~0.1.8", @@ -30,7 +30,7 @@ "zone.js": "^0.8.4" }, "devDependencies": { - "@angular/compiler-cli": "~6.1.0", + "@angular/compiler-cli": "~7.0.0", "@ngtools/webpack": "~6.2.0-beta.3", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", @@ -49,7 +49,7 @@ "nativescript-dev-typescript": "next", "nativescript-dev-webpack": "next", "tslib": "^1.7.1", - "typescript": "~2.7.2" + "typescript": "~3.1.1" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", diff --git a/nativescript-angular/bin/update-app-ng-deps b/nativescript-angular/bin/update-app-ng-deps index c73de3e66..f52904c52 100755 --- a/nativescript-angular/bin/update-app-ng-deps +++ b/nativescript-angular/bin/update-app-ng-deps @@ -31,9 +31,14 @@ function updateDeps(deps, devDeps, newDeps) { console.log(`Updated dependency ${dependencyName} to version: ${version}.`); }); + const ngDep = Object.keys(newDeps).find(dep => dep.startsWith("@angular")); + const version = newDeps[ngDep]; if (deps["@angular/animations"]) { - const ngDep = Object.keys(newDeps).find(dep => dep.startsWith("@angular")); - deps["@angular/animations"] = newDeps[ngDep]; + deps["@angular/animations"] = version; + } + + if (deps["@angular/compiler-cli"]) { + deps["@angular/compiler-cli"] = version; } } diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json index 6ab9bf6fe..4e730b888 100644 --- a/nativescript-angular/package.json +++ b/nativescript-angular/package.json @@ -1,6 +1,6 @@ { "name": "nativescript-angular", - "version": "6.2.0", + "version": "7.0.0", "description": "An Angular renderer that lets you build mobile apps with NativeScript.", "homepage": "https://www.nativescript.org/", "bugs": "https://github.com/NativeScript/nativescript-angular/issues", @@ -44,35 +44,35 @@ "reflect-metadata": "^0.1.8" }, "peerDependencies": { - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/router": "~6.1.0", - "rxjs": "^6.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/router": "~7.0.0", + "rxjs": "^6.3.3", "tns-core-modules": "^4.0.0 || >4.0.0- || >4.1.0-", "zone.js": "^0.8.26", - "typescript": "~2.7.2" + "typescript": "~3.1.1" }, "devDependencies": { - "@angular/animations": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/compiler-cli": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/animations": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/compiler-cli": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "codelyzer": "^4.3.0", - "rxjs": "~6.1.0", + "rxjs": "~6.3.3", "tns-core-modules": "next", "tslint": "^5.5.0", - "typescript": "~2.7.2", + "typescript": "~3.1.1", "zone.js": "^0.8.26" } } diff --git a/nativescript-angular/router/ns-location-strategy.ts b/nativescript-angular/router/ns-location-strategy.ts index 324a5b14b..91135ece7 100644 --- a/nativescript-angular/router/ns-location-strategy.ts +++ b/nativescript-angular/router/ns-location-strategy.ts @@ -527,6 +527,7 @@ export class NSLocationStrategy extends LocationStrategy { if (!lastState || !equalStateUrls) { outlet.states.push(locationState); + // Update last state segmentGroup of parent Outlet. if (this._modalNavigationDepth === 0 && !outlet.showingModal) { this.updateParentsStates(outlet, currentSegmentGroup.parent); } @@ -566,6 +567,11 @@ export class NSLocationStrategy extends LocationStrategy { newOutlet.parent = parent; this.outlets.push(newOutlet); + // Update last state segmentGroup of parent Outlet. + if (this._modalNavigationDepth === 0 && !newOutlet.showingModal) { + this.updateParentsStates(newOutlet, segmentGroup.parent); + } + return newOutlet; } diff --git a/nativescript-angular/router/page-router-outlet.ts b/nativescript-angular/router/page-router-outlet.ts index a2a3e818e..bb2d18c6a 100644 --- a/nativescript-angular/router/page-router-outlet.ts +++ b/nativescript-angular/router/page-router-outlet.ts @@ -203,7 +203,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire } deactivate(): void { - if (!this.outlet.isPageNavigationBack) { + if (!this.outlet || !this.outlet.isPageNavigationBack) { if (isLogEnabled()) { log("Currently not in page back navigation - component should be detached instead of deactivated."); } diff --git a/tests/package.json b/tests/package.json index 5baa66b2e..a84031955 100644 --- a/tests/package.json +++ b/tests/package.json @@ -26,15 +26,15 @@ ], "homepage": "http://nativescript.org", "dependencies": { - "@angular/animations": "~6.1.0", - "@angular/common": "~6.1.0", - "@angular/compiler": "~6.1.0", - "@angular/core": "~6.1.0", - "@angular/forms": "~6.1.0", - "@angular/http": "~6.1.0", - "@angular/platform-browser": "~6.1.0", - "@angular/platform-browser-dynamic": "~6.1.0", - "@angular/router": "~6.1.0", + "@angular/animations": "~7.0.0", + "@angular/common": "~7.0.0", + "@angular/compiler": "~7.0.0", + "@angular/core": "~7.0.0", + "@angular/forms": "~7.0.0", + "@angular/http": "~7.0.0", + "@angular/platform-browser": "~7.0.0", + "@angular/platform-browser-dynamic": "~7.0.0", + "@angular/router": "~7.0.0", "nativescript-angular": "../nativescript-angular", "nativescript-unit-test-runner": "^0.3.4", "rxjs": "~6.0.0-rc.1", @@ -57,7 +57,7 @@ "babylon": "6.8.0", "lazy": "1.0.11", "tslint": "^4.5.1", - "typescript": "~2.7.2" + "typescript": "~3.1.1" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../e2e/config/mocha.opts --recursive e2e --appiumCapsLocation ../e2e/config/appium.capabilities.json",