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

Zbranzov/renderer-tests by zbranzov · Pull Request #1952 · NativeScript/nativescript-angular · GitHub

Zbranzov/renderer-tests by zbranzov · Pull Request #1952 · NativeScript/nativescript-angular · GitHub
Skip to content

Navigation Menu

Sign in
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (16) .opts  (1) .png  (55) .ts  (8) dotfile  (1) All 5 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,33 @@ export class AnimationWithOptionsPage extends BasePage {
async enterExample() {
const exampleBtn = await this._driver.findElementByAccessibilityId("options");
await exampleBtn.click();
this.initialPositionOfAnimatedBtn = await (await this.animatedBtn).location();
const animatedBtn = await this.animatedBtn();
this.initialPositionOfAnimatedBtn = await animatedBtn.location();
}

get btnToggleAnimation() {
return this._driver.findElementByAccessibilityId("toggleAnimation");
async btnToggleAnimation() {
return await this._driver.findElementByAccessibilityId("toggleAnimation");
}

get animatedBtn() {
this._driver.findElementsByAccessibilityId("animatedBtn", 10000);
return this._driver.findElementByAccessibilityIdIfExists("animatedBtn");
async animatedBtn() {
await this._driver.wait(2000);
const btn = await this._driver.findElementByAccessibilityIdIfExists("animatedBtn");
return btn;
}

async toggleAnimation() {
const btnTapToDisappear = await this.btnToggleAnimation;
const btnTapToDisappear = await this.btnToggleAnimation();
await btnTapToDisappear.click();
}

async waitElementToHide() {
return this.waitElementTo(() => this.animatedBtn, false, 10000);
await this._driver.wait(2000);
return await this._driver.findElementByAccessibilityIdIfExists("animatedBtn");
}

async assertPositionOfToggleAnimationBtn() {
this.waitElementTo(() => this.btnToggleAnimation, true, 5000);
const point: Point = await (await this.btnToggleAnimation).location();
await this.waitElementTo(() => this.btnToggleAnimation(), true, 5000);
const point: Point = await (await this.btnToggleAnimation()).location();
assert.isTrue(point.y === this.initialPositionOfAnimatedBtn.y);
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
2 changes: 1 addition & 1 deletion e2e/animation-examples/e2e/smoke.e2e-spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe("smoke-tests", async function () {
await animationWithOptionsPage.enterExample();
await animationWithOptionsPage.toggleAnimation();
const result = await animationWithOptionsPage.waitElementToHide();
assert.isFalse(result.isVisible, "The button should disappear!");
assert.isUndefined(result, "The button should disappear!");

await animationWithOptionsPage.assertPositionOfToggleAnimationBtn();
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/animation-examples/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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": "^5.3.0",
"nativescript-dev-appium": "next",
"nativescript-dev-webpack": "next",
"typescript": "~3.5.3"
},
Expand Down
7 changes: 7 additions & 0 deletions e2e/animation-examples/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
]
}
},
"include": [
"../../nativescript-angular",
"**/*"
],
"exclude": [
"../../nativescript-angular/node_modules",
"../../nativescript-angular/**/*.d.ts",
"node_modules",
"platforms",
"**/*.aot",
"e2e"
]
}
15 changes: 15 additions & 0 deletions e2e/config/appium.capabilities.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@
"noReset": false,
"fullReset": false
},
"android22.sauce": {
"platformName": "Android",
"platformVersion": "5.1",
"deviceName": "Android GoogleAPI Emulator",
"lt": 60000,
"newCommandTimeout": 720,
"appiumVersion": "1.13.0",
"noReset": true,
"fullReset": false,
"app": "",
"idleTimeout": 120,
"automationName": "Appium",
"density":3.2,
"offsetPixels":51
},
"android23": {
"platformName": "Android",
"platformVersion": "6.0",
Expand Down
4 changes: 2 additions & 2 deletions e2e/config/mocha.opts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--timeout 60000
--timeout 120000
--recursive e2e
--reporter mochawesome
--reporter-options quiet=true,html=true,inline=true,autoOpen=true
--reporter-options quiet=true,html=true,inline=true
--exit
2 changes: 1 addition & 1 deletion e2e/modal-navigation-ng/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"lazy": "1.0.11",
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "^5.3.0",
"nativescript-dev-appium": "next",
"nativescript-dev-webpack": "next",
"tns-platform-declarations": "next",
"typescript": "~3.5.3"
Expand Down
2 changes: 1 addition & 1 deletion e2e/nested-router-tab-view/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"lazy": "1.0.11",
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "^5.3.0",
"nativescript-dev-appium": "next",
"nativescript-dev-webpack": "next",
"typescript": "~3.5.3"
},
Expand Down
9 changes: 5 additions & 4 deletions e2e/renderer/.vscode/launch.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
"--timeout",
"999999",
"--colors",
"--reuseDevice",
"--runType",
"sim.iPhone7.iOS110",
"${workspaceRoot}/e2e"
"${workspaceRoot}/e2e",
"-a",
"--grep",
"actionBarVisibility 'auto' shows action bars based on page"

],
"internalConsoleOptions": "openOnSessionStart"
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/renderer/e2e/ngfor.e2e-spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("ngFor scenario", async function () {
});

it("should place new elements in the right places", async function () {
for (let i = 0; i < 5; i += 1) {
for (let i = 0; i < 3; i += 1) {
await addElement();
await checkAppendedCorrectly();
}
Expand All @@ -67,7 +67,7 @@ describe("ngFor scenario", async function () {
});

it("should render new elements correctly after all old ones are removed", async function () {
for (let i = 0; i < 5; i += 1) {
for (let i = 0; i < 3; i += 1) {
await addElement();
await checkCorrectOrderAll();
}
Expand Down
2 changes: 1 addition & 1 deletion e2e/renderer/e2e/ngforof.e2e-spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe("ngForOf scenario", function () {
});

it("should render new elements correctly after all old ones are removed", async function () {
for (let i = 0; i < 5; i += 1) {
for (let i = 0; i < 3; i += 1) {
await addElement();
await checkCorrectOrderAll();
}
Expand Down
18 changes: 8 additions & 10 deletions e2e/renderer/e2e/page-router-outlet.e2e-spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ describe("page-router-outlet-scenario", async function () {

it("should not hide action bar when hidden by page", async function () {
const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar");
hideActionBarButton.click();
await hideActionBarButton.click();

const screenMatches = await driver.compareScreen("actionBarVisibility-always-hidden", 5);
assert(screenMatches);
});

it("should not do anything when shown action bar by page", async function () {
const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar");
showActionBarButton.click();
await showActionBarButton.click();

const screenMatches = await driver.compareScreen("actionBarVisibility-always-shown", 5);
assert(screenMatches);
Expand Down Expand Up @@ -81,15 +81,15 @@ describe("page-router-outlet-scenario", async function () {

it("should not show action bar when shown by page", async function () {
const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar");
showActionBarButton.click();
await showActionBarButton.click();

const screenMatches = await driver.compareScreen("actionBarVisibility-never-shown", 5);
assert(screenMatches);
});

it("should not do anything when hidden action bar by page", async function () {
const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar");
hideActionBarButton.click();
await hideActionBarButton.click();

const screenMatches = await driver.compareScreen("actionBarVisibility-never-hidden", 5);
assert(screenMatches);
Expand Down Expand Up @@ -128,15 +128,15 @@ describe("page-router-outlet-scenario", async function () {

it("should not show action bar when shown by page", async function () {
const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar");
showActionBarButton.click();
await showActionBarButton.click();

const screenMatches = await driver.compareScreen(`actionBarVisibility-never-shown${imagePostFix}`, 5);
assert(screenMatches);
});

it("should not do anything when hidden action bar by page", async function () {
const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar");
hideActionBarButton.click();
await hideActionBarButton.click();

const screenMatches = await driver.compareScreen(`actionBarVisibility-never-hidden${imagePostFix}`, 5);
assert(screenMatches);
Expand Down Expand Up @@ -171,16 +171,14 @@ describe("page-router-outlet-scenario", async function () {

it("should hide action bar when hidden by page", async function () {
const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar");
hideActionBarButton.click();

await hideActionBarButton.click();
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-hidden", 5);
assert(screenMatches);
});

it("should show action bar when shown by page", async function () {
const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar");
showActionBarButton.click();

await showActionBarButton.click();
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-shown", 5);
assert(screenMatches);
});
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Viewer requires iframe.
3 changes: 2 additions & 1 deletion e2e/renderer/e2e/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"importHelpers": false,
"sourceMap": true,
"types": [
"node",
"mocha",
"chai"
],
"lib": [
"es6",
"es2015",
"dom"
]
}
Expand Down
12 changes: 5 additions & 7 deletions e2e/renderer/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"id": "org.nativescript.renderer"
},
"dependencies": {
"@angular/animations": "~8.2.0",
"@angular/common": "~8.2.0",
"@angular/compiler": "~8.2.0",
"@angular/core": "~8.2.0",
Expand All @@ -15,7 +16,7 @@
"@angular/platform-browser-dynamic": "~8.2.0",
"@angular/router": "~8.2.0",
"nativescript-angular": "file:../../nativescript-angular",
"nativescript-intl": "^3.0.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.4.0",
"tns-core-modules": "next",
Expand All @@ -27,17 +28,14 @@
"@types/chai": "~4.1.7",
"@types/mocha": "~5.2.5",
"@types/node": "~10.12.18",
"babel-traverse": "6.25.0",
"babel-types": "6.25.0",
"babylon": "6.17.4",
"chai-as-promised": "~7.1.1",
"colors": "^1.1.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-dev-appium": "^5.3.0",
"nativescript-dev-webpack": "next",
"tslib": "^1.7.1",
"typescript": "~3.5.3"
},
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions e2e/renderer/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
]
}
},
"include": [
"../../nativescript-angular",
"**/*"
],
"exclude": [
"../../nativescript-angular/node_modules",
"../../nativescript-angular/**/*.d.ts",
"node_modules",
"platforms",
"**/*.aot",
"e2e"
]
}
3 changes: 3 additions & 0 deletions e2e/routable-animations/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ test-results.xml
tsconfig.esm.json
webpack.config.js

# Tests
/**/mochawesome-report

12 changes: 11 additions & 1 deletion e2e/routable-animations/e2e/setup.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { startServer, stopServer } from "nativescript-dev-appium";
import { startServer, stopServer, ITestReporter, nsCapabilities, LogImageType } from "nativescript-dev-appium";
const addContext = require('mochawesome/addContext');

const testReporterContext = <ITestReporter>{};
testReporterContext.name = "mochawesome";
testReporterContext.reportDir = "mochawesome-report";
testReporterContext.log = addContext;
testReporterContext.logImageTypes = [LogImageType.screenshots];
nsCapabilities.testReporter = testReporterContext;

before("start server", async function () {
nsCapabilities.testReporter.context = this;
await startServer();
});

after("stop server", async function () {
nsCapabilities.testReporter.context = this;
await stopServer();
});
3 changes: 2 additions & 1 deletion e2e/routable-animations/e2e/tests.e2e.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { AppiumDriver, createDriver, SearchOptions } from "nativescript-dev-appium";
import { AppiumDriver, createDriver, SearchOptions, nsCapabilities } from "nativescript-dev-appium";
import { assert } from "chai";

describe("sample scenario", () => {
const defaultWaitTime = 5000;
let driver: AppiumDriver;

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

Expand Down
4 changes: 3 additions & 1 deletion e2e/routable-animations/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
"babylon": "6.17.4",
"colors": "^1.1.2",
"lazy": "1.0.11",
"mocha": "~5.2.0",
"mochawesome": "~3.1.2",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-appium": "^5.3.0",
"nativescript-dev-appium": "next",
"nativescript-dev-webpack": "next",
"typescript": "~3.5.3"
},
Expand Down
7 changes: 7 additions & 0 deletions e2e/routable-animations/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@
]
}
},
"include": [
"../../nativescript-angular",
"**/*"
],
"exclude": [
"../../nativescript-angular/node_modules",
"../../nativescript-angular/**/*.d.ts",
"node_modules",
"platforms",
"**/*.aot",
"e2e"
]
}
Loading

Footer

© 2026 GitHub, Inc.

Back | FazBrowse Home | New Git URL