@applitools/driver
Advanced tools
Comparing version 1.14.4 to 1.15.0
# Changelog | ||
## [1.15.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.14.4...js/driver@1.15.0) (2023-11-07) | ||
### Features | ||
* added warning when driver used with capabilities that may conflict with applitools lib workflow ([#2011](https://github.com/applitools/eyes.sdk.javascript1/issues/2011)) ([081006d](https://github.com/applitools/eyes.sdk.javascript1/commit/081006d879894db03a2713129b66586496b6eb02)) | ||
## [1.14.4](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.14.3...js/driver@1.14.4) (2023-10-17) | ||
@@ -4,0 +11,0 @@ |
@@ -54,10 +54,26 @@ "use strict"; | ||
environment.isNative = true; | ||
environment.applitoolsLib = { instrumented: false }; | ||
if (environment.isAndroid) { | ||
environment.isApplitoolsLib = !!((_t = capabilities.optionalIntentArguments) === null || _t === void 0 ? void 0 : _t.includes('APPLITOOLS_API_KEY')); | ||
const optionalIntentArguments = (_t = capabilities['appium:optionalIntentArguments']) !== null && _t !== void 0 ? _t : capabilities.optionalIntentArguments; | ||
environment.applitoolsLib.instrumented = !!(optionalIntentArguments === null || optionalIntentArguments === void 0 ? void 0 : optionalIntentArguments.includes('APPLITOOLS_API_KEY')); | ||
} | ||
else if (environment.isIOS) { | ||
environment.isApplitoolsLib = utils.types.isString(capabilities.processArguments) | ||
? capabilities.processArguments.includes('APPLITOOLS_API_KEY') | ||
: !!((_v = (_u = capabilities.processArguments) === null || _u === void 0 ? void 0 : _u.env) === null || _v === void 0 ? void 0 : _v.APPLITOOLS_API_KEY); | ||
const processArguments = (_u = capabilities['appium:processArguments']) !== null && _u !== void 0 ? _u : capabilities.processArguments; | ||
environment.applitoolsLib.instrumented = utils.types.isString(processArguments) | ||
? processArguments.includes('APPLITOOLS_API_KEY') | ||
: !!((_v = processArguments === null || processArguments === void 0 ? void 0 : processArguments.env) === null || _v === void 0 ? void 0 : _v.APPLITOOLS_API_KEY); | ||
} | ||
if (environment.applitoolsLib.instrumented) { | ||
const conflictingCapabilities = { fullReset: false, noReset: true, autoLaunch: false }; | ||
environment.applitoolsLib.conflictingCapabilities = Object.entries(conflictingCapabilities).reduce((conflictingCapabilities, [capability, value]) => { | ||
; | ||
[capability, `appium:${capability}`].forEach(capability => { | ||
if (capabilities[capability] === value) { | ||
conflictingCapabilities !== null && conflictingCapabilities !== void 0 ? conflictingCapabilities : (conflictingCapabilities = {}); | ||
conflictingCapabilities[capability] = value; | ||
} | ||
}); | ||
return conflictingCapabilities; | ||
}, undefined); | ||
} | ||
} | ||
@@ -64,0 +80,0 @@ else if (environment.isIOS && |
{ | ||
"name": "@applitools/driver", | ||
"version": "1.14.4", | ||
"version": "1.15.0", | ||
"description": "Applitools universal framework wrapper", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -35,3 +35,6 @@ import type { Location, Size, Region } from '@applitools/utils'; | ||
isECClient?: boolean; | ||
isApplitoolsLib?: boolean; | ||
applitoolsLib?: { | ||
instrumented: boolean; | ||
conflictingCapabilities?: Partial<Capabilities>; | ||
}; | ||
isWeb?: boolean; | ||
@@ -38,0 +41,0 @@ isNative?: boolean; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
263612
4229