diff --git a/package.json b/package.json index 4b81a262e..137b7c093 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ ], "dependencies": { "@appium/base-driver": "^8.5.2", - "@appium/support": "^2.55.3", + "@appium/support": "^2.58.0", "@babel/runtime": "^7.4.3", "appium-adb": "^9.1.0", "appium-android-driver": "^5.0.0", diff --git a/test/functional/desired.js b/test/functional/desired.js index 5286e92dc..4a4251791 100644 --- a/test/functional/desired.js +++ b/test/functional/desired.js @@ -1,28 +1,18 @@ import path from 'path'; import _ from 'lodash'; import gpsdemoApp from 'gps-demo-app'; +import { node } from '@appium/support'; const apidemosApp = require.resolve('android-apidemos'); -function deepFreeze (object) { - const propNames = Object.getOwnPropertyNames(object); - for (const name of propNames) { - const value = object[name]; - if (value && typeof value === 'object') { - deepFreeze(value); - } - } - return Object.freeze(object); -} - function amendCapabilities (baseCaps, ...newCaps) { - return deepFreeze({ + return node.deepFreeze({ alwaysMatch: _.cloneDeep(Object.assign({}, baseCaps.alwaysMatch, ...newCaps)), firstMatch: [{}], }); } -const GENERIC_CAPS = deepFreeze({ +const GENERIC_CAPS = node.deepFreeze({ alwaysMatch: { 'appium:androidInstallTimeout': process.env.CI ? 120000 : 90000, 'appium:deviceName': 'Android',