Skip to content

chore: set dev-appium version and sanitise tests #1980

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 1 commit into from
Sep 13, 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 e2e/animation-examples/e2e/smoke.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,30 @@ import { AnimationWithOptionsPage } from "./pages/animation-with-options-page";
import { AnimationsWithDefaultOptionsPage } from "./pages/animations-with-default-options-page";
import { AnimateChildPage } from "./pages/animate-child-page";
import { HeroPage } from "./pages/hero-page";
import { isSauceLab } from "nativescript-dev-appium/lib/parser";

const QUEUE_WAIT_TIME: number = 600000; // Sometimes SauceLabs threads are not available and the tests wait in a queue to start. Wait 10 min before timeout.
const isSauceRun = isSauceLab;

describe("smoke-tests", async function () {
let driver: AppiumDriver;

before(async function () {
this.timeout(QUEUE_WAIT_TIME);
nsCapabilities.testReporter.context = this;
driver = await createDriver();
});

after(async function () {
if (isSauceRun) {
driver.sessionId().then(function (sessionId) {
console.log("Report https://saucelabs.com/beta/tests/" + sessionId);
});
}
await driver.quit();
console.log("Quit driver!");
});

afterEach(async function () {
if (this.currentTest.state === "failed") {
await driver.logTestArtifacts(this.currentTest.title);
Expand Down
2 changes: 1 addition & 1 deletion e2e/animation-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "next",
"nativescript-dev-appium": "^6.0.0",
"nativescript-dev-webpack": "next",
"typescript": "~3.5.3"
},
Expand Down
22 changes: 17 additions & 5 deletions e2e/modal-navigation-ng/e2e/modal-frame.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium";
import { Screen } from "./screens/screen"
import { Screen } from "./screens/screen";
import {
roots,
modalFrameBackground,
Expand All @@ -8,19 +8,34 @@ import {
testNestedModalFrameBackground,
testNestedModalPageBackground,
testDialogBackground
} from "./screens/shared-screen"
} from "./screens/shared-screen";
import { isSauceLab } from "nativescript-dev-appium/lib/parser";

const QUEUE_WAIT_TIME: number = 600000; // Sometimes SauceLabs threads are not available and the tests wait in a queue to start. Wait 10 min before timeout.
const isSauceRun = isSauceLab;

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

let driver: AppiumDriver;
let screen: Screen;

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

after(async function () {
if (isSauceRun) {
driver.sessionId().then(function (sessionId) {
console.log("Report https://saucelabs.com/beta/tests/" + sessionId);
});
}
await driver.quit();
console.log("Quit driver!");
});

for (let index = 0; index < roots.length; index++) {
const root = roots[index];
describe(`${root} modal frame background scenarios:`, async function () {
Expand All @@ -30,9 +45,6 @@ describe("modal-frame:", async function () {
await screen[root]();
});

beforeEach(async function () {
});

afterEach(async function () {
if (this.currentTest.state === "failed") {
await driver.logTestArtifacts(this.currentTest.title);
Expand Down
18 changes: 17 additions & 1 deletion e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,33 @@ import {
roots,
testNestedModalPageBackground,
testDialogBackground,
} from "./screens/shared-screen"
} from "./screens/shared-screen";
import { isSauceLab } from "nativescript-dev-appium/lib/parser";

const QUEUE_WAIT_TIME: number = 600000; // Sometimes SauceLabs threads are not available and the tests wait in a queue to start. Wait 10 min before timeout.
const isSauceRun = isSauceLab;

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

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

after(async function () {
if (isSauceRun) {
driver.sessionId().then(function (sessionId) {
console.log("Report https://saucelabs.com/beta/tests/" + sessionId);
});
}
await driver.quit();
console.log("Quit driver!");
});

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