FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge branch 'master' into myankov/android-icons · NativeScript/NativeScript@0a85a42 · GitHub

Commit 0a85a42

Browse files
Merge branch 'master' into myankov/android-icons
2 parents 89c96c8 + 5a5435a commit 0a85a42

4 files changed

Lines changed: 37 additions & 37 deletions

File tree

‎e2e/nested-frame-navigation/e2e/frame-root.e2e-spec.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { AppiumDriver, createDriver, logWarn } from "nativescript-dev-appium";
22

3-
import { Screen, playersData, home, somePage, teamsData, driverDefaultWaitTime, Item } from "./screen";
4-
import * as shared from "./shared.e2e-spec";
3+
import { Screen, playersData, teamsData, driverDefaultWaitTime, Item } from "./screen";
54
import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from "./config";
5+
import * as shared from "./shared.e2e-spec";
66

7-
describe("frame-root:", () => {
7+
const rootType = "frame-root";
8+
describe(rootType, () => {
89
let driver: AppiumDriver;
910
let screen: Screen;
1011

@@ -40,7 +41,7 @@ describe("frame-root:", () => {
4041
const teamOne: Item = teamsData[`teamOne${transition}`];
4142
const teamTwo: Item = teamsData[`teamTwo${transition}`];
4243

43-
describe(`transition: ${transition} scenarios:`, () => {
44+
describe(`${rootType}-transition-${transition}-scenarios:`, () => {
4445
before(async function () {
4546
logWarn(`==== Transition ${transition}`);
4647

‎e2e/nested-frame-navigation/e2e/frame-tab-root.e2e-spec.ts‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from "
77
// NOTE: TabTop is Android only scenario (for iOS we will essentially execute 2x TabBottom)
88
const roots = ["TabTop", "TabBottom"];
99

10-
function hyphenate(s: string) {
11-
return s.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase();
12-
}
13-
14-
describe("frame-tab-root:", () => {
10+
const rootType = "frame-tab-root";
11+
describe(rootType, () => {
1512
let driver: AppiumDriver;
1613
let screen: Screen;
1714

1815
before(async () => {
19-
logWarn("====== frame-tab-root ========")
16+
logWarn(`====== ${rootType} ========`);
2017
driver = await createDriver();
2118
screen = new Screen(driver);
2219
if (dontKeepActivities) {
@@ -42,9 +39,8 @@ describe("frame-tab-root:", () => {
4239

4340
for (let index = 0; index < roots.length; index++) {
4441
const root = roots[index];
45-
const rootWithHyphen = hyphenate(root);
4642

47-
describe(`${rootWithHyphen} scenarios:`, () => {
43+
describe(`${rootType}-${root} scenarios:`, () => {
4844
logWarn(`===== Root: ${root}`);
4945
for (let trIndex = 0; trIndex < transitions.length; trIndex++) {
5046
const transition = transitions[trIndex];
@@ -53,7 +49,7 @@ describe("frame-tab-root:", () => {
5349
const teamOne: Item = teamsData[`teamOne${transition}`];
5450
const teamTwo: Item = teamsData[`teamTwo${transition}`];
5551

56-
describe(`transition: ${transition} scenarios:`, () => {
52+
describe(`${rootType}-${root}-transition-${transition}-scenarios:`, () => {
5753

5854
before(async function () {
5955
logWarn(`========= ${root}-${transition} =========`);
@@ -70,7 +66,7 @@ describe("frame-tab-root:", () => {
7066
await screen.loadedHome();
7167
});
7268

73-
it(`loaded frame ${rootWithHyphen} root with nested frames`, async () => {
69+
it(`loaded frame ${root} root with nested frames`, async () => {
7470
await screen[`navigateToPage${root}WithFrames`]();
7571
await screen[`loadedPage${root}WithFrames`]();
7672
});

‎e2e/nested-frame-navigation/e2e/layout-root.e2e-spec.ts‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
1+
import { AppiumDriver, createDriver, logWarn } from "nativescript-dev-appium";
22

33
import { Screen, playersData, home, somePage, otherPage, teamsData, driverDefaultWaitTime } from "./screen";
44
import * as shared from "./shared.e2e-spec";
55
import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from "./config";
66

7-
describe("layout-root:", () => {
7+
const rootType = "layout-root";
8+
describe(rootType, () => {
89
let driver: AppiumDriver;
910
let screen: Screen;
1011

1112
before(async () => {
1213
driver = await createDriver();
1314
screen = new Screen(driver);
15+
logWarn("====== layout-root ========")
1416
if (dontKeepActivities) {
1517
await driver.setDontKeepActivities(true);
1618
}
@@ -32,12 +34,14 @@ describe("layout-root:", () => {
3234
}
3335
});
3436

35-
transitions.forEach(transition => {
37+
for (let index = 0; index < transitions.length; index++) {
38+
const transition = transitions[index];
39+
3640
const playerOne = playersData[`playerOne${transition}`];
3741
const playerTwo = playersData[`playerTwo${transition}`];
3842
const teamOne = teamsData[`teamOne${transition}`];
3943

40-
describe(`transition: ${transition} scenarios:`, () => {
44+
describe(`${rootType}-transition-${transition}-scenarios:`, () => {
4145

4246
before(async function () {
4347
if (transition === "Flip" &&
@@ -300,9 +304,9 @@ describe("layout-root:", () => {
300304
await screen.loadedHome();
301305
});
302306
});
303-
});
307+
};
304308

305-
describe("players list slide transition with parent frame default transition:", () => {
309+
describe(`${rootType}-players-list-slide-transition with parent frame default transition:`, () => {
306310
const playerOne = playersData["playerOneSlide"];
307311
const playerTwo = playersData["playerTwoSlide"];
308312

@@ -361,7 +365,7 @@ describe("layout-root:", () => {
361365
});
362366
});
363367

364-
describe("players list slide transition with parent frame no transition:", () => {
368+
describe(`${rootType}-players-list-slide-transition with parent frame no transition:`, () => {
365369
const playerOne = playersData["playerOneSlide"];
366370
const playerTwo = playersData["playerTwoSlide"];
367371

@@ -420,7 +424,7 @@ describe("layout-root:", () => {
420424
});
421425
});
422426

423-
describe("players list flip transition with parent frame default transition:", () => {
427+
describe(`${rootType}-players-list-flip-transition with parent frame default transition:`, () => {
424428
const playerOne = playersData["playerOneFlip"];
425429
const playerTwo = playersData["playerTwoFlip"];
426430

@@ -479,7 +483,7 @@ describe("layout-root:", () => {
479483
});
480484
});
481485

482-
describe("players list flip transition with parent frame no transition:", () => {
486+
describe(`${rootType}-players-list-flip-transition with parent frame no transition:`, () => {
483487
const playerOne = playersData["playerOneFlip"];
484488
const playerTwo = playersData["playerTwoFlip"];
485489

‎e2e/nested-frame-navigation/e2e/tab-root.e2e-spec.ts‎

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AppiumDriver, createDriver } from "nativescript-dev-appium";
1+
import { AppiumDriver, createDriver, logWarn } from "nativescript-dev-appium";
22

33
import { Screen, playersData, teamsData } from "./screen";
44
import * as shared from "./shared.e2e-spec";
@@ -7,15 +7,13 @@ import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from "
77
// NOTE: TabTop is Android only scenario (for iOS we will essentially execute 2x TabBottom)
88
const roots = ["TabTop", "TabBottom"];
99

10-
function hyphenate(s: string) {
11-
return s.replace(/([a-zA-Z])(?=[A-Z])/g, "$1-").toLowerCase();
12-
}
13-
14-
describe("tab-root:", () => {
10+
const rootType = "tab-root";
11+
describe(rootType, () => {
1512
let driver: AppiumDriver;
1613
let screen: Screen;
1714

1815
before(async () => {
16+
logWarn(`====== ${rootType} ========`)
1917
driver = await createDriver();
2018
screen = new Screen(driver);
2119
if (dontKeepActivities) {
@@ -39,18 +37,19 @@ describe("tab-root:", () => {
3937
}
4038
});
4139

42-
roots.forEach(root => {
43-
const rootWithHyphen = hyphenate(root);
40+
for (let index = 0; index < roots.length; index++) {
41+
const root = roots[index];
42+
describe(`${rootType}-${root}-scenarios:`, () => {
4443

45-
describe(`${rootWithHyphen} scenarios:`, () => {
44+
for (let index = 0; index < transitions.length; index++) {
45+
const transition = transitions[index];
4646

47-
transitions.forEach(transition => {
4847
const playerOne = playersData[`playerOne${transition}`];
4948
const playerTwo = playersData[`playerTwo${transition}`];
5049
const teamOne = teamsData[`teamOne${transition}`];
5150
const teamTwo = teamsData[`teamTwo${transition}`];
5251

53-
describe(`transition: ${transition} scenarios:`, () => {
52+
describe(`${rootType}-${root}-transition-${transition}-scenarios:`, () => {
5453

5554
before(async function () {
5655
if (transition === "Flip" &&
@@ -65,7 +64,7 @@ describe("tab-root:", () => {
6564
await screen.loadedHome();
6665
});
6766

68-
it(`loaded ${rootWithHyphen} root with frames`, async () => {
67+
it(`loaded ${root} root with frames`, async () => {
6968
await screen[`navigateTo${root}RootWithFrames`]();
7069
await screen[`loaded${root}RootWithFrames`]();
7170
});
@@ -169,7 +168,7 @@ describe("tab-root:", () => {
169168
await screen.loadedHome();
170169
});
171170
});
172-
});
171+
};
173172
});
174-
});
173+
}
175174
});

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL