Skip to content
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
3 changes: 0 additions & 3 deletions e2e/modal-navigation-ng/e2e/modal.shared.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ describe("modal-shared:", async function () {
await screen[root]();
});

beforeEach(async function () {
});

afterEach(async function () {
if (this.currentTest.state === "failed") {
await driver.logTestArtifacts(this.currentTest.title);
Expand Down
12 changes: 6 additions & 6 deletions e2e/nested-router-tab-view/e2e/tab-view.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ describe("tab-view:", 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(async () => {
after(async function () {
await driver.quit();
console.log("Quit driver!");
});
Expand All @@ -28,14 +28,14 @@ describe("tab-view:", async function () {
}
});

it("loaded home component and lists", async () => {
it("loaded home component and lists", async function () {
await screen.navigateToHomePage();
await screen.loadedHome();
await screen.loadedPlayersList();
await screen.loadedTeamList();
});

it("loaded tabs component, Players List and Teams List pages", async () => {
it("loaded tabs component, Players List and Teams List pages", async function () {
await screen.navigateToTabsPage();
await screen.loadedTabs();
await screen.loadedPlayersList();
Expand All @@ -45,7 +45,7 @@ describe("tab-view:", async function () {
await screen.loadedPlayersList();
});

it("should navigate Player One/Team One then back separately", async () => {
it("should navigate Player One/Team One then back separately", async function () {
await testPlayerNavigated(screen, screen.playerOne);
await gotoTeamsTab(driver);
await testTeamNavigated(screen, screen.teamOne);
Expand All @@ -56,7 +56,7 @@ describe("tab-view:", async function () {
await screen.loadedPlayersList();
});

it("should navigate Player One/Team One then next Player/Team then back", async () => {
it("should navigate Player One/Team One then next Player/Team then back", async function () {
await testPlayerNavigated(screen, screen.playerOne);
await testPlayerNextNavigated(screen, screen.playerTwo);
await gotoTeamsTab(driver);
Expand Down
18 changes: 9 additions & 9 deletions e2e/renderer/e2e/action-bar.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Action Bar scenario", async function () {
let toggleFirstButton: UIElement;
let toggleSecondButton: UIElement;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
driver = await createDriver();
await driver.driver.resetApp();
Expand Down Expand Up @@ -52,7 +52,7 @@ describe("Action Bar scenario", async function () {
});

it("should detach first element when its condition is false", done => {
(async () => {
(async function () {
await toggleFirst();

try {
Expand All @@ -69,7 +69,7 @@ describe("Action Bar scenario", async function () {
});

it("should detach second element when its condition is false", done => {
(async () => {
(async function () {
await toggleSecond();

try {
Expand All @@ -95,15 +95,15 @@ describe("Action Bar scenario", async function () {
await checkOrderIsCorrect();
});

const checkOrderIsCorrect = async () => {
const checkOrderIsCorrect = async function () {
await isOnTheLeft(firstActionItem, secondActionItem);
};

const toggleFirst = async () => {
const toggleFirst = async function () {
await toggleFirstButton.click();
};

const toggleSecond = async () => {
const toggleSecond = async function () {
await toggleSecondButton.click();
};

Expand All @@ -113,7 +113,7 @@ describe("Action Bar scenario", async function () {
let toggleButton: UIElement;
let conditional: UIElement;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
driver = await createDriver();
await driver.driver.resetApp();
Expand Down Expand Up @@ -147,11 +147,11 @@ describe("Action Bar scenario", async function () {
await checkOrderIsCorrect();
});

const checkOrderIsCorrect = async () => {
const checkOrderIsCorrect = async function () {
await isOnTheLeft(toggleButton, conditional);
};

const toggle = async () => {
const toggle = async function () {
await toggleButton.click();
};
});
Expand Down
8 changes: 4 additions & 4 deletions e2e/renderer/e2e/ngfor.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("ngFor scenario", async function () {
let elements: UIElement[] = [];
let lastAddedElementId = 0;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
driver = await createDriver();
await driver.driver.resetApp();
Expand Down Expand Up @@ -79,7 +79,7 @@ describe("ngFor scenario", async function () {
await checkCorrectOrderAll();
});

const addElement = async () => {
const addElement = async function () {
await addButton.click();

lastAddedElementId += 1;
Expand All @@ -103,7 +103,7 @@ describe("ngFor scenario", async function () {
lastAddedElementId -= 1;
};

const checkAppendedCorrectly = async () => {
const checkAppendedCorrectly = async function () {
const lastAdded = await driver.findElementByAutomationText(
lastAddedElementId.toString());

Expand All @@ -112,7 +112,7 @@ describe("ngFor scenario", async function () {
await isAbove(addButton, removeButton);
};

const checkCorrectOrderAll = async () => {
const checkCorrectOrderAll = async function () {
for (let i = 0; i < elements.length - 1; i += 1) {
await isAbove(elements[i], elements[i + 1]);
}
Expand Down
8 changes: 4 additions & 4 deletions e2e/renderer/e2e/ngforof.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("ngForOf scenario", function () {
let elements: ElementTuple[] = [];
let lastAddedElementId = 0;

before(async () => {
before(async function () {
nsCapabilities.testReporter.context = this;
driver = await createDriver();
await driver.driver.resetApp();
Expand Down Expand Up @@ -88,7 +88,7 @@ describe("ngForOf scenario", function () {
});


const addElement = async () => {
const addElement = async function () {
await addButton.click();

lastAddedElementId += 1;
Expand All @@ -114,15 +114,15 @@ describe("ngForOf scenario", function () {
lastAddedElementId -= 1;
};

const checkAppendedCorrectly = async () => {
const checkAppendedCorrectly = async function () {
const lastAdded = await getElement(lastAddedElementId);

await elementIsAbove(elements.slice(-2)[0], lastAdded);
await isAbove(lastAdded.button, addButton);
await isAbove(addButton, removeButton);
};

const checkCorrectOrderAll = async () => {
const checkCorrectOrderAll = async function () {
for (let i = 0; i < elements.length - 1; i += 1) {
await elementIsAbove(elements[i], elements[i + 1]);
}
Expand Down
6 changes: 3 additions & 3 deletions e2e/renderer/e2e/ngif.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { isAbove } from "./helpers/location";

import { assert } from "chai";

describe("ngIf scenario", () => {
describe("ngIf scenario", async function () {
let driver: AppiumDriver;
let toggleButton: UIElement;

Expand Down Expand Up @@ -376,7 +376,7 @@ describe("ngIf scenario", () => {

driver.findElementByAutomationText("first", 500)
.then(_ => { throw new Error("first label found!"); })
.catch(() => {
.catch(async function () {
driver.findElementByAutomationText("second", 500)
.then(_ => { throw new Error("second label found!"); })
.catch(() => done());
Expand All @@ -402,7 +402,7 @@ describe("ngIf scenario", () => {

driver.findElementByAutomationText("first", 500)
.then(_ => { throw new Error("first label found!"); })
.catch(() => {
.catch(async function () {
driver.findElementByAutomationText("second", 500)
.then(_ => { throw new Error("second label found!"); })
.catch(() => done());
Expand Down