Skip to content

Commit

Permalink
Merge pull request #31 from webdriverio/chore/update-deps
Browse files Browse the repository at this point in the history
Update dependencies and speed up iOS tests
  • Loading branch information
wswebcreation authored Aug 22, 2019
2 parents dc13529 + d9e40c5 commit 2549ccd
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "appium-boilerplate",
"version": "5.3.0",
"version": "5.3.1",
"description": "Boilerplate project to run WebdriverIO tests with Appium to test native applications on iOS and Android",
"scripts": {
"android.sauce.rdc.app": "./node_modules/.bin/wdio ./config/saucelabs/wdio.android.rdc.app.conf.js",
Expand Down Expand Up @@ -32,28 +32,28 @@
"homepage": "https://github.com/webdriverio/appium-boilerplate#readme",
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@babel/register": "^7.4.0",
"@babel/traverse": "^7.4.3",
"@babel/types": "^7.4.0",
"@wdio/appium-service": "^5.7.9",
"@wdio/cli": "^5.7.12",
"@wdio/jasmine-framework": "^5.7.8",
"@wdio/local-runner": "^5.7.12",
"@wdio/sauce-service": "^5.7.8",
"@wdio/spec-reporter": "^5.7.9",
"@wdio/sync": "^5.7.9",
"babel-eslint": "^10.0.1",
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"@babel/traverse": "^7.5.5",
"@babel/types": "^7.5.5",
"@wdio/appium-service": "^5.12.1",
"@wdio/cli": "^5.12.4",
"@wdio/jasmine-framework": "^5.12.1",
"@wdio/local-runner": "^5.12.4",
"@wdio/sauce-service": "^5.12.1",
"@wdio/spec-reporter": "^5.12.1",
"@wdio/sync": "^5.12.3",
"babel-eslint": "^10.0.2",
"eslint": "^5.16.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.1.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-wdio": "^5.7.8",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-wdio": "^5.12.1",
"node-fetch": "^2.3.0",
"webdriverio": "^5.7.12"
"webdriverio": "^5.12.4"
}
}
2 changes: 1 addition & 1 deletion tests/helpers/NativeAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SELECTORS = {
ALERT_BUTTON: '*//android.widget.Button[@text="{BUTTON_TEXT}"]',
},
IOS: {
ALERT: '*//XCUIElementTypeAlert',
ALERT: '-ios predicate string:type == \'XCUIElementTypeAlert\'',
},
};

Expand Down
2 changes: 1 addition & 1 deletion tests/helpers/Picker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const SELECTORS = {
ANDROID_LISTVIEW: '//android.widget.ListView',
IOS_PICKERWHEEL: '*//XCUIElementTypePickerWheel',
IOS_PICKERWHEEL: '-ios predicate string:type == \'XCUIElementTypePickerWheel\'',
DONE: `~header-Dropdown`,
};

Expand Down
7 changes: 3 additions & 4 deletions tests/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const SELECTORS = {
},
IOS: {
GENERIC_TEXT: null,
XPATH_TEXT: '*//XCUIElementTypeStaticText',
TEXT_FIELD: '*//XCUIElementTypeTextField',
TEXT_ELEMENT: '-ios predicate string:type == \'XCUIElementTypeStaticText\'',
},
};

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

if (isXpath) {
visualText = element.$$(SELECTORS.IOS.XPATH_TEXT).reduce((currentValue, el) => `${currentValue} ${el.getText()}`, '');
visualText = element.$$(SELECTORS.IOS.TEXT_ELEMENT).reduce((currentValue, el) => `${currentValue} ${el.getText()}`, '');
} else {
visualText = iosElement.getText();
}
Expand Down

0 comments on commit 2549ccd

Please sign in to comment.