Skip to content

Fix: tolerance for renderer. Update images for nsroanim. #2005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 10, 2019
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
13 changes: 7 additions & 6 deletions e2e/renderer/e2e/page-router-outlet.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from "nativescript-dev-appium";
import { assert } from "chai";
import { isSauceLab } from "nativescript-dev-appium/lib/parser";
import { ImageOptions } from "nativescript-dev-appium/lib/image-options";

const QUEUE_WAIT_TIME: number = 600000; // Sometimes SauceLabs threads are not available and the tests wait in a queue to start. Wait 10 min before timeout.

Expand Down Expand Up @@ -49,23 +50,23 @@ describe("page-router-outlet-scenario", async function () {
});

it("should not hide action bar by default", async function () {
const screenMatches = await driver.compareScreen("actionBarVisibility-always-default", 5);
const screenMatches = await driver.compareScreen("actionBarVisibility-always-default", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});

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

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

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

const screenMatches = await driver.compareScreen("actionBarVisibility-always-shown", 5);
const screenMatches = await driver.compareScreen("actionBarVisibility-always-shown", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});
});
Expand Down Expand Up @@ -167,21 +168,21 @@ describe("page-router-outlet-scenario", async function () {
});

it("should show action bar by default", async function () {
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-default", 5);
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-default", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});

it("should hide action bar when hidden by page", async function () {
const hideActionBarButton = await driver.findElementByAutomationText("HideActionBar");
await hideActionBarButton.click();
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-hidden", 5);
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-hidden", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});

it("should show action bar when shown by page", async function () {
const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar");
await showActionBarButton.click();
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-shown", 5);
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-shown", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});
});
Expand Down
7 changes: 4 additions & 3 deletions e2e/renderer/e2e/tab-view.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from "nativescript-dev-appium";
import { assert } from "chai";
import { isSauceLab } from "nativescript-dev-appium/lib/parser";
import { ImageOptions } from "nativescript-dev-appium/lib/image-options";

const QUEUE_WAIT_TIME: number = 600000; // Sometimes SauceLabs threads are not available and the tests wait in a queue to start. Wait 10 min before timeout.

Expand Down Expand Up @@ -58,7 +59,7 @@ describe("TabView-scenario", async function(){
secondTabItem = notSelectedTabItems[0];
thirdTabItem = notSelectedTabItems[1];

const screenMatches = await driver.compareScreen("tab-view-binding-first-tab", 5);
const screenMatches = await driver.compareScreen("tab-view-binding-first-tab", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});

Expand All @@ -73,7 +74,7 @@ describe("TabView-scenario", async function(){
secondTabItem = await driver.findElementByAutomationText("SELECTED");
thirdTabItem = notSelectedTabItems[1];

const screenMatches = await driver.compareScreen("tab-view-binding-second-tab", 5);
const screenMatches = await driver.compareScreen("tab-view-binding-second-tab", 5, 50, ImageOptions.pixel);
assert(screenMatches);
});

Expand All @@ -88,7 +89,7 @@ describe("TabView-scenario", async function(){
secondTabItem = notSelectedTabItems[1];
thirdTabItem = await driver.findElementByAutomationText("SELECTED");

const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5);
const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5, 50, ImageOptions.pixel);
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions e2e/routable-animations/e2e/tests.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AppiumDriver, createDriver, SearchOptions, nsCapabilities } from "nativescript-dev-appium";
import { assert } from "chai";
import { isSauceLab } from "nativescript-dev-appium/lib/parser";
import { ImageOptions } from "nativescript-dev-appium/lib/image-options";

const QUEUE_WAIT_TIME: number = 600000; // Sometimes SauceLabs threads are not available and the tests wait in a queue to start. Wait 10 min before timeout.

Expand Down Expand Up @@ -32,7 +33,7 @@ describe("sample scenario", function () {

it("should go to support page", async function () {
const btnGoToSupportPage = await driver.findElementByAutomationText("go to support page");
const homeImage = await driver.compareScreen("home");
const homeImage = await driver.compareScreen("home", 5, 20, ImageOptions.pixel);
assert.isTrue(homeImage);
await btnGoToSupportPage.click();
const titleSupportPage = await driver.findElementByAutomationText("Support Page");
Expand All @@ -41,7 +42,7 @@ describe("sample scenario", function () {

it("should go back to home page", async function () {
const btnGoBackToHomePage = await driver.findElementByAutomationText("go back to home page");
const supportImage = await driver.compareScreen("support");
const supportImage = await driver.compareScreen("support", 5, 20, ImageOptions.pixel);
assert.isTrue(supportImage);
await btnGoBackToHomePage.click();
const titleHomePage = await driver.findElementByAutomationText("Home Page");
Expand Down