@applitools/driver 1.12.4 → 1.13.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 +34 -2
- package/package.json +1 -1
- package/types/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.13.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.12.4...js/driver@1.13.0) (2023-07-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* added auto applitools lib detection ([#1707](https://github.com/applitools/eyes.sdk.javascript1/issues/1707)) ([7d439b5](https://github.com/applitools/eyes.sdk.javascript1/commit/7d439b52af55f3b0596c9d35d6ba85c717448023))
|
|
9
|
+
|
|
3
10
|
## [1.12.4](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.12.3...js/driver@1.12.4) (2023-06-28)
|
|
4
11
|
|
|
5
12
|
|
package/dist/capabilities.js
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.extractCapabilitiesViewport = exports.extractCapabilitiesEnvironment = void 0;
|
|
27
|
+
const utils = __importStar(require("@applitools/utils"));
|
|
4
28
|
function extractCapabilitiesEnvironment(capabilities) {
|
|
5
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
29
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
6
30
|
if (capabilities.capabilities)
|
|
7
31
|
capabilities = capabilities.capabilities;
|
|
8
32
|
const environment = {
|
|
@@ -17,7 +41,7 @@ function extractCapabilitiesEnvironment(capabilities) {
|
|
|
17
41
|
isW3C: isW3C(capabilities),
|
|
18
42
|
isMobile: isMobile(capabilities),
|
|
19
43
|
isChrome: isChrome(capabilities),
|
|
20
|
-
isECClient:
|
|
44
|
+
isECClient: !!capabilities['applitools:isECClient'],
|
|
21
45
|
};
|
|
22
46
|
if (environment === null || environment === void 0 ? void 0 : environment.isMobile) {
|
|
23
47
|
environment.deviceName =
|
|
@@ -27,6 +51,14 @@ function extractCapabilitiesEnvironment(capabilities) {
|
|
|
27
51
|
environment.isAndroid = isAndroid(capabilities);
|
|
28
52
|
if (!environment.browserName) {
|
|
29
53
|
environment.isNative = true;
|
|
54
|
+
if (environment.isAndroid) {
|
|
55
|
+
environment.isApplitoolsLib = !!((_t = capabilities.optionalIntentArguments) === null || _t === void 0 ? void 0 : _t.includes('NML_API_KEY'));
|
|
56
|
+
}
|
|
57
|
+
else if (environment.isIOS) {
|
|
58
|
+
environment.isApplitoolsLib = utils.types.isString(capabilities.processArguments)
|
|
59
|
+
? capabilities.processArguments.includes('NML_API_KEY')
|
|
60
|
+
: !!((_v = (_u = capabilities.processArguments) === null || _u === void 0 ? void 0 : _u.env) === null || _v === void 0 ? void 0 : _v.NML_API_KEY);
|
|
61
|
+
}
|
|
30
62
|
}
|
|
31
63
|
else if (environment.isIOS &&
|
|
32
64
|
capabilities.CFBundleIdentifier &&
|
package/package.json
CHANGED