diff --git a/e2e/animation/.gitignore b/e2e/animation/.gitignore index c6f9a448e..bec5ea570 100644 --- a/e2e/animation/.gitignore +++ b/e2e/animation/.gitignore @@ -1 +1,2 @@ .vscode/settings.json +mochawesome-report \ No newline at end of file diff --git a/e2e/animation/e2e/animation.e2e-spec.ts b/e2e/animation/e2e/animation.e2e-spec.ts index 5177934a9..aa015c6d2 100644 --- a/e2e/animation/e2e/animation.e2e-spec.ts +++ b/e2e/animation/e2e/animation.e2e-spec.ts @@ -1,20 +1,21 @@ -import { AppiumDriver, createDriver, SearchOptions } from "nativescript-dev-appium"; +import { AppiumDriver, createDriver, SearchOptions, nsCapabilities } from "nativescript-dev-appium"; import { Screen } from "./screen"; import { assert } from "chai"; -describe("animation:", () => { +describe("animation:", async function () { let driver: AppiumDriver; let screen: Screen; - before(async () => { + before(async function () { + nsCapabilities.testReporter.context = this; driver = await createDriver(); screen = new Screen(driver); await driver.resetApp(); }); - after(async () => { + after(async function () { await driver.quit(); console.log("Quit driver!"); }); @@ -26,12 +27,12 @@ describe("animation:", () => { } }); - it("should navigate to chaining with animation set example", async () => { + it("should navigate to chaining with animation set example", async function () { await screen.loadedHome(); await screen.loadedChainingWithAnimationSet(); }); - it("should play animation sequentially", async () => { + it("should play animation sequentially", async function () { const buttonAnimate = await driver.findElementByText("Animate Sequentially", SearchOptions.exact); await buttonAnimate.click(); @@ -39,7 +40,7 @@ describe("animation:", () => { assert.isTrue(await label.isDisplayed()); }); - it ("should reset example", async() => { + it("should reset example", async () => { const buttonReset = await driver.findElementByText("Reset", SearchOptions.exact); await buttonReset.click(); @@ -47,7 +48,7 @@ describe("animation:", () => { assert.isTrue(await label.isDisplayed()); }); - it("should play animation simultaneously", async () => { + it("should play animation simultaneously", async function () { const button = await driver.findElementByText("Animate Simultaneously", SearchOptions.exact); await button.click(); diff --git a/e2e/animation/e2e/setup.ts b/e2e/animation/e2e/setup.ts index 43adfb09f..644287cbd 100644 --- a/e2e/animation/e2e/setup.ts +++ b/e2e/animation/e2e/setup.ts @@ -1,14 +1,22 @@ -import { AppiumDriver, createDriver, startServer, stopServer } from "nativescript-dev-appium"; +import { startServer, stopServer, ITestReporter, nsCapabilities, LogImageType, AppiumDriver, createDriver } from "nativescript-dev-appium"; +const addContext = require('mochawesome/addContext'); +const testReporterContext = {}; +testReporterContext.name = "mochawesome"; +testReporterContext.reportDir = "mochawesome-report"; +testReporterContext.log = addContext; +testReporterContext.logImageTypes = [LogImageType.screenshots]; +nsCapabilities.testReporter = testReporterContext; let driver: AppiumDriver; -before("start server", async () => { +before("start server", async function () { + nsCapabilities.testReporter.context = this; await startServer(); driver = await createDriver(); await driver.setDontKeepActivities(true); }); -after("stop server", async () => { +after("stop server", async function () { await driver.setDontKeepActivities(false); await driver.quit(); await stopServer(); diff --git a/e2e/animation/package.json b/e2e/animation/package.json index 8466e4a80..00c40a851 100644 --- a/e2e/animation/package.json +++ b/e2e/animation/package.json @@ -17,16 +17,15 @@ "tns-core-modules": "next" }, "devDependencies": { - "@types/chai": "~4.1.3", - "@types/mocha": "~5.2.1", - "@types/node": "10.11.4", + "@types/chai": "~4.1.7", + "@types/mocha": "~5.2.5", + "@types/node": "~10.12.18", "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", "lazy": "1.0.11", - "mocha": "~5.1.0", - "mocha-junit-reporter": "~1.17.0", - "mocha-multi": "~1.0.0", + "mocha": "~5.2.0", + "mochawesome": "~3.1.2", "nativescript-dev-appium": "next", "nativescript-dev-typescript": "next", "nativescript-dev-webpack": "next" diff --git a/e2e/modal-navigation/package.json b/e2e/modal-navigation/package.json index 20a572498..68db87859 100644 --- a/e2e/modal-navigation/package.json +++ b/e2e/modal-navigation/package.json @@ -9,7 +9,7 @@ "version": "next" }, "tns-android": { - "version": "5.4.0-2019-05-02-235338-05" + "version": "next" } }, "dependencies": { diff --git a/e2e/nested-frame-navigation/package.json b/e2e/nested-frame-navigation/package.json index 5e8435ca2..e9754a49e 100644 --- a/e2e/nested-frame-navigation/package.json +++ b/e2e/nested-frame-navigation/package.json @@ -9,7 +9,7 @@ "version": "next" }, "tns-android": { - "version": "5.4.0-2019-05-02-235338-05" + "version": "next" } }, "dependencies": {