| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,11 @@ | |||
| 1 | 1 | import { AppiumDriver, createDriver, logWarn } from "nativescript-dev-appium"; | |
| 2 | 2 | ||
| 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"; | ||
| 5 | 4 | import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from "./config"; | |
| 5 | + import * as shared from "./shared.e2e-spec"; | ||
| 6 | 6 | ||
| 7 | - describe("frame-root:", () => { | ||
| 7 | + const rootType = "frame-root"; | ||
| 8 | + describe(rootType, () => { | ||
| 8 | 9 | let driver: AppiumDriver; | |
| 9 | 10 | let screen: Screen; | |
| 10 | 11 | ||
@@ -40,7 +41,7 @@ describe("frame-root:", () => { | |||
| 40 | 41 | const teamOne: Item = teamsData[`teamOne${transition}`]; | |
| 41 | 42 | const teamTwo: Item = teamsData[`teamTwo${transition}`]; | |
| 42 | 43 | ||
| 43 | - describe(`transition: ${transition} scenarios:`, () => { | ||
| 44 | + describe(`${rootType}-transition-${transition}-scenarios:`, () => { | ||
| 44 | 45 | before(async function () { | |
| 45 | 46 | logWarn(`==== Transition ${transition}`); | |
| 46 | 47 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,16 +7,13 @@ import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from " | |||
| 7 | 7 | // NOTE: TabTop is Android only scenario (for iOS we will essentially execute 2x TabBottom) | |
| 8 | 8 | const roots = ["TabTop", "TabBottom"]; | |
| 9 | 9 | ||
| 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, () => { | ||
| 15 | 12 | let driver: AppiumDriver; | |
| 16 | 13 | let screen: Screen; | |
| 17 | 14 | ||
| 18 | 15 | before(async () => { | |
| 19 | - logWarn("====== frame-tab-root ========") | ||
| 16 | + logWarn(`====== ${rootType} ========`); | ||
| 20 | 17 | driver = await createDriver(); | |
| 21 | 18 | screen = new Screen(driver); | |
| 22 | 19 | if (dontKeepActivities) { | |
@@ -42,9 +39,8 @@ describe("frame-tab-root:", () => { | |||
| 42 | 39 | ||
| 43 | 40 | for (let index = 0; index < roots.length; index++) { | |
| 44 | 41 | const root = roots[index]; | |
| 45 | - const rootWithHyphen = hyphenate(root); | ||
| 46 | 42 | ||
| 47 | - describe(`${rootWithHyphen} scenarios:`, () => { | ||
| 43 | + describe(`${rootType}-${root} scenarios:`, () => { | ||
| 48 | 44 | logWarn(`===== Root: ${root}`); | |
| 49 | 45 | for (let trIndex = 0; trIndex < transitions.length; trIndex++) { | |
| 50 | 46 | const transition = transitions[trIndex]; | |
@@ -53,7 +49,7 @@ describe("frame-tab-root:", () => { | |||
| 53 | 49 | const teamOne: Item = teamsData[`teamOne${transition}`]; | |
| 54 | 50 | const teamTwo: Item = teamsData[`teamTwo${transition}`]; | |
| 55 | 51 | ||
| 56 | - describe(`transition: ${transition} scenarios:`, () => { | ||
| 52 | + describe(`${rootType}-${root}-transition-${transition}-scenarios:`, () => { | ||
| 57 | 53 | ||
| 58 | 54 | before(async function () { | |
| 59 | 55 | logWarn(`========= ${root}-${transition} =========`); | |
@@ -70,7 +66,7 @@ describe("frame-tab-root:", () => { | |||
| 70 | 66 | await screen.loadedHome(); | |
| 71 | 67 | }); | |
| 72 | 68 | ||
| 73 | - it(`loaded frame ${rootWithHyphen} root with nested frames`, async () => { | ||
| 69 | + it(`loaded frame ${root} root with nested frames`, async () => { | ||
| 74 | 70 | await screen[`navigateToPage${root}WithFrames`](); | |
| 75 | 71 | await screen[`loadedPage${root}WithFrames`](); | |
| 76 | 72 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,18 @@ | |||
| 1 | - import { AppiumDriver, createDriver } from "nativescript-dev-appium"; | ||
| 1 | + import { AppiumDriver, createDriver, logWarn } from "nativescript-dev-appium"; | ||
| 2 | 2 | ||
| 3 | 3 | import { Screen, playersData, home, somePage, otherPage, teamsData, driverDefaultWaitTime } from "./screen"; | |
| 4 | 4 | import * as shared from "./shared.e2e-spec"; | |
| 5 | 5 | import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from "./config"; | |
| 6 | 6 | ||
| 7 | - describe("layout-root:", () => { | ||
| 7 | + const rootType = "layout-root"; | ||
| 8 | + describe(rootType, () => { | ||
| 8 | 9 | let driver: AppiumDriver; | |
| 9 | 10 | let screen: Screen; | |
| 10 | 11 | ||
| 11 | 12 | before(async () => { | |
| 12 | 13 | driver = await createDriver(); | |
| 13 | 14 | screen = new Screen(driver); | |
| 15 | + logWarn("====== layout-root ========") | ||
| 14 | 16 | if (dontKeepActivities) { | |
| 15 | 17 | await driver.setDontKeepActivities(true); | |
| 16 | 18 | } | |
@@ -32,12 +34,14 @@ describe("layout-root:", () => { | |||
| 32 | 34 | } | |
| 33 | 35 | }); | |
| 34 | 36 | ||
| 35 | - transitions.forEach(transition => { | ||
| 37 | + for (let index = 0; index < transitions.length; index++) { | ||
| 38 | + const transition = transitions[index]; | ||
| 39 | + | ||
| 36 | 40 | const playerOne = playersData[`playerOne${transition}`]; | |
| 37 | 41 | const playerTwo = playersData[`playerTwo${transition}`]; | |
| 38 | 42 | const teamOne = teamsData[`teamOne${transition}`]; | |
| 39 | 43 | ||
| 40 | - describe(`transition: ${transition} scenarios:`, () => { | ||
| 44 | + describe(`${rootType}-transition-${transition}-scenarios:`, () => { | ||
| 41 | 45 | ||
| 42 | 46 | before(async function () { | |
| 43 | 47 | if (transition === "Flip" && | |
@@ -300,9 +304,9 @@ describe("layout-root:", () => { | |||
| 300 | 304 | await screen.loadedHome(); | |
| 301 | 305 | }); | |
| 302 | 306 | }); | |
| 303 | - }); | ||
| 307 | + }; | ||
| 304 | 308 | ||
| 305 | - describe("players list slide transition with parent frame default transition:", () => { | ||
| 309 | + describe(`${rootType}-players-list-slide-transition with parent frame default transition:`, () => { | ||
| 306 | 310 | const playerOne = playersData["playerOneSlide"]; | |
| 307 | 311 | const playerTwo = playersData["playerTwoSlide"]; | |
| 308 | 312 | ||
@@ -361,7 +365,7 @@ describe("layout-root:", () => { | |||
| 361 | 365 | }); | |
| 362 | 366 | }); | |
| 363 | 367 | ||
| 364 | - describe("players list slide transition with parent frame no transition:", () => { | ||
| 368 | + describe(`${rootType}-players-list-slide-transition with parent frame no transition:`, () => { | ||
| 365 | 369 | const playerOne = playersData["playerOneSlide"]; | |
| 366 | 370 | const playerTwo = playersData["playerTwoSlide"]; | |
| 367 | 371 | ||
@@ -420,7 +424,7 @@ describe("layout-root:", () => { | |||
| 420 | 424 | }); | |
| 421 | 425 | }); | |
| 422 | 426 | ||
| 423 | - describe("players list flip transition with parent frame default transition:", () => { | ||
| 427 | + describe(`${rootType}-players-list-flip-transition with parent frame default transition:`, () => { | ||
| 424 | 428 | const playerOne = playersData["playerOneFlip"]; | |
| 425 | 429 | const playerTwo = playersData["playerTwoFlip"]; | |
| 426 | 430 | ||
@@ -479,7 +483,7 @@ describe("layout-root:", () => { | |||
| 479 | 483 | }); | |
| 480 | 484 | }); | |
| 481 | 485 | ||
| 482 | - describe("players list flip transition with parent frame no transition:", () => { | ||
| 486 | + describe(`${rootType}-players-list-flip-transition with parent frame no transition:`, () => { | ||
| 483 | 487 | const playerOne = playersData["playerOneFlip"]; | |
| 484 | 488 | const playerTwo = playersData["playerTwoFlip"]; | |
| 485 | 489 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - import { AppiumDriver, createDriver } from "nativescript-dev-appium"; | ||
| 1 | + import { AppiumDriver, createDriver, logWarn } from "nativescript-dev-appium"; | ||
| 2 | 2 | ||
| 3 | 3 | import { Screen, playersData, teamsData } from "./screen"; | |
| 4 | 4 | import * as shared from "./shared.e2e-spec"; | |
@@ -7,15 +7,13 @@ import { suspendTime, appSuspendResume, dontKeepActivities, transitions } from " | |||
| 7 | 7 | // NOTE: TabTop is Android only scenario (for iOS we will essentially execute 2x TabBottom) | |
| 8 | 8 | const roots = ["TabTop", "TabBottom"]; | |
| 9 | 9 | ||
| 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, () => { | ||
| 15 | 12 | let driver: AppiumDriver; | |
| 16 | 13 | let screen: Screen; | |
| 17 | 14 | ||
| 18 | 15 | before(async () => { | |
| 16 | + logWarn(`====== ${rootType} ========`) | ||
| 19 | 17 | driver = await createDriver(); | |
| 20 | 18 | screen = new Screen(driver); | |
| 21 | 19 | if (dontKeepActivities) { | |
@@ -39,18 +37,19 @@ describe("tab-root:", () => { | |||
| 39 | 37 | } | |
| 40 | 38 | }); | |
| 41 | 39 | ||
| 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:`, () => { | ||
| 44 | 43 | ||
| 45 | - describe(`${rootWithHyphen} scenarios:`, () => { | ||
| 44 | + for (let index = 0; index < transitions.length; index++) { | ||
| 45 | + const transition = transitions[index]; | ||
| 46 | 46 | ||
| 47 | - transitions.forEach(transition => { | ||
| 48 | 47 | const playerOne = playersData[`playerOne${transition}`]; | |
| 49 | 48 | const playerTwo = playersData[`playerTwo${transition}`]; | |
| 50 | 49 | const teamOne = teamsData[`teamOne${transition}`]; | |
| 51 | 50 | const teamTwo = teamsData[`teamTwo${transition}`]; | |
| 52 | 51 | ||
| 53 | - describe(`transition: ${transition} scenarios:`, () => { | ||
| 52 | + describe(`${rootType}-${root}-transition-${transition}-scenarios:`, () => { | ||
| 54 | 53 | ||
| 55 | 54 | before(async function () { | |
| 56 | 55 | if (transition === "Flip" && | |
@@ -65,7 +64,7 @@ describe("tab-root:", () => { | |||
| 65 | 64 | await screen.loadedHome(); | |
| 66 | 65 | }); | |
| 67 | 66 | ||
| 68 | - it(`loaded ${rootWithHyphen} root with frames`, async () => { | ||
| 67 | + it(`loaded ${root} root with frames`, async () => { | ||
| 69 | 68 | await screen[`navigateTo${root}RootWithFrames`](); | |
| 70 | 69 | await screen[`loaded${root}RootWithFrames`](); | |
| 71 | 70 | }); | |
@@ -169,7 +168,7 @@ describe("tab-root:", () => { | |||
| 169 | 168 | await screen.loadedHome(); | |
| 170 | 169 | }); | |
| 171 | 170 | }); | |
| 172 | - }); | ||
| 171 | + }; | ||
| 173 | 172 | }); | |
| 174 | - }); | ||
| 173 | + } | ||
| 175 | 174 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments