Skip to content

Commit d96844c

Browse files
Merge pull request #2011 from NativeScript/merge-master-in-release
Merge master in release
2 parents 83e9f51 + 00668a9 commit d96844c

30 files changed

+35
-11
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Diff for: e2e/config/appium.capabilities.json

+20
Original file line numberDiff line numberDiff line change
@@ -200,5 +200,25 @@
200200
"deviceName": "iPhone XR",
201201
"noReset": true,
202202
"fullReset": false
203+
},
204+
"sim.iPhoneXR.ios12": {
205+
"platformName": "iOS",
206+
"platformVersion": "12.0",
207+
"deviceName": "iPhone XR 12",
208+
"noReset": true,
209+
"fullReset": false
210+
},
211+
"sim.iPhoneXR.ios13": {
212+
"platformName": "iOS",
213+
"platformVersion": "13.0",
214+
"deviceName": "iPhone XR 13",
215+
"appiumVersion": "1.15.0",
216+
"noReset": true,
217+
"fullReset": false,
218+
"density": 3,
219+
"offsetPixels": 87,
220+
"app": "",
221+
"idleTimeout": 120,
222+
"automationName": "Appium"
203223
}
204224
}

Diff for: e2e/renderer/e2e/page-router-outlet.e2e-spec.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from "nativescript-dev-appium";
88
import { assert } from "chai";
99
import { isSauceLab } from "nativescript-dev-appium/lib/parser";
10+
import { ImageOptions } from "nativescript-dev-appium/lib/image-options";
1011

1112
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.
1213

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

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

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

60-
const screenMatches = await driver.compareScreen("actionBarVisibility-always-hidden", 5);
61+
const screenMatches = await driver.compareScreen("actionBarVisibility-always-hidden", 5, 50, ImageOptions.pixel);
6162
assert(screenMatches);
6263
});
6364

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

68-
const screenMatches = await driver.compareScreen("actionBarVisibility-always-shown", 5);
69+
const screenMatches = await driver.compareScreen("actionBarVisibility-always-shown", 5, 50, ImageOptions.pixel);
6970
assert(screenMatches);
7071
});
7172
});
@@ -167,21 +168,21 @@ describe("page-router-outlet-scenario", async function () {
167168
});
168169

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

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

181182
it("should show action bar when shown by page", async function () {
182183
const showActionBarButton = await driver.findElementByAutomationText("ShowActionBar");
183184
await showActionBarButton.click();
184-
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-shown", 5);
185+
const screenMatches = await driver.compareScreen("actionBarVisibility-auto-shown", 5, 50, ImageOptions.pixel);
185186
assert(screenMatches);
186187
});
187188
});
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Diff for: e2e/renderer/e2e/tab-view.e2e-spec.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from "nativescript-dev-appium";
88
import { assert } from "chai";
99
import { isSauceLab } from "nativescript-dev-appium/lib/parser";
10+
import { ImageOptions } from "nativescript-dev-appium/lib/image-options";
1011

1112
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.
1213

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

61-
const screenMatches = await driver.compareScreen("tab-view-binding-first-tab", 5);
62+
const screenMatches = await driver.compareScreen("tab-view-binding-first-tab", 5, 50, ImageOptions.pixel);
6263
assert(screenMatches);
6364
});
6465

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

76-
const screenMatches = await driver.compareScreen("tab-view-binding-second-tab", 5);
77+
const screenMatches = await driver.compareScreen("tab-view-binding-second-tab", 5, 50, ImageOptions.pixel);
7778
assert(screenMatches);
7879
});
7980

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

91-
const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5);
92+
const screenMatches = await driver.compareScreen("tab-view-binding-third-tab", 5, 50, ImageOptions.pixel);
9293
assert(screenMatches);
9394
});
9495
});

Diff for: e2e/renderer/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"babel-traverse": "6.26.0",
3232
"babel-types": "6.26.0",
3333
"babylon": "6.18.0",
34+
"chai": "^4.2.0",
3435
"lazy": "1.0.11",
3536
"mocha": "~5.2.0",
3637
"mochawesome": "~3.1.2",
Loading
Loading

Diff for: e2e/routable-animations/e2e/tests.e2e.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { AppiumDriver, createDriver, SearchOptions, nsCapabilities } from "nativescript-dev-appium";
22
import { assert } from "chai";
33
import { isSauceLab } from "nativescript-dev-appium/lib/parser";
4+
import { ImageOptions } from "nativescript-dev-appium/lib/image-options";
45

56
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.
67

@@ -32,7 +33,7 @@ describe("sample scenario", function () {
3233

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

4243
it("should go back to home page", async function () {
4344
const btnGoBackToHomePage = await driver.findElementByAutomationText("go back to home page");
44-
const supportImage = await driver.compareScreen("support");
45+
const supportImage = await driver.compareScreen("support", 5, 20, ImageOptions.pixel);
4546
assert.isTrue(supportImage);
4647
await btnGoBackToHomePage.click();
4748
const titleHomePage = await driver.findElementByAutomationText("Home Page");

0 commit comments

Comments
 (0)