@applitools/driver 1.14.4 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/capabilities.js +20 -4
- package/package.json +1 -1
- package/types/types.d.ts +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.15.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.14.4...js/driver@1.15.0) (2023-11-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* 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))
|
|
9
|
+
|
|
3
10
|
## [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
11
|
|
|
5
12
|
|
package/dist/capabilities.js
CHANGED
|
@@ -51,13 +51,29 @@ function extractCapabilitiesEnvironment(capabilities) {
|
|
|
51
51
|
environment.isAndroid = isAndroid(capabilities);
|
|
52
52
|
if (!environment.browserName) {
|
|
53
53
|
environment.isNative = true;
|
|
54
|
+
environment.applitoolsLib = { instrumented: false };
|
|
54
55
|
if (environment.isAndroid) {
|
|
55
|
-
|
|
56
|
+
const optionalIntentArguments = (_t = capabilities['appium:optionalIntentArguments']) !== null && _t !== void 0 ? _t : capabilities.optionalIntentArguments;
|
|
57
|
+
environment.applitoolsLib.instrumented = !!(optionalIntentArguments === null || optionalIntentArguments === void 0 ? void 0 : optionalIntentArguments.includes('APPLITOOLS_API_KEY'));
|
|
56
58
|
}
|
|
57
59
|
else if (environment.isIOS) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
const processArguments = (_u = capabilities['appium:processArguments']) !== null && _u !== void 0 ? _u : capabilities.processArguments;
|
|
61
|
+
environment.applitoolsLib.instrumented = utils.types.isString(processArguments)
|
|
62
|
+
? processArguments.includes('APPLITOOLS_API_KEY')
|
|
63
|
+
: !!((_v = processArguments === null || processArguments === void 0 ? void 0 : processArguments.env) === null || _v === void 0 ? void 0 : _v.APPLITOOLS_API_KEY);
|
|
64
|
+
}
|
|
65
|
+
if (environment.applitoolsLib.instrumented) {
|
|
66
|
+
const conflictingCapabilities = { fullReset: false, noReset: true, autoLaunch: false };
|
|
67
|
+
environment.applitoolsLib.conflictingCapabilities = Object.entries(conflictingCapabilities).reduce((conflictingCapabilities, [capability, value]) => {
|
|
68
|
+
;
|
|
69
|
+
[capability, `appium:${capability}`].forEach(capability => {
|
|
70
|
+
if (capabilities[capability] === value) {
|
|
71
|
+
conflictingCapabilities !== null && conflictingCapabilities !== void 0 ? conflictingCapabilities : (conflictingCapabilities = {});
|
|
72
|
+
conflictingCapabilities[capability] = value;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return conflictingCapabilities;
|
|
76
|
+
}, undefined);
|
|
61
77
|
}
|
|
62
78
|
}
|
|
63
79
|
else if (environment.isIOS &&
|
package/package.json
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -32,7 +32,10 @@ export type Environment = {
|
|
|
32
32
|
isW3C?: boolean;
|
|
33
33
|
isEC?: boolean;
|
|
34
34
|
isECClient?: boolean;
|
|
35
|
-
|
|
35
|
+
applitoolsLib?: {
|
|
36
|
+
instrumented: boolean;
|
|
37
|
+
conflictingCapabilities?: Partial<Capabilities>;
|
|
38
|
+
};
|
|
36
39
|
isWeb?: boolean;
|
|
37
40
|
isNative?: boolean;
|
|
38
41
|
isMobile?: boolean;
|