chore: fix typo (#7651)

This commit is contained in:
Svetoslav
2019-08-07 16:19:51 +03:00
committed by GitHub
parent 6ffe23212b
commit 83bca630eb
5 changed files with 14 additions and 14 deletions

View File

@ -6,9 +6,9 @@ export abstract class PageObjectBaseModel {
public navigationHelper: NavigationHelper;
constructor(protected _driver: AppiumDriver, protected _naviagtionLinks: Array<string>, elementCacheStrategy: ElementCacheStrategy = ElementCacheStrategy.none) {
this.navigationHelper = new NavigationHelper(this._driver, this._naviagtionLinks, elementCacheStrategy);
this._driver.imageHelper.options.overwriteActualImage = process.env["OVERWRITE_ACTUALIMAGE"] === "true";
constructor(protected _driver: AppiumDriver, protected _navigationLinks: Array<string>, elementCacheStrategy: ElementCacheStrategy = ElementCacheStrategy.none) {
this.navigationHelper = new NavigationHelper(this._driver, this._navigationLinks, elementCacheStrategy);
this._driver.imageHelper.options.overwriteActualImage = process.env["OVERWRITE_ACTUAL_IMAGE"] === "true";
this._driver.imageHelper.options.waitBeforeCreatingInitialImageCapture = +process.env["WAIT_BEFORE_CREATING_INITIAL_IMAGE_CAPTURE"] || 9000;
this._driver.imageHelper.options.keepOriginalImageSize = false;
this._driver.imageHelper.options.tolerance = 0;
@ -20,7 +20,7 @@ export abstract class PageObjectBaseModel {
}
async endSuite() {
const suiteName = this._naviagtionLinks.join("-");
const suiteName = this._navigationLinks.join("-");
logInfo(`End of suit ${suiteName} tests!`);
}

View File

@ -61,10 +61,10 @@ describe(`${imagePrefix}-suite`, async function () {
await tabTwo.click();
await driver.imageHelper.compareScreen({ imageName: imageName });
const imageComparissonresult = driver.imageHelper.hasImageComparisonPassed();
assert.isTrue(imageComparissonresult);
const imageComparisonResult = driver.imageHelper.hasImageComparisonPassed();
assert.isTrue(imageComparisonResult);
if (imageComparissonresult) {
if (imageComparisonResult) {
const tabOne = await driver.waitForElement(sample.tab1);
await tabOne.click();
}

View File

@ -1,4 +1,4 @@
import { nsCapabilities, createDriver, AppiumDriver, DeviceOrientaion, logInfo } from "nativescript-dev-appium";
import { nsCapabilities, createDriver, AppiumDriver, DeviceOrientation, logInfo } from "nativescript-dev-appium";
import { BottomNavigationBasePage } from "./bottom-navigation-base-page";
import { assert } from "chai";
import { setImageName } from "../../../helpers/image-helper";
@ -28,8 +28,8 @@ describe(`${suite}-${spec}-suite`, async function () {
afterEach(async function () {
const orientation = await driver.getOrientation();
if (orientation === DeviceOrientaion.LANDSCAPE) {
await driver.setOrientation(DeviceOrientaion.PORTRAIT);
if (orientation === DeviceOrientation.LANDSCAPE) {
await driver.setOrientation(DeviceOrientation.PORTRAIT);
}
if (this.currentTest.state === "failed") {
await driver.logTestArtifacts(this.currentTest.title);
@ -186,13 +186,13 @@ describe(`${suite}-${spec}-suite`, async function () {
it(`${spec}-fancy-fonts-change-orientation`, async function () {
await bottomNavigationBasePage.navigateToSample("fancy-fonts");
await driver.setOrientation(DeviceOrientaion.LANDSCAPE);
await driver.setOrientation(DeviceOrientation.LANDSCAPE);
await driver.imageHelper.compareScreen();
await driver.backgroundApp(1);
await driver.imageHelper.compareScreen();
// await driver.setOrientation(DeviceOrientaion.PORTRAIT);
// await driver.setOrientation(DeviceOrientation.PORTRAIT);
await driver.imageHelper.compareScreen();
assert.isTrue(driver.imageHelper.hasImageComparisonPassed());

View File

@ -15,7 +15,7 @@ export abstract class TabNavigationBasePage extends PageObjectBaseModel {
abstract async getItems();
async init(subSuiteName: string) {
this._naviagtionLinks.push(subSuiteName);
this._navigationLinks.push(subSuiteName);
await super.initSuite();
}

View File

@ -10,7 +10,7 @@ export class TabViewBasePage extends PageObjectBaseModel {
}
async init(subSuiteName: string) {
this._naviagtionLinks.push(subSuiteName);
this._navigationLinks.push(subSuiteName);
await super.initSuite();
}
}