@applitools/core 4.34.0 → 4.35.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 +21 -0
- package/dist/check.js +2 -1
- package/dist/classic/check-and-close.js +6 -1
- package/dist/classic/check.js +6 -1
- package/dist/get-eyes-results.js +2 -2
- package/dist/get-manager-results.js +2 -2
- package/package.json +4 -4
- package/dist/errors/test-error.js +0 -32
- package/types/errors/test-error.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.35.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.34.0...js/core@4.35.0) (2025-03-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add accessibility field to screenshot ([#2815](https://github.com/Applitools-Dev/sdk/issues/2815)) ([3d111f3](https://github.com/Applitools-Dev/sdk/commit/3d111f354c5eedeb8914f18318ccecce5fd13002))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/nml-client bumped to 1.9.0
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
* add accessibility field to screenshot ([#2815](https://github.com/Applitools-Dev/sdk/issues/2815)) ([3d111f3](https://github.com/Applitools-Dev/sdk/commit/3d111f354c5eedeb8914f18318ccecce5fd13002))
|
|
17
|
+
* @applitools/core-base bumped to 1.23.0
|
|
18
|
+
#### Features
|
|
19
|
+
|
|
20
|
+
* add accessibility field to screenshot ([#2815](https://github.com/Applitools-Dev/sdk/issues/2815)) ([3d111f3](https://github.com/Applitools-Dev/sdk/commit/3d111f354c5eedeb8914f18318ccecce5fd13002))
|
|
21
|
+
* @applitools/ec-client bumped to 1.10.8
|
|
22
|
+
|
|
23
|
+
|
|
3
24
|
## [4.34.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.33.0...js/core@4.34.0) (2025-03-30)
|
|
4
25
|
|
|
5
26
|
|
package/dist/check.js
CHANGED
|
@@ -51,7 +51,8 @@ function makeCheck({ type: defaultType = 'classic', eyes, target: defaultTarget,
|
|
|
51
51
|
settings.enablePatterns ||
|
|
52
52
|
settings.useDom ||
|
|
53
53
|
!utils.types.isEmpty(settings.dynamicRegions) ||
|
|
54
|
-
!utils.types.isEmpty(settings.layoutRegions)
|
|
54
|
+
!utils.types.isEmpty(settings.layoutRegions) ||
|
|
55
|
+
!utils.types.isEmpty(settings.accessibilitySettings));
|
|
55
56
|
(_h = settings.autProxy) !== null && _h !== void 0 ? _h : (settings.autProxy = eyes.test.eyesServer.proxy);
|
|
56
57
|
(_j = settings.useDom) !== null && _j !== void 0 ? _j : (settings.useDom = false);
|
|
57
58
|
(_k = (_r = settings).retryTimeout) !== null && _k !== void 0 ? _k : (_r.retryTimeout = 0);
|
|
@@ -142,12 +142,17 @@ function makeCheckAndClose({ eyes, target: defaultTarget, environments: defaultE
|
|
|
142
142
|
waitBetweenStitches: settings.waitBetweenStitches,
|
|
143
143
|
lazyLoad: settings.lazyLoad,
|
|
144
144
|
name: settings.name,
|
|
145
|
+
sendDom: settings.sendDom,
|
|
145
146
|
},
|
|
146
147
|
logger,
|
|
147
148
|
});
|
|
148
149
|
screenshots.forEach(({ environment, ...baseTarget }) => {
|
|
150
|
+
var _a, _b;
|
|
149
151
|
exactEnvironments.push(environment);
|
|
150
|
-
|
|
152
|
+
if ((_a = baseTarget.dom) === null || _a === void 0 ? void 0 : _a.error) {
|
|
153
|
+
logger.warn('could not fetch DOM: ' + baseTarget.dom.error);
|
|
154
|
+
}
|
|
155
|
+
baseTargets.push({ ...baseTarget, dom: (_b = baseTarget.dom) === null || _b === void 0 ? void 0 : _b.url, isTransformed: true });
|
|
151
156
|
baseSettings.push(getBaseCheckSettings({ calculatedRegions: [] }));
|
|
152
157
|
});
|
|
153
158
|
}
|
package/dist/classic/check.js
CHANGED
|
@@ -342,10 +342,12 @@ async function takeNMLScreenshot({ driver, settings, environments, logger, eyes,
|
|
|
342
342
|
region: elementReferences.target,
|
|
343
343
|
selectorsToFindRegionsFor: calculate.map(({ name }) => name),
|
|
344
344
|
scrollRootElement: elementReferences.scrolling,
|
|
345
|
+
sendDom: settings.sendDom,
|
|
345
346
|
},
|
|
346
347
|
logger,
|
|
347
348
|
});
|
|
348
349
|
return screenshots.map(({ calculateRegions, ...baseTarget }) => {
|
|
350
|
+
var _a, _b;
|
|
349
351
|
const aggregateCalculatedRegions = [];
|
|
350
352
|
calculate.forEach(({ reference }, index) => {
|
|
351
353
|
const regions = calculateRegions === null || calculateRegions === void 0 ? void 0 : calculateRegions[index];
|
|
@@ -356,8 +358,11 @@ async function takeNMLScreenshot({ driver, settings, environments, logger, eyes,
|
|
|
356
358
|
logger.log(`Regions "${reference}" was not found in the screenshot`);
|
|
357
359
|
}
|
|
358
360
|
});
|
|
361
|
+
if ((_a = baseTarget.dom) === null || _a === void 0 ? void 0 : _a.error) {
|
|
362
|
+
logger.warn('could not fetch DOM: ' + baseTarget.dom.error);
|
|
363
|
+
}
|
|
359
364
|
return {
|
|
360
|
-
baseTarget: { ...baseTarget, isTransformed: true },
|
|
365
|
+
baseTarget: { ...baseTarget, dom: (_b = baseTarget.dom) === null || _b === void 0 ? void 0 : _b.url, isTransformed: true },
|
|
361
366
|
baseSetting: getBaseCheckSettings({
|
|
362
367
|
calculatedRegions: aggregateCalculatedRegions,
|
|
363
368
|
}),
|
package/dist/get-eyes-results.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.makeGetEyesResults = void 0;
|
|
27
|
-
const
|
|
27
|
+
const core_base_1 = require("@applitools/core-base");
|
|
28
28
|
const utils = __importStar(require("@applitools/utils"));
|
|
29
29
|
function makeGetEyesResults({ eyes, logger: mainLogger, }) {
|
|
30
30
|
return async function getEyesResults({ settings, logger = mainLogger, } = {}) {
|
|
@@ -35,7 +35,7 @@ function makeGetEyesResults({ eyes, logger: mainLogger, }) {
|
|
|
35
35
|
results.forEach(result => {
|
|
36
36
|
var _a;
|
|
37
37
|
if (result.status !== 'Passed')
|
|
38
|
-
throw (_a = result === null || result === void 0 ? void 0 : result.reason) !== null && _a !== void 0 ? _a : new
|
|
38
|
+
throw (_a = result === null || result === void 0 ? void 0 : result.reason) !== null && _a !== void 0 ? _a : new core_base_1.TestError(result);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
return results;
|
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.makeGetManagerResults = void 0;
|
|
27
|
-
const
|
|
27
|
+
const core_base_1 = require("@applitools/core-base");
|
|
28
28
|
const internal_error_1 = require("./errors/internal-error");
|
|
29
29
|
const separate_duplicate_results_1 = require("./utils/separate-duplicate-results");
|
|
30
30
|
const utils = __importStar(require("@applitools/utils"));
|
|
@@ -40,7 +40,7 @@ function makeGetManagerResults({ core, storage, logger: mainLogger, }) {
|
|
|
40
40
|
var _a;
|
|
41
41
|
return ({
|
|
42
42
|
result,
|
|
43
|
-
error: result.status !== 'Passed' ? (_a = result.reason) !== null && _a !== void 0 ? _a : new
|
|
43
|
+
error: result.status !== 'Passed' ? (_a = result.reason) !== null && _a !== void 0 ? _a : new core_base_1.TestError(result) : undefined,
|
|
44
44
|
userTestId: result.userTestId,
|
|
45
45
|
environment: result.environment,
|
|
46
46
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.35.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@applitools/core-base": "1.
|
|
78
|
+
"@applitools/core-base": "1.23.0",
|
|
79
79
|
"@applitools/dom-capture": "11.5.5",
|
|
80
80
|
"@applitools/dom-snapshot": "4.11.17",
|
|
81
81
|
"@applitools/driver": "1.21.0",
|
|
82
|
-
"@applitools/ec-client": "1.10.
|
|
82
|
+
"@applitools/ec-client": "1.10.8",
|
|
83
83
|
"@applitools/logger": "2.1.2",
|
|
84
|
-
"@applitools/nml-client": "1.
|
|
84
|
+
"@applitools/nml-client": "1.9.0",
|
|
85
85
|
"@applitools/req": "1.7.9",
|
|
86
86
|
"@applitools/screenshoter": "3.11.0",
|
|
87
87
|
"@applitools/snippets": "2.6.4",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestError = void 0;
|
|
4
|
-
const core_base_1 = require("@applitools/core-base");
|
|
5
|
-
class TestError extends core_base_1.CoreError {
|
|
6
|
-
constructor(result) {
|
|
7
|
-
if (result.status === 'Failed') {
|
|
8
|
-
super(`Test '${result.name}' of '${result.appName}' is failed! See details at ${result.url}`, {
|
|
9
|
-
reason: 'test failed',
|
|
10
|
-
result,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
else if (result.status === 'Unresolved') {
|
|
14
|
-
if (result.isNew) {
|
|
15
|
-
super(`Test '${result.name}' of '${result.appName}' is new! Please approve the new baseline at ${result.url}`, {
|
|
16
|
-
reason: 'test new',
|
|
17
|
-
result,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
super(`Test '${result.name}' of '${result.appName}' detected differences! See details at: ${result.url}`, {
|
|
22
|
-
reason: 'test different',
|
|
23
|
-
result,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
super('');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.TestError = TestError;
|