@applitools/driver 1.21.0 → 1.21.1
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 +15 -0
- package/dist/context.js +9 -4
- package/dist/fake/mock-driver.js +12 -0
- package/package.json +2 -2
- package/types/context.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.21.1](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.21.0...js/driver@1.21.1) (2025-04-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* executePoll error logging FLD-2870 ([#2890](https://github.com/Applitools-Dev/sdk/issues/2890)) ([a8ff720](https://github.com/Applitools-Dev/sdk/commit/a8ff720efafacabe2023282748a6d8a0f1b3ff73))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/snippets bumped to 2.6.5
|
|
14
|
+
#### Performance Improvements
|
|
15
|
+
|
|
16
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
17
|
+
|
|
3
18
|
## [1.21.0](https://github.com/Applitools-Dev/sdk/compare/js/driver@1.20.5...js/driver@1.21.0) (2025-03-30)
|
|
4
19
|
|
|
5
20
|
|
package/dist/context.js
CHANGED
|
@@ -362,7 +362,15 @@ class Context {
|
|
|
362
362
|
let chunks = '';
|
|
363
363
|
while (!isExecutionTimedOut) {
|
|
364
364
|
if (response.status === 'ERROR') {
|
|
365
|
-
|
|
365
|
+
let errorMessage = response.error;
|
|
366
|
+
try {
|
|
367
|
+
errorMessage = JSON.stringify(errorMessage);
|
|
368
|
+
}
|
|
369
|
+
catch (err) {
|
|
370
|
+
errorMessage = `Error during execute poll script: '${errorMessage}'. Addtionaly, the error is not serializable - ${err}`;
|
|
371
|
+
}
|
|
372
|
+
this.logger.error(`Error during execute poll script: '${errorMessage}'`);
|
|
373
|
+
throw new Error(`Error during execute poll script: '${errorMessage}'`);
|
|
366
374
|
}
|
|
367
375
|
else if (response.status === 'SUCCESS') {
|
|
368
376
|
return response.value;
|
|
@@ -570,8 +578,5 @@ class Context {
|
|
|
570
578
|
this._state.region = await this.getRegion();
|
|
571
579
|
this._state.clientRegion = await this.getClientRegion();
|
|
572
580
|
}
|
|
573
|
-
async preserveScrollingRegion() {
|
|
574
|
-
this._state.scrollingRegion = await this.getScrollingRegion();
|
|
575
|
-
}
|
|
576
581
|
}
|
|
577
582
|
exports.Context = Context;
|
package/dist/fake/mock-driver.js
CHANGED
|
@@ -280,6 +280,18 @@ class MockDriver {
|
|
|
280
280
|
let result = this._scripts.get(String(script));
|
|
281
281
|
if (!result) {
|
|
282
282
|
const name = Object.keys(WELL_KNOWN_SCRIPTS).find(name => WELL_KNOWN_SCRIPTS[name](script));
|
|
283
|
+
if (utils.types.isFunction(script)) {
|
|
284
|
+
try {
|
|
285
|
+
return JSON.stringify(await script(...args));
|
|
286
|
+
}
|
|
287
|
+
catch (e) {
|
|
288
|
+
if (script.throwing) {
|
|
289
|
+
throw e;
|
|
290
|
+
}
|
|
291
|
+
else
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
283
295
|
if (!name)
|
|
284
296
|
return null;
|
|
285
297
|
result = this._scripts.get(name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@applitools/logger": "2.1.2",
|
|
77
|
-
"@applitools/snippets": "2.6.
|
|
77
|
+
"@applitools/snippets": "2.6.5",
|
|
78
78
|
"@applitools/utils": "1.8.0",
|
|
79
79
|
"semver": "7.6.2"
|
|
80
80
|
},
|