Skip to content

chore: merge release in master tests #1806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 6, 2019
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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## [7.2.4](https://github.com/NativeScript/nativescript-angular/compare/7.2.3...7.2.4) (2019-04-24)


### Bug Fixes

* **router:** routing services should be provided in forRoot only ([#1729](https://github.com/NativeScript/nativescript-angular/issues/1729)) ([0f6a975](https://github.com/NativeScript/nativescript-angular/commit/0f6a975))
* ngOnDestroy not called on Android back button ([#923](https://github.com/NativeScript/nativescript-angular/issues/923))


### Features

* **modal:** add ‘ios presentationStyle’ option to ModalDialogParams ([9cfa127](https://github.com/NativeScript/nativescript-angular/commit/9cfa127))



<a name="7.2.3"></a>
## [7.2.3](https://github.com/NativeScript/nativescript-angular/compare/7.2.2...7.2.3) (2019-03-14)

Expand Down
5 changes: 3 additions & 2 deletions e2e/config/mocha.opts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--timeout 60000
--recursive e2e
--reporter mocha-multi
--reporter-options spec=-,mocha-junit-reporter=test-results.xml
--reporter mochawesome
--reporter-options quiet=true,html=true,inline=true,autoOpen=true
--exit
1 change: 1 addition & 0 deletions e2e/modal-navigation-ng/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ app/**/*.js
e2e/**/*.js
e2e/reports
test-results.xml
mochawesome-report
33 changes: 18 additions & 15 deletions e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
import { Screen } from "./screens/screen"
import {
roots,
Expand All @@ -10,20 +10,23 @@ import {
testDialogBackground
} from "./screens/shared-screen"

describe("modal-frame:", () => {
describe("modal-frame:", async function () {

let driver: AppiumDriver;
let screen: Screen;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
driver = await createDriver();
screen = new Screen(driver);
});

roots.forEach(root => {
describe(`${root} modal frame background scenarios:`, () => {
for (let index = 0; index < roots.length; index++) {
const root = roots[index];
describe(`${root} modal frame background scenarios:`, async function () {

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
await screen[root]();
});

Expand All @@ -38,45 +41,45 @@ describe("modal-frame:", () => {
}
});

after(async () => {
after(async function () {
await screen.closeModal();
await screen.loadedHome();
});

it("should show dialog confirm, run in background", async () => {
it("should show dialog confirm, run in background", async function () {
await screen.loadModalFrame(true);
await testDialogBackground(driver, screen);
});

it("should run modal page with frame in background", async () => {
it("should run modal page with frame in background", async function () {
await screen.loadModalFrame(false);
await modalFrameBackground(driver, screen);
});

it("should navigate to second page, run in background, go back", async () => {
it("should navigate to second page, run in background, go back", async function () {
await screen.loadModalFrame(false);
await testSecondPageBackground(driver, screen);
});

it("should show nested modal page with frame, run in background, close", async () => {
it("should show nested modal page with frame, run in background, close", async function () {
await screen.loadModalFrame(false);
await testNestedModalFrameBackground(driver, screen);
});

it("should show nested modal page, run in background, close", async () => {
it("should show nested modal page, run in background, close", async function () {
await screen.loadModalFrame(false);
await testNestedModalPageBackground(driver, screen);
});

it("should navigate to second page, close", async () => {
it("should navigate to second page, close", async function () {
await screen.loadModalFrame(false);
await testSecondPageClose(driver, screen);
});

it("should navigate to second page, run in background, go back", async () => {
it("should navigate to second page, run in background, go back", async function () {
await screen.loadModalFrame(true);
await testSecondPageBackground(driver, screen);
});
});
});
};
});
25 changes: 13 additions & 12 deletions e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
import { Screen } from "./screens/screen"
import {
roots,
testNestedModalPageBackground,
testDialogBackground,
} from "./screens/shared-screen"

describe("modal-layout:", () => {

describe("modal-layout:", async function () {
let driver: AppiumDriver;
let screen: Screen;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
driver = await createDriver();
screen = new Screen(driver);
});

roots.forEach(root => {
describe(`${root} modal no frame background scenarios:`, () => {
before(async () => {
for (let index = 0; index < roots.length; index++) {
const root = roots[index];
describe(`${root} modal no frame background scenarios:`, async function () {
before(async function () {
nsCapabilities.testReporter.context = this;
await screen[root]();
});

Expand All @@ -30,21 +31,21 @@ describe("modal-layout:", () => {
}
});

after(async () => {
after(async function () {
await screen.closeModal();
await screen.loadedHome();
});

it("should show nested modal page, run in background, close", async () => {
it("should show nested modal page, run in background, close", async function () {
await screen.loadModalNoFrame(true);
await testNestedModalPageBackground(driver, screen, false);

});

it("should show dialog confirm inside modal view with no frame, run in background", async () => {
it("should show dialog confirm inside modal view with no frame, run in background", async function () {
await screen.loadModalNoFrame(false);
await testDialogBackground(driver, screen, false);
});
});
});
};
});
83 changes: 44 additions & 39 deletions e2e/modal-navigation-ng/e2e/modal-on-init.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
import { Screen, sharedModalView, homeComponent } from "./screens/screen";
import {
assertComponent,
Expand All @@ -12,143 +12,148 @@ const roots = [
"setNamedFrameRootViewModal",
];

describe("modal-on-init:", () => {
describe("modal-on-init:", async function () {
let driver: AppiumDriver;
let screen: Screen;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;

driver = await createDriver();
screen = new Screen(driver);
});

after("modal-on-init after all hook", async () => {
after("modal-on-init after all hook", async function () {
await driver.logTestArtifacts("modal-on-init");
});

roots.forEach(root => {
describe("Shared Modal on Init", () => {
before(async () => {
for (let index = 0; index < roots.length; index++) {
const root = roots[index];
describe("Shared Modal on Init", async function () {
before(async function () {
nsCapabilities.testReporter.context = this;
await screen[root]();
console.log(`Root: ${root}`);
});

beforeEach(async function() {});
beforeEach(async function () { });

afterEach(async function() {
afterEach(async function () {
if (this.currentTest.state === "failed") {
await driver.logTestArtifacts(this.currentTest.title);
await driver.resetApp();
await screen[root]();
}
});

after("root after all hook", async function() {
after("root after all hook", async function () {
await driver.logTestArtifacts(`${root}_root_after_all_hook`);
});

it("should shared modal view", async () => {
it("should shared modal view", async function () {
await assertComponent(driver, sharedModalView);
});

it("run in background", async () => {
it("run in background", async function () {
await driver.backgroundApp(1);
await assertComponent(driver, sharedModalView);
});

it("should close shared modal ", async () => {
it("should close shared modal ", async function () {
await screen.closeModal();
await screen.loadedHome();
});

it("should open/close shared modal", async () => {
it("should open/close shared modal", async function () {
await screen.loadSharedModal(true);
await screen.closeModal();
await screen.loadedHome();
});

it("should open/close shared modal again", async () => {
it("should open/close shared modal again", async function () {
await screen.loadSharedModal(true);
if (driver.isAndroid) {
await driver.navBack();
}else{
await screen.closeModal();
await driver.navBack();
} else {
await screen.closeModal();
}
await screen.loadedHome();
});

it("should open/close modal with frame", async () => {
it("should open/close modal with frame", async function () {
await screen.loadModalFrame(true);
await screen.closeModal();
});

it("should open/close shared modal again", async () => {
it("should open/close shared modal again", async function () {
await screen.loadSharedModal(true);
await screen.closeModal();
});

it("run in background again", async () => {
it("run in background again", async function () {
await driver.backgroundApp(1);
await screen.loadedHome();
});

it("should open/close shared modal second", async () => {
await screen.loadModalFrame(true);
await screen.closeModal();
it("should open/close shared modal second", async function () {
await screen.loadModalFrame(true);
await screen.closeModal();
});
});
});
};

describe("Shared Modal on Init", () => {
describe("Shared Modal on Init", async function () {
const root = "setLayoutRootViewModal";
before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
await screen[root]();
console.log(`Root: ${root}`);
});

beforeEach(async function() {});
beforeEach(async function () { });

afterEach(async function() {
afterEach(async function () {
if (this.currentTest.state === "failed") {
await driver.logTestArtifacts(this.currentTest.title);
await driver.resetApp();
await screen[root]();
}
});

after("root after all hook", async function() {
after("root after all hook", async function () {
await driver.logTestArtifacts(`${root}_root_after_all_hook`);
});

it("should shared modal view", async () => {
it("should shared modal view", async function () {
await assertComponent(driver, sharedModalView);
});

it("run in background", async () => {
it("run in background", async function () {
await driver.backgroundApp(1);
await assertComponent(driver, sharedModalView);
});

it("should close shared modal ", async () => {
it("should close shared modal ", async function () {
await screen.closeModal();
await screen.loadedHome();
});

it("should open/close shared modal", async () => {
it("should open/close shared modal", async function () {
await screen.loadModalFrame(true);
await screen.closeModal();
});

it("run in background again", async () => {
it("run in background again", async function () {
await driver.backgroundApp(1);
await screen.loadedHome();
});

it("should open/close shared modal second", async () => {
await screen.loadModalFrame(true);
await screen.closeModal();
it("should open/close shared modal second", async function () {
await screen.loadModalFrame(true);
await screen.closeModal();
});

it("should open/close shared modal", async () => {
it("should open/close shared modal", async function () {
await screen.loadSharedModal(true);
await screen.closeModal();
});
Expand Down
Loading