Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions e2e/modal-navigation-ng/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ActionBar class="action-bar">
<Label class="action-bar-title" text="Home Component"></Label>
<Label class="action-bar-title" text="Home Component" automationText="Home Component" ></Label>
</ActionBar>

<WrapLayout>
Expand All @@ -9,7 +9,7 @@
<Button text="Reset Named Frame Root View" (tap)="onNamedFrameRootViewReset()"></Button>
<Button text="Reset Frame Root View" (tap)="onFrameRootViewReset()"></Button>
<Button text="Reset Tab Root View" (tap)="onTabRootViewReset()"></Button>
<Button text="Reset Layout Root View" (tap)="onLayoutRootViewReset()"></Button>
<Button text="Reset Layout Root View" automationText="Reset Layout Root View" (tap)="onLayoutRootViewReset()"></Button>
<Button text="Show Dialog" (tap)="onShowDialog()"></Button>

<Button text="show shared modal" (tap)="onRootModalTap()"></Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
</ActionBar>

<GridLayout #rootLayout rows="auto" (showingModally)="onShowingModally($event)" backgroundColor="lightBlue">
<Button text="Close Modal Nested" (tap)="close(rootLayout)"></Button>
<Button text="Close Modal Nested" automationText="Close Modal Nested" (tap)="close(rootLayout)"></Button>
</GridLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

<GridLayout #rootLayout rows="auto, auto" (loaded)="onLoaded($event)">
<Button text="Go Back(activatedRoute)" (tap)="goBack()"></Button>
<Button row="1" text="Close Modal" (tap)="close(rootLayout)"></Button>
<Button row="1" text="Close Modal" automationText="Close Modal" (tap)="close(rootLayout)"></Button>
</GridLayout>
2 changes: 1 addition & 1 deletion e2e/modal-navigation-ng/app/modal/modal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<Button text="Show Nested Modal Page With Frame" (tap)="showNestedModalFrame()" [visibility]="navigationVisibility"></Button>
<Button text="Show Nested Modal Page" (tap)="showNestedModal()"></Button>
<Button text="Show Dialog" (tap)="showDialogConfirm()"></Button>
<Button text="Close Modal" (tap)="close(rootLayout)"></Button>
<Button text="Close Modal" automationText="Close Modal" (tap)="close(rootLayout)"></Button>
</StackLayout>
</GridLayout>
8 changes: 7 additions & 1 deletion e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ describe("modal-frame:", () => {
});

beforeEach(async function () {
await screen.loadModalFrame();
});

afterEach(async function () {
Expand All @@ -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);
});
});
Expand Down
12 changes: 3 additions & 9 deletions e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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);
Expand All @@ -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);
});
});
Expand Down
8 changes: 1 addition & 7 deletions e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
});

Expand Down
Loading