@applitools/core 4.50.4 → 4.51.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
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.51.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.50.4...js/core@4.51.0) (2025-11-03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/dom-snapshot bumped to 4.14.0
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
#### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* sandbox prototype pollution | FLD-3738 ([#3310](https://github.com/Applitools-Dev/sdk/issues/3310)) ([3185558](https://github.com/Applitools-Dev/sdk/commit/31855586851d5372169aae7bf0268cec139abc59))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#### Code Refactoring
|
|
25
|
+
|
|
26
|
+
* blob generation error handling ([#2501](https://github.com/Applitools-Dev/sdk/issues/2501)) ([94bc14f](https://github.com/Applitools-Dev/sdk/commit/94bc14faf3de0fd9a8ca24af4870f839756a8aad))
|
|
27
|
+
* @applitools/ufg-client bumped to 1.18.0
|
|
28
|
+
#### Features
|
|
29
|
+
|
|
30
|
+
* logging errors from dom snapshot to the backend | AD-11641 ([#3291](https://github.com/Applitools-Dev/sdk/issues/3291)) ([7f5b487](https://github.com/Applitools-Dev/sdk/commit/7f5b48701ff93bf980924c9346a8241ed87f5a56))
|
|
31
|
+
|
|
3
32
|
## [4.50.4](https://github.com/Applitools-Dev/sdk/compare/js/core@4.50.3...js/core@4.50.4) (2025-10-22)
|
|
4
33
|
|
|
5
34
|
|
|
@@ -8,6 +8,7 @@ const to_generated_selectors_1 = require("./utils/to-generated-selectors");
|
|
|
8
8
|
const abort_error_1 = require("../errors/abort-error");
|
|
9
9
|
const filterStaleElements_1 = require("./utils/filterStaleElements");
|
|
10
10
|
function makeTakeSnapshots({ core, spec, signal, logger: mainLogger }) {
|
|
11
|
+
const MAX_LOGGED_ERRORS_PER_SNAPSHOT = 10;
|
|
11
12
|
return async function takeSnapshots({ driver, settings = {}, account, logger = mainLogger, }) {
|
|
12
13
|
var _a, _b;
|
|
13
14
|
logger = logger.extend(mainLogger);
|
|
@@ -95,6 +96,24 @@ function makeTakeSnapshots({ core, spec, signal, logger: mainLogger }) {
|
|
|
95
96
|
const url = await driver.getUrl();
|
|
96
97
|
const title = await driver.getTitle();
|
|
97
98
|
const userAgent = environment.isWeb ? await driver.getUserAgentLegacy() : undefined;
|
|
99
|
+
// Log DomSnapshot errors via logEvent
|
|
100
|
+
for (const snapshot of snapshots) {
|
|
101
|
+
if (snapshot.errors && snapshot.errors.length > 0) {
|
|
102
|
+
for (const error of snapshot.errors.slice(0, MAX_LOGGED_ERRORS_PER_SNAPSHOT)) {
|
|
103
|
+
void core.logEvent({
|
|
104
|
+
settings: {
|
|
105
|
+
level: 'Error',
|
|
106
|
+
event: {
|
|
107
|
+
type: 'DomSnapshotError',
|
|
108
|
+
message: error,
|
|
109
|
+
url: snapshot.url,
|
|
110
|
+
},
|
|
111
|
+
...account.eyesServer,
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
98
117
|
return snapshots.map((snapshot, index) => ({
|
|
99
118
|
target: snapshot,
|
|
100
119
|
settings: getSafeCheckSettings({
|
|
@@ -168,6 +168,7 @@ function logSnapshot(logger, snapshot) {
|
|
|
168
168
|
logger.log(`dom snapshot - cdt nodes with data-applitools-selector: ${JSON.stringify(snapshot.cdt.filter(node => { var _a; return (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.some(attr => attr.name === 'data-applitools-selector'); }))}`);
|
|
169
169
|
logger.log('dom snapshot - safeSelectors:', snapshot.safeSelectors);
|
|
170
170
|
logger.log('dom snapshot - warnings:', snapshot.warnings);
|
|
171
|
+
snapshot.errors && logger.log('dom snapshot - errors:', snapshot.errors);
|
|
171
172
|
}
|
|
172
173
|
catch (err) {
|
|
173
174
|
logger.error(`error while logging dom snapshot`, err);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.51.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@applitools/core-base": "1.28.2",
|
|
83
83
|
"@applitools/dom-capture": "11.6.5",
|
|
84
|
-
"@applitools/dom-snapshot": "4.
|
|
84
|
+
"@applitools/dom-snapshot": "4.14.0",
|
|
85
85
|
"@applitools/driver": "1.24.0",
|
|
86
86
|
"@applitools/ec-client": "1.12.11",
|
|
87
87
|
"@applitools/logger": "2.2.4",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@applitools/snippets": "2.7.0",
|
|
92
92
|
"@applitools/socket": "1.3.5",
|
|
93
93
|
"@applitools/spec-driver-webdriver": "1.5.0",
|
|
94
|
-
"@applitools/ufg-client": "1.
|
|
94
|
+
"@applitools/ufg-client": "1.18.0",
|
|
95
95
|
"@applitools/utils": "1.12.0",
|
|
96
96
|
"@types/ws": "8.5.5",
|
|
97
97
|
"abort-controller": "3.0.0",
|