mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
chore: fix typo (#7651)
This commit is contained in:
@ -6,9 +6,9 @@ export abstract class PageObjectBaseModel {
|
|||||||
|
|
||||||
public navigationHelper: NavigationHelper;
|
public navigationHelper: NavigationHelper;
|
||||||
|
|
||||||
constructor(protected _driver: AppiumDriver, protected _naviagtionLinks: Array<string>, elementCacheStrategy: ElementCacheStrategy = ElementCacheStrategy.none) {
|
constructor(protected _driver: AppiumDriver, protected _navigationLinks: Array<string>, elementCacheStrategy: ElementCacheStrategy = ElementCacheStrategy.none) {
|
||||||
this.navigationHelper = new NavigationHelper(this._driver, this._naviagtionLinks, elementCacheStrategy);
|
this.navigationHelper = new NavigationHelper(this._driver, this._navigationLinks, elementCacheStrategy);
|
||||||
this._driver.imageHelper.options.overwriteActualImage = process.env["OVERWRITE_ACTUALIMAGE"] === "true";
|
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.waitBeforeCreatingInitialImageCapture = +process.env["WAIT_BEFORE_CREATING_INITIAL_IMAGE_CAPTURE"] || 9000;
|
||||||
this._driver.imageHelper.options.keepOriginalImageSize = false;
|
this._driver.imageHelper.options.keepOriginalImageSize = false;
|
||||||
this._driver.imageHelper.options.tolerance = 0;
|
this._driver.imageHelper.options.tolerance = 0;
|
||||||
@ -20,7 +20,7 @@ export abstract class PageObjectBaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async endSuite() {
|
async endSuite() {
|
||||||
const suiteName = this._naviagtionLinks.join("-");
|
const suiteName = this._navigationLinks.join("-");
|
||||||
logInfo(`End of suit ${suiteName} tests!`);
|
logInfo(`End of suit ${suiteName} tests!`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,10 +61,10 @@ describe(`${imagePrefix}-suite`, async function () {
|
|||||||
await tabTwo.click();
|
await tabTwo.click();
|
||||||
await driver.imageHelper.compareScreen({ imageName: imageName });
|
await driver.imageHelper.compareScreen({ imageName: imageName });
|
||||||
|
|
||||||
const imageComparissonresult = driver.imageHelper.hasImageComparisonPassed();
|
const imageComparisonResult = driver.imageHelper.hasImageComparisonPassed();
|
||||||
assert.isTrue(imageComparissonresult);
|
assert.isTrue(imageComparisonResult);
|
||||||
|
|
||||||
if (imageComparissonresult) {
|
if (imageComparisonResult) {
|
||||||
const tabOne = await driver.waitForElement(sample.tab1);
|
const tabOne = await driver.waitForElement(sample.tab1);
|
||||||
await tabOne.click();
|
await tabOne.click();
|
||||||
}
|
}
|
||||||
|
@ -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 { BottomNavigationBasePage } from "./bottom-navigation-base-page";
|
||||||
import { assert } from "chai";
|
import { assert } from "chai";
|
||||||
import { setImageName } from "../../../helpers/image-helper";
|
import { setImageName } from "../../../helpers/image-helper";
|
||||||
@ -28,8 +28,8 @@ describe(`${suite}-${spec}-suite`, async function () {
|
|||||||
|
|
||||||
afterEach(async function () {
|
afterEach(async function () {
|
||||||
const orientation = await driver.getOrientation();
|
const orientation = await driver.getOrientation();
|
||||||
if (orientation === DeviceOrientaion.LANDSCAPE) {
|
if (orientation === DeviceOrientation.LANDSCAPE) {
|
||||||
await driver.setOrientation(DeviceOrientaion.PORTRAIT);
|
await driver.setOrientation(DeviceOrientation.PORTRAIT);
|
||||||
}
|
}
|
||||||
if (this.currentTest.state === "failed") {
|
if (this.currentTest.state === "failed") {
|
||||||
await driver.logTestArtifacts(this.currentTest.title);
|
await driver.logTestArtifacts(this.currentTest.title);
|
||||||
@ -186,13 +186,13 @@ describe(`${suite}-${spec}-suite`, async function () {
|
|||||||
|
|
||||||
it(`${spec}-fancy-fonts-change-orientation`, async function () {
|
it(`${spec}-fancy-fonts-change-orientation`, async function () {
|
||||||
await bottomNavigationBasePage.navigateToSample("fancy-fonts");
|
await bottomNavigationBasePage.navigateToSample("fancy-fonts");
|
||||||
await driver.setOrientation(DeviceOrientaion.LANDSCAPE);
|
await driver.setOrientation(DeviceOrientation.LANDSCAPE);
|
||||||
await driver.imageHelper.compareScreen();
|
await driver.imageHelper.compareScreen();
|
||||||
|
|
||||||
await driver.backgroundApp(1);
|
await driver.backgroundApp(1);
|
||||||
await driver.imageHelper.compareScreen();
|
await driver.imageHelper.compareScreen();
|
||||||
|
|
||||||
// await driver.setOrientation(DeviceOrientaion.PORTRAIT);
|
// await driver.setOrientation(DeviceOrientation.PORTRAIT);
|
||||||
await driver.imageHelper.compareScreen();
|
await driver.imageHelper.compareScreen();
|
||||||
|
|
||||||
assert.isTrue(driver.imageHelper.hasImageComparisonPassed());
|
assert.isTrue(driver.imageHelper.hasImageComparisonPassed());
|
||||||
|
@ -15,7 +15,7 @@ export abstract class TabNavigationBasePage extends PageObjectBaseModel {
|
|||||||
abstract async getItems();
|
abstract async getItems();
|
||||||
|
|
||||||
async init(subSuiteName: string) {
|
async init(subSuiteName: string) {
|
||||||
this._naviagtionLinks.push(subSuiteName);
|
this._navigationLinks.push(subSuiteName);
|
||||||
await super.initSuite();
|
await super.initSuite();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ export class TabViewBasePage extends PageObjectBaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init(subSuiteName: string) {
|
async init(subSuiteName: string) {
|
||||||
this._naviagtionLinks.push(subSuiteName);
|
this._navigationLinks.push(subSuiteName);
|
||||||
await super.initSuite();
|
await super.initSuite();
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user