@applitools/nml-client 1.11.9 → 1.11.11

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 CHANGED
@@ -1,5 +1,74 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.11.11](https://github.com/Applitools-Dev/sdk/compare/js/nml-client@1.11.10...js/nml-client@1.11.11) (2025-11-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * better nml error messages ([#3311](https://github.com/Applitools-Dev/sdk/issues/3311)) ([3deea01](https://github.com/Applitools-Dev/sdk/commit/3deea0130636c44573adc919b95c1c99e6d194f1))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * @applitools/utils bumped to 1.14.0
14
+ #### Features
15
+
16
+ * disable heartbeats whenever no tests are running ([#3344](https://github.com/Applitools-Dev/sdk/issues/3344)) ([b66d28a](https://github.com/Applitools-Dev/sdk/commit/b66d28a7a382f26b68de70c8633c027cb4bdf225))
17
+ * @applitools/core-base bumped to 1.30.0
18
+ #### Features
19
+
20
+ * disable heartbeats whenever no tests are running ([#3344](https://github.com/Applitools-Dev/sdk/issues/3344)) ([b66d28a](https://github.com/Applitools-Dev/sdk/commit/b66d28a7a382f26b68de70c8633c027cb4bdf225))
21
+
22
+
23
+ #### Bug Fixes
24
+
25
+ * fails to create test with coded dynamic region | AD-11074 ([#3361](https://github.com/Applitools-Dev/sdk/issues/3361)) ([7f8c8cd](https://github.com/Applitools-Dev/sdk/commit/7f8c8cd85c0cd2e5861cd33fbc29c465903258d5))
26
+ * resolved an issue with `matchTimeout` changing `retryTimeout` ([f656f59](https://github.com/Applitools-Dev/sdk/commit/f656f59dbfb7c41fdb569fbc56d2e9daecefb854))
27
+
28
+
29
+
30
+ * @applitools/logger bumped to 2.2.6
31
+
32
+ * @applitools/req bumped to 1.8.6
33
+
34
+ * @applitools/image bumped to 1.2.5
35
+
36
+ * @applitools/driver bumped to 1.24.2
37
+
38
+ * @applitools/spec-driver-webdriver bumped to 1.5.2
39
+
40
+ * @applitools/test-server bumped to 1.3.5
41
+
42
+
43
+ ## [1.11.10](https://github.com/Applitools-Dev/sdk/compare/js/nml-client@1.11.9...js/nml-client@1.11.10) (2025-11-09)
44
+
45
+
46
+ ### Dependencies
47
+
48
+ * @applitools/utils bumped to 1.13.0
49
+ #### Features
50
+
51
+ * restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
52
+ * @applitools/core-base bumped to 1.29.0
53
+ #### Features
54
+
55
+ * restart cache and keepalive | FLD-3773 ([#3326](https://github.com/Applitools-Dev/sdk/issues/3326)) ([0fd12ca](https://github.com/Applitools-Dev/sdk/commit/0fd12ca703b4546560b563076a38f9ada24acc75))
56
+
57
+
58
+
59
+ * @applitools/logger bumped to 2.2.5
60
+
61
+ * @applitools/req bumped to 1.8.5
62
+
63
+ * @applitools/image bumped to 1.2.4
64
+
65
+ * @applitools/driver bumped to 1.24.1
66
+
67
+ * @applitools/spec-driver-webdriver bumped to 1.5.1
68
+
69
+ * @applitools/test-server bumped to 1.3.4
70
+
71
+
3
72
  ## [1.11.9](https://github.com/Applitools-Dev/sdk/compare/js/nml-client@1.11.8...js/nml-client@1.11.9) (2025-10-16)
4
73
 
5
74
 
@@ -81,7 +81,7 @@ function makeNMLRequests({ settings, logger: mainLogger, }) {
81
81
  brokerUrl = result.nextPath;
82
82
  }
83
83
  async function takeScreenshots({ settings, logger = mainLogger, }) {
84
- var _a;
84
+ var _a, _b;
85
85
  logger = logger.extend(mainLogger, { tags: [`nml-request-${utils.general.shortid()}`] });
86
86
  logger.log('Request "takeScreenshots" called with settings', settings);
87
87
  const { localEnvironment, renderEnvironments, environmentSettings } = await (0, get_environments_info_1.getNMLEnvironmentsInfo)({
@@ -114,26 +114,33 @@ function makeNMLRequests({ settings, logger: mainLogger, }) {
114
114
  let screenshots;
115
115
  if (Number(result.protocolVersion) >= 2) {
116
116
  logger.log(`Request "takeScreenshots" was performed on applitools lib v${result.nmlVersion} through protocol v${result.protocolVersion} on device`, result.payload.debugInfo);
117
- screenshots = localEnvironment
118
- ? [
119
- {
120
- image: result.payload.result[0].result.screenshotUrl,
121
- environment: localEnvironment,
122
- calculateRegions: result.payload.result[0].result.selectorRegions,
123
- dom: result.payload.result[0].result.dom,
124
- },
125
- ]
126
- : renderEnvironments.map((environment, index) => {
127
- if (result.payload.result[index].error) {
128
- throw new Error(`There was a problem in taking screenshot for environment ${JSON.stringify(environment)}. The provided error message was "${result.payload.result[index].error.message}" and had a stack trace of "${result.payload.result[index].error.stack}"`);
129
- }
130
- return {
131
- image: result.payload.result[index].result.screenshotUrl,
132
- calculateRegions: result.payload.result[index].result.selectorRegions,
133
- dom: result.payload.result[index].result.dom,
134
- environment,
135
- };
136
- });
117
+ if ((_b = result.payload.result) === null || _b === void 0 ? void 0 : _b.some((res) => res.error)) {
118
+ const errors = result.payload.result.filter((res) => res.error);
119
+ let errMessage = 'There were problems in taking screenshots for';
120
+ if (localEnvironment) {
121
+ errMessage += ` local environment ${JSON.stringify(localEnvironment)}:\n`;
122
+ errMessage += `\t ${JSON.stringify(errors)}`;
123
+ }
124
+ else {
125
+ errMessage += ' environments:';
126
+ errMessage += ` \n\t ${errors
127
+ .map((err, index) => `Environment ${JSON.stringify(renderEnvironments[index])}: ${JSON.stringify(err)}`)
128
+ .join('\n\t')}`;
129
+ }
130
+ throw new Error(errMessage);
131
+ }
132
+ screenshots = renderEnvironments.map((environment, index) => {
133
+ return {
134
+ image: result.payload.result[index].result.screenshotUrl,
135
+ calculateRegions: result.payload.result[index].result.selectorRegions,
136
+ dom: result.payload.result[index].result.dom,
137
+ environment: localEnvironment || environment,
138
+ };
139
+ });
140
+ if (localEnvironment && renderEnvironments.length > 1) {
141
+ logger.warn(`Local environment detected with ${renderEnvironments.length} rendered environment(s). Using local environment ${JSON.stringify(localEnvironment)} and ignoring rendered environments: ${JSON.stringify(renderEnvironments)}. Note - this warning shouldn't appear in normal usage.`);
142
+ screenshots = [screenshots[0]];
143
+ }
137
144
  }
138
145
  else {
139
146
  screenshots = localEnvironment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/nml-client",
3
- "version": "1.11.9",
3
+ "version": "1.11.11",
4
4
  "description": "Client to integrate the SDKs to the Native Mobile Library (NML)",
5
5
  "homepage": "https://applitools.com",
6
6
  "bugs": {
@@ -36,21 +36,21 @@
36
36
  "test": "run --top-level mocha './test/**/*.spec.ts' --parallel --jobs ${MOCHA_JOBS:-15}"
37
37
  },
38
38
  "dependencies": {
39
- "@applitools/logger": "2.2.4",
40
- "@applitools/req": "1.8.4",
41
- "@applitools/utils": "1.12.0"
39
+ "@applitools/logger": "2.2.6",
40
+ "@applitools/req": "1.8.6",
41
+ "@applitools/utils": "1.14.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@applitools/core-base": "1.28.2",
45
- "@applitools/spec-driver-webdriver": "^1.5.0",
46
- "@applitools/test-server": "^1.3.3",
44
+ "@applitools/core-base": "1.30.0",
45
+ "@applitools/spec-driver-webdriver": "^1.5.2",
46
+ "@applitools/test-server": "^1.3.5",
47
47
  "@applitools/test-utils": "^1.5.17",
48
48
  "@types/node": "^12.20.55",
49
49
  "nock": "^13.3.2",
50
50
  "webdriver": "^7.31.1"
51
51
  },
52
52
  "peerDependencies": {
53
- "@applitools/core-base": "1.28.2"
53
+ "@applitools/core-base": "1.30.0"
54
54
  },
55
55
  "engines": {
56
56
  "node": ">=12.13.0"