diff --git a/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts b/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts index 9b729ca27..46b09358e 100644 --- a/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts +++ b/e2e/renderer/e2e/page-router-outlet.e2e-spec.ts @@ -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. @@ -49,7 +50,7 @@ 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); }); @@ -57,7 +58,7 @@ describe("page-router-outlet-scenario", 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); }); @@ -65,7 +66,7 @@ describe("page-router-outlet-scenario", 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); }); }); @@ -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); }); }); diff --git a/e2e/renderer/e2e/tab-view.e2e-spec.ts b/e2e/renderer/e2e/tab-view.e2e-spec.ts index 7cce1b36e..77c7e4fe7 100644 --- a/e2e/renderer/e2e/tab-view.e2e-spec.ts +++ b/e2e/renderer/e2e/tab-view.e2e-spec.ts @@ -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. @@ -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); }); @@ -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); }); @@ -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); }); }); diff --git a/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/home.png b/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/home.png index f32265ad8..d039c537e 100644 Binary files a/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/home.png and b/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/home.png differ diff --git a/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/support.png b/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/support.png index 43a8a2257..f21417d83 100644 Binary files a/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/support.png and b/e2e/routable-animations/e2e/resources/images/nsroanimations/iPhone XR 13/support.png differ diff --git a/e2e/routable-animations/e2e/tests.e2e.ts b/e2e/routable-animations/e2e/tests.e2e.ts index 0360271f5..83ede4906 100644 --- a/e2e/routable-animations/e2e/tests.e2e.ts +++ b/e2e/routable-animations/e2e/tests.e2e.ts @@ -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. @@ -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"); @@ -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");