Skip to content

Commit 4e32e89

Browse files
committed
Merge branch 'master' into fix/ns-views-not-cleaned-on-removal
2 parents 2a64e87 + e59f8d4 commit 4e32e89

38 files changed

+576
-465
lines changed

Diff for: CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## [7.2.4](https://github.com/NativeScript/nativescript-angular/compare/7.2.3...7.2.4) (2019-04-24)
2+
3+
4+
### Bug Fixes
5+
6+
* **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))
7+
* ngOnDestroy not called on Android back button ([#923](https://github.com/NativeScript/nativescript-angular/issues/923))
8+
9+
10+
### Features
11+
12+
* **modal:** add ‘ios presentationStyle’ option to ModalDialogParams ([9cfa127](https://github.com/NativeScript/nativescript-angular/commit/9cfa127))
13+
14+
15+
116
<a name="7.2.3"></a>
217
## [7.2.3](https://github.com/NativeScript/nativescript-angular/compare/7.2.2...7.2.3) (2019-03-14)
318

Diff for: e2e/config/mocha.opts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
--timeout 60000
22
--recursive e2e
3-
--reporter mocha-multi
4-
--reporter-options spec=-,mocha-junit-reporter=test-results.xml
3+
--reporter mochawesome
4+
--reporter-options quiet=true,html=true,inline=true,autoOpen=true
5+
--exit

Diff for: e2e/modal-navigation-ng/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ app/**/*.js
66
e2e/**/*.js
77
e2e/reports
88
test-results.xml
9+
mochawesome-report

Diff for: e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts

+18-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
1+
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
22
import { Screen } from "./screens/screen"
33
import {
44
roots,
@@ -10,20 +10,23 @@ import {
1010
testDialogBackground
1111
} from "./screens/shared-screen"
1212

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

1515
let driver: AppiumDriver;
1616
let screen: Screen;
1717

18-
before(async () => {
18+
before(async function () {
19+
nsCapabilities.testReporter.context = this;
1920
driver = await createDriver();
2021
screen = new Screen(driver);
2122
});
2223

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

26-
before(async () => {
28+
before(async function () {
29+
nsCapabilities.testReporter.context = this;
2730
await screen[root]();
2831
});
2932

@@ -38,45 +41,45 @@ describe("modal-frame:", () => {
3841
}
3942
});
4043

41-
after(async () => {
44+
after(async function () {
4245
await screen.closeModal();
4346
await screen.loadedHome();
4447
});
4548

46-
it("should show dialog confirm, run in background", async () => {
49+
it("should show dialog confirm, run in background", async function () {
4750
await screen.loadModalFrame(true);
4851
await testDialogBackground(driver, screen);
4952
});
5053

51-
it("should run modal page with frame in background", async () => {
54+
it("should run modal page with frame in background", async function () {
5255
await screen.loadModalFrame(false);
5356
await modalFrameBackground(driver, screen);
5457
});
5558

56-
it("should navigate to second page, run in background, go back", async () => {
59+
it("should navigate to second page, run in background, go back", async function () {
5760
await screen.loadModalFrame(false);
5861
await testSecondPageBackground(driver, screen);
5962
});
6063

61-
it("should show nested modal page with frame, run in background, close", async () => {
64+
it("should show nested modal page with frame, run in background, close", async function () {
6265
await screen.loadModalFrame(false);
6366
await testNestedModalFrameBackground(driver, screen);
6467
});
6568

66-
it("should show nested modal page, run in background, close", async () => {
69+
it("should show nested modal page, run in background, close", async function () {
6770
await screen.loadModalFrame(false);
6871
await testNestedModalPageBackground(driver, screen);
6972
});
7073

71-
it("should navigate to second page, close", async () => {
74+
it("should navigate to second page, close", async function () {
7275
await screen.loadModalFrame(false);
7376
await testSecondPageClose(driver, screen);
7477
});
7578

76-
it("should navigate to second page, run in background, go back", async () => {
79+
it("should navigate to second page, run in background, go back", async function () {
7780
await screen.loadModalFrame(true);
7881
await testSecondPageBackground(driver, screen);
7982
});
8083
});
81-
});
84+
};
8285
});

Diff for: e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
1+
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
22
import { Screen } from "./screens/screen"
33
import {
44
roots,
55
testNestedModalPageBackground,
66
testDialogBackground,
77
} from "./screens/shared-screen"
88

9-
describe("modal-layout:", () => {
10-
9+
describe("modal-layout:", async function () {
1110
let driver: AppiumDriver;
1211
let screen: Screen;
1312

14-
before(async () => {
13+
before(async function () {
14+
nsCapabilities.testReporter.context = this;
1515
driver = await createDriver();
1616
screen = new Screen(driver);
1717
});
18-
19-
roots.forEach(root => {
20-
describe(`${root} modal no frame background scenarios:`, () => {
21-
before(async () => {
18+
for (let index = 0; index < roots.length; index++) {
19+
const root = roots[index];
20+
describe(`${root} modal no frame background scenarios:`, async function () {
21+
before(async function () {
22+
nsCapabilities.testReporter.context = this;
2223
await screen[root]();
2324
});
2425

@@ -30,21 +31,21 @@ describe("modal-layout:", () => {
3031
}
3132
});
3233

33-
after(async () => {
34+
after(async function () {
3435
await screen.closeModal();
3536
await screen.loadedHome();
3637
});
3738

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

4243
});
4344

44-
it("should show dialog confirm inside modal view with no frame, run in background", async () => {
45+
it("should show dialog confirm inside modal view with no frame, run in background", async function () {
4546
await screen.loadModalNoFrame(false);
4647
await testDialogBackground(driver, screen, false);
4748
});
4849
});
49-
});
50+
};
5051
});

Diff for: e2e/modal-navigation-ng/e2e/modal-on-init.e2e-spec.ts

+44-39
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
1+
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
22
import { Screen, sharedModalView, homeComponent } from "./screens/screen";
33
import {
44
assertComponent,
@@ -12,143 +12,148 @@ const roots = [
1212
"setNamedFrameRootViewModal",
1313
];
1414

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

19-
before(async () => {
19+
before(async function () {
20+
nsCapabilities.testReporter.context = this;
21+
2022
driver = await createDriver();
2123
screen = new Screen(driver);
2224
});
2325

24-
after("modal-on-init after all hook", async () => {
26+
after("modal-on-init after all hook", async function () {
2527
await driver.logTestArtifacts("modal-on-init");
2628
});
2729

28-
roots.forEach(root => {
29-
describe("Shared Modal on Init", () => {
30-
before(async () => {
30+
for (let index = 0; index < roots.length; index++) {
31+
const root = roots[index];
32+
describe("Shared Modal on Init", async function () {
33+
before(async function () {
34+
nsCapabilities.testReporter.context = this;
3135
await screen[root]();
3236
console.log(`Root: ${root}`);
3337
});
3438

35-
beforeEach(async function() {});
39+
beforeEach(async function () { });
3640

37-
afterEach(async function() {
41+
afterEach(async function () {
3842
if (this.currentTest.state === "failed") {
3943
await driver.logTestArtifacts(this.currentTest.title);
4044
await driver.resetApp();
4145
await screen[root]();
4246
}
4347
});
4448

45-
after("root after all hook", async function() {
49+
after("root after all hook", async function () {
4650
await driver.logTestArtifacts(`${root}_root_after_all_hook`);
4751
});
4852

49-
it("should shared modal view", async () => {
53+
it("should shared modal view", async function () {
5054
await assertComponent(driver, sharedModalView);
5155
});
5256

53-
it("run in background", async () => {
57+
it("run in background", async function () {
5458
await driver.backgroundApp(1);
5559
await assertComponent(driver, sharedModalView);
5660
});
5761

58-
it("should close shared modal ", async () => {
62+
it("should close shared modal ", async function () {
5963
await screen.closeModal();
6064
await screen.loadedHome();
6165
});
6266

63-
it("should open/close shared modal", async () => {
67+
it("should open/close shared modal", async function () {
6468
await screen.loadSharedModal(true);
6569
await screen.closeModal();
6670
await screen.loadedHome();
6771
});
6872

69-
it("should open/close shared modal again", async () => {
73+
it("should open/close shared modal again", async function () {
7074
await screen.loadSharedModal(true);
7175
if (driver.isAndroid) {
72-
await driver.navBack();
73-
}else{
74-
await screen.closeModal();
76+
await driver.navBack();
77+
} else {
78+
await screen.closeModal();
7579
}
7680
await screen.loadedHome();
7781
});
7882

79-
it("should open/close modal with frame", async () => {
83+
it("should open/close modal with frame", async function () {
8084
await screen.loadModalFrame(true);
8185
await screen.closeModal();
8286
});
8387

84-
it("should open/close shared modal again", async () => {
88+
it("should open/close shared modal again", async function () {
8589
await screen.loadSharedModal(true);
8690
await screen.closeModal();
8791
});
8892

89-
it("run in background again", async () => {
93+
it("run in background again", async function () {
9094
await driver.backgroundApp(1);
9195
await screen.loadedHome();
9296
});
9397

94-
it("should open/close shared modal second", async () => {
95-
await screen.loadModalFrame(true);
96-
await screen.closeModal();
98+
it("should open/close shared modal second", async function () {
99+
await screen.loadModalFrame(true);
100+
await screen.closeModal();
97101
});
98102
});
99-
});
103+
};
100104

101-
describe("Shared Modal on Init", () => {
105+
describe("Shared Modal on Init", async function () {
102106
const root = "setLayoutRootViewModal";
103-
before(async () => {
107+
before(async function () {
108+
nsCapabilities.testReporter.context = this;
104109
await screen[root]();
105110
console.log(`Root: ${root}`);
106111
});
107112

108-
beforeEach(async function() {});
113+
beforeEach(async function () { });
109114

110-
afterEach(async function() {
115+
afterEach(async function () {
111116
if (this.currentTest.state === "failed") {
112117
await driver.logTestArtifacts(this.currentTest.title);
113118
await driver.resetApp();
114119
await screen[root]();
115120
}
116121
});
117122

118-
after("root after all hook", async function() {
123+
after("root after all hook", async function () {
119124
await driver.logTestArtifacts(`${root}_root_after_all_hook`);
120125
});
121126

122-
it("should shared modal view", async () => {
127+
it("should shared modal view", async function () {
123128
await assertComponent(driver, sharedModalView);
124129
});
125130

126-
it("run in background", async () => {
131+
it("run in background", async function () {
127132
await driver.backgroundApp(1);
128133
await assertComponent(driver, sharedModalView);
129134
});
130135

131-
it("should close shared modal ", async () => {
136+
it("should close shared modal ", async function () {
132137
await screen.closeModal();
133138
await screen.loadedHome();
134139
});
135140

136-
it("should open/close shared modal", async () => {
141+
it("should open/close shared modal", async function () {
137142
await screen.loadModalFrame(true);
138143
await screen.closeModal();
139144
});
140145

141-
it("run in background again", async () => {
146+
it("run in background again", async function () {
142147
await driver.backgroundApp(1);
143148
await screen.loadedHome();
144149
});
145150

146-
it("should open/close shared modal second", async () => {
147-
await screen.loadModalFrame(true);
148-
await screen.closeModal();
151+
it("should open/close shared modal second", async function () {
152+
await screen.loadModalFrame(true);
153+
await screen.closeModal();
149154
});
150155

151-
it("should open/close shared modal", async () => {
156+
it("should open/close shared modal", async function () {
152157
await screen.loadSharedModal(true);
153158
await screen.closeModal();
154159
});

0 commit comments

Comments
 (0)