Skip to content

Commit 2549ccd

Browse files
Merge pull request #31 from webdriverio/chore/update-deps
Update dependencies and speed up iOS tests
2 parents dc13529 + d9e40c5 commit 2549ccd

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

package.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "appium-boilerplate",
3-
"version": "5.3.0",
3+
"version": "5.3.1",
44
"description": "Boilerplate project to run WebdriverIO tests with Appium to test native applications on iOS and Android",
55
"scripts": {
66
"android.sauce.rdc.app": "./node_modules/.bin/wdio ./config/saucelabs/wdio.android.rdc.app.conf.js",
@@ -32,28 +32,28 @@
3232
"homepage": "https://github.com/webdriverio/appium-boilerplate#readme",
3333
"dependencies": {},
3434
"devDependencies": {
35-
"@babel/cli": "^7.4.3",
36-
"@babel/core": "^7.4.3",
37-
"@babel/preset-env": "^7.4.3",
38-
"@babel/register": "^7.4.0",
39-
"@babel/traverse": "^7.4.3",
40-
"@babel/types": "^7.4.0",
41-
"@wdio/appium-service": "^5.7.9",
42-
"@wdio/cli": "^5.7.12",
43-
"@wdio/jasmine-framework": "^5.7.8",
44-
"@wdio/local-runner": "^5.7.12",
45-
"@wdio/sauce-service": "^5.7.8",
46-
"@wdio/spec-reporter": "^5.7.9",
47-
"@wdio/sync": "^5.7.9",
48-
"babel-eslint": "^10.0.1",
35+
"@babel/cli": "^7.5.5",
36+
"@babel/core": "^7.5.5",
37+
"@babel/preset-env": "^7.5.5",
38+
"@babel/register": "^7.5.5",
39+
"@babel/traverse": "^7.5.5",
40+
"@babel/types": "^7.5.5",
41+
"@wdio/appium-service": "^5.12.1",
42+
"@wdio/cli": "^5.12.4",
43+
"@wdio/jasmine-framework": "^5.12.1",
44+
"@wdio/local-runner": "^5.12.4",
45+
"@wdio/sauce-service": "^5.12.1",
46+
"@wdio/spec-reporter": "^5.12.1",
47+
"@wdio/sync": "^5.12.3",
48+
"babel-eslint": "^10.0.2",
4949
"eslint": "^5.16.0",
5050
"eslint-config-standard": "^12.0.0",
51-
"eslint-plugin-import": "^2.14.0",
51+
"eslint-plugin-import": "^2.18.2",
5252
"eslint-plugin-node": "^7.0.1",
53-
"eslint-plugin-promise": "^4.1.1",
54-
"eslint-plugin-standard": "^4.0.0",
55-
"eslint-plugin-wdio": "^5.7.8",
53+
"eslint-plugin-promise": "^4.2.1",
54+
"eslint-plugin-standard": "^4.0.1",
55+
"eslint-plugin-wdio": "^5.12.1",
5656
"node-fetch": "^2.3.0",
57-
"webdriverio": "^5.7.12"
57+
"webdriverio": "^5.12.4"
5858
}
5959
}

tests/helpers/NativeAlert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const SELECTORS = {
55
ALERT_BUTTON: '*//android.widget.Button[@text="{BUTTON_TEXT}"]',
66
},
77
IOS: {
8-
ALERT: '*//XCUIElementTypeAlert',
8+
ALERT: '-ios predicate string:type == \'XCUIElementTypeAlert\'',
99
},
1010
};
1111

tests/helpers/Picker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const SELECTORS = {
22
ANDROID_LISTVIEW: '//android.widget.ListView',
3-
IOS_PICKERWHEEL: '*//XCUIElementTypePickerWheel',
3+
IOS_PICKERWHEEL: '-ios predicate string:type == \'XCUIElementTypePickerWheel\'',
44
DONE: `~header-Dropdown`,
55
};
66

tests/helpers/utils.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ const SELECTORS = {
55
},
66
IOS: {
77
GENERIC_TEXT: null,
8-
XPATH_TEXT: '*//XCUIElementTypeStaticText',
9-
TEXT_FIELD: '*//XCUIElementTypeTextField',
8+
TEXT_ELEMENT: '-ios predicate string:type == \'XCUIElementTypeStaticText\'',
109
},
1110
};
1211

@@ -25,10 +24,10 @@ export function getTextOfElement (element, isXpath = false) {
2524
if (driver.isAndroid) {
2625
visualText = element.$$(SELECTORS.ANDROID.TEXT).reduce((currentValue, el) => `${currentValue} ${el.getText()}`, '');
2726
} else {
28-
const iosElement = isXpath ? element.$$(SELECTORS.IOS.XPATH_TEXT) : element;
27+
const iosElement = isXpath ? element.$$(SELECTORS.IOS.TEXT_ELEMENT) : element;
2928

3029
if (isXpath) {
31-
visualText = element.$$(SELECTORS.IOS.XPATH_TEXT).reduce((currentValue, el) => `${currentValue} ${el.getText()}`, '');
30+
visualText = element.$$(SELECTORS.IOS.TEXT_ELEMENT).reduce((currentValue, el) => `${currentValue} ${el.getText()}`, '');
3231
} else {
3332
visualText = iosElement.getText();
3433
}

0 commit comments

Comments
 (0)