@applitools/core 4.38.0 → 4.38.1-debug-20250507.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,78 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.38.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.38.0...js/core@4.38.1) (2025-05-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* improve retry timeout logic in makeReqUFG function | AD-9895 ([#2949](https://github.com/Applitools-Dev/sdk/issues/2949)) ([f6c7048](https://github.com/Applitools-Dev/sdk/commit/f6c704846faa3d16bf3df01d289e5961363d88ae))
|
|
9
|
+
* offline test dist readings | AD-9894 ([#2945](https://github.com/Applitools-Dev/sdk/issues/2945)) ([92293f4](https://github.com/Applitools-Dev/sdk/commit/92293f40ddbbb015fba224a70158bbd0cdbcf799))
|
|
10
|
+
* silent tunnel warning | AD-9842 ([#2932](https://github.com/Applitools-Dev/sdk/issues/2932)) ([e83a2ff](https://github.com/Applitools-Dev/sdk/commit/e83a2fffc5c73edda8c52c101356f94d0c600959))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Code Refactoring
|
|
14
|
+
|
|
15
|
+
* simplify upload resources logic ([#2952](https://github.com/Applitools-Dev/sdk/issues/2952)) ([9918341](https://github.com/Applitools-Dev/sdk/commit/9918341567b6c0148c7ea957932bd4f57896c1fb))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
* @applitools/utils bumped to 1.8.1
|
|
21
|
+
#### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* offline test dist readings | AD-9894 ([#2945](https://github.com/Applitools-Dev/sdk/issues/2945)) ([92293f4](https://github.com/Applitools-Dev/sdk/commit/92293f40ddbbb015fba224a70158bbd0cdbcf799))
|
|
24
|
+
* @applitools/logger bumped to 2.1.3
|
|
25
|
+
#### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* silent tunnel warning | AD-9842 ([#2932](https://github.com/Applitools-Dev/sdk/issues/2932)) ([e83a2ff](https://github.com/Applitools-Dev/sdk/commit/e83a2fffc5c73edda8c52c101356f94d0c600959))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
* @applitools/socket bumped to 1.2.4
|
|
32
|
+
|
|
33
|
+
* @applitools/tunnel-client bumped to 1.6.6
|
|
34
|
+
#### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* silent tunnel warning | AD-9842 ([#2932](https://github.com/Applitools-Dev/sdk/issues/2932)) ([e83a2ff](https://github.com/Applitools-Dev/sdk/commit/e83a2fffc5c73edda8c52c101356f94d0c600959))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
* @applitools/ufg-client bumped to 1.16.10
|
|
41
|
+
#### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* improve retry timeout logic in makeReqUFG function | AD-9895 ([#2949](https://github.com/Applitools-Dev/sdk/issues/2949)) ([f6c7048](https://github.com/Applitools-Dev/sdk/commit/f6c704846faa3d16bf3df01d289e5961363d88ae))
|
|
44
|
+
* offline test dist readings | AD-9894 ([#2945](https://github.com/Applitools-Dev/sdk/issues/2945)) ([92293f4](https://github.com/Applitools-Dev/sdk/commit/92293f40ddbbb015fba224a70158bbd0cdbcf799))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
#### Code Refactoring
|
|
48
|
+
|
|
49
|
+
* simplify upload resources logic ([#2952](https://github.com/Applitools-Dev/sdk/issues/2952)) ([9918341](https://github.com/Applitools-Dev/sdk/commit/9918341567b6c0148c7ea957932bd4f57896c1fb))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
* @applitools/dom-snapshot bumped to 4.11.20
|
|
54
|
+
|
|
55
|
+
* @applitools/req bumped to 1.7.11
|
|
56
|
+
|
|
57
|
+
* @applitools/image bumped to 1.1.19
|
|
58
|
+
|
|
59
|
+
* @applitools/driver bumped to 1.21.3
|
|
60
|
+
|
|
61
|
+
* @applitools/spec-driver-webdriver bumped to 1.2.4
|
|
62
|
+
|
|
63
|
+
* @applitools/spec-driver-selenium bumped to 1.5.100
|
|
64
|
+
|
|
65
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.29
|
|
66
|
+
|
|
67
|
+
* @applitools/screenshoter bumped to 3.11.3
|
|
68
|
+
|
|
69
|
+
* @applitools/nml-client bumped to 1.9.3
|
|
70
|
+
|
|
71
|
+
* @applitools/core-base bumped to 1.25.1
|
|
72
|
+
|
|
73
|
+
* @applitools/ec-client bumped to 1.10.12
|
|
74
|
+
|
|
75
|
+
|
|
3
76
|
## [4.38.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.37.1...js/core@4.38.0) (2025-04-30)
|
|
4
77
|
|
|
5
78
|
|
|
@@ -0,0 +1,32 @@
|
|
|
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;
|
|
@@ -31,8 +31,8 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
31
31
|
const path_1 = __importDefault(require("path"));
|
|
32
32
|
const core_1 = require("../core");
|
|
33
33
|
const get_ufg_client_1 = require("../ufg/get-ufg-client");
|
|
34
|
-
const logger_1 = require("@applitools/logger");
|
|
35
34
|
const to_base_check_settings_1 = require("../automation/utils/to-base-check-settings");
|
|
35
|
+
const logger_1 = require("@applitools/logger");
|
|
36
36
|
const chalk_1 = __importDefault(require("chalk"));
|
|
37
37
|
const utils = __importStar(require("@applitools/utils"));
|
|
38
38
|
const merge_configs_1 = require("./merge-configs");
|
|
@@ -46,6 +46,7 @@ function getConsoleLogLimit() {
|
|
|
46
46
|
async function runOfflineSnapshots(options) {
|
|
47
47
|
var _a;
|
|
48
48
|
const limitConsoleLogs = getConsoleLogLimit();
|
|
49
|
+
const throttledRender = (0, throat_1.default)(Number(process.env.APPLITOOLS_RENDER_CONCURRENCY) || 1000, render);
|
|
49
50
|
if (!options.offlineLocationPath)
|
|
50
51
|
throw new Error('offlineLocationPath is required');
|
|
51
52
|
const offlineLocationPath = path_1.default.resolve(options.offlineLocationPath);
|
|
@@ -223,28 +224,25 @@ async function runOfflineSnapshots(options) {
|
|
|
223
224
|
async function uploadResources(targets, logger) {
|
|
224
225
|
const uploadLogger = logger.extend({ tags: ['upload-resources'] });
|
|
225
226
|
const promises = targets.map(async ({ target }) => {
|
|
226
|
-
|
|
227
|
+
const resourcePromises = Object.values(target.resources)
|
|
227
228
|
.filter(isHashedResource)
|
|
228
229
|
.map(async (resource) => {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
230
|
+
return ufgClient.uploadResource({
|
|
231
|
+
resource: {
|
|
232
|
+
hash: resource,
|
|
233
|
+
async getter() {
|
|
234
|
+
return {
|
|
235
|
+
id: '',
|
|
236
|
+
url: '',
|
|
237
|
+
value: await throttledReadFile(path_1.default.join(offlineLocationPath, 'resources', resource.hash)),
|
|
238
|
+
contentType: resource.contentType,
|
|
239
|
+
hash: resource,
|
|
240
|
+
};
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
logger: uploadLogger,
|
|
244
|
+
});
|
|
237
245
|
});
|
|
238
|
-
resourcePromises = resourcePromises.concat(ufgClient.uploadResource({
|
|
239
|
-
resource: {
|
|
240
|
-
id: '',
|
|
241
|
-
url: '',
|
|
242
|
-
value: await throttledReadFile(path_1.default.join(offlineLocationPath, 'resources', target.snapshot.hash)),
|
|
243
|
-
contentType: target.snapshot.contentType,
|
|
244
|
-
hash: target.snapshot,
|
|
245
|
-
},
|
|
246
|
-
logger: uploadLogger,
|
|
247
|
-
}));
|
|
248
246
|
return Promise.all(resourcePromises);
|
|
249
247
|
});
|
|
250
248
|
await Promise.all(promises);
|
|
@@ -255,7 +253,7 @@ async function runOfflineSnapshots(options) {
|
|
|
255
253
|
async function runCheck(eyes, target, index, logger) {
|
|
256
254
|
var _a;
|
|
257
255
|
const checkLogger = logger.extend({ tags: [`check-${index}`] });
|
|
258
|
-
const { mergedCheckSettings, baseTarget } = await
|
|
256
|
+
const { mergedCheckSettings, baseTarget } = await throttledRender(target, checkLogger);
|
|
259
257
|
(_a = mergedCheckSettings.stepIndex) !== null && _a !== void 0 ? _a : (mergedCheckSettings.stepIndex = index);
|
|
260
258
|
await eyes.check({
|
|
261
259
|
target: { ...baseTarget, isTransformed: true },
|
|
@@ -268,7 +266,7 @@ async function runOfflineSnapshots(options) {
|
|
|
268
266
|
async function runCheckAndClose(eyes, target, index, logger) {
|
|
269
267
|
var _a;
|
|
270
268
|
const checkLogger = logger.extend({ tags: [`check-${index}`] });
|
|
271
|
-
const { mergedCheckSettings, baseTarget } = await
|
|
269
|
+
const { mergedCheckSettings, baseTarget } = await throttledRender(target, checkLogger);
|
|
272
270
|
(_a = mergedCheckSettings.stepIndex) !== null && _a !== void 0 ? _a : (mergedCheckSettings.stepIndex = index);
|
|
273
271
|
await eyes.checkAndClose({
|
|
274
272
|
target: { ...baseTarget, isTransformed: true },
|
|
@@ -280,7 +278,7 @@ async function runOfflineSnapshots(options) {
|
|
|
280
278
|
}
|
|
281
279
|
async function runOpenCheckAndClose(target, logger, actualEnvironment) {
|
|
282
280
|
const checkLogger = logger.extend({ tags: ['open-check-and-close'] });
|
|
283
|
-
const { mergedCheckSettings, baseTarget } = await
|
|
281
|
+
const { mergedCheckSettings, baseTarget } = await throttledRender(target, checkLogger);
|
|
284
282
|
const settings = (0, merge_configs_1.mergeConfigs)(target.settings, mergedCheckSettings);
|
|
285
283
|
return core.base.openCheckAndCloseEyes({
|
|
286
284
|
target: { ...baseTarget, isTransformed: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.38.0",
|
|
3
|
+
"version": "4.38.1-debug-20250507.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -75,20 +75,20 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@applitools/core-base": "1.25.
|
|
78
|
+
"@applitools/core-base": "1.25.1",
|
|
79
79
|
"@applitools/dom-capture": "11.5.5",
|
|
80
|
-
"@applitools/dom-snapshot": "4.11.
|
|
81
|
-
"@applitools/driver": "1.21.
|
|
82
|
-
"@applitools/ec-client": "1.10.
|
|
83
|
-
"@applitools/logger": "2.1.
|
|
84
|
-
"@applitools/nml-client": "1.9.
|
|
85
|
-
"@applitools/req": "1.7.
|
|
86
|
-
"@applitools/screenshoter": "3.11.
|
|
80
|
+
"@applitools/dom-snapshot": "4.11.20",
|
|
81
|
+
"@applitools/driver": "1.21.3",
|
|
82
|
+
"@applitools/ec-client": "1.10.12",
|
|
83
|
+
"@applitools/logger": "2.1.3",
|
|
84
|
+
"@applitools/nml-client": "1.9.3",
|
|
85
|
+
"@applitools/req": "1.7.11",
|
|
86
|
+
"@applitools/screenshoter": "3.11.3",
|
|
87
87
|
"@applitools/snippets": "2.6.5",
|
|
88
|
-
"@applitools/socket": "1.2.
|
|
89
|
-
"@applitools/spec-driver-webdriver": "1.2.
|
|
90
|
-
"@applitools/ufg-client": "1.16.
|
|
91
|
-
"@applitools/utils": "1.8.0",
|
|
88
|
+
"@applitools/socket": "1.2.4",
|
|
89
|
+
"@applitools/spec-driver-webdriver": "1.2.4",
|
|
90
|
+
"@applitools/ufg-client": "1.16.10-debug-20250507.0",
|
|
91
|
+
"@applitools/utils": "1.8.1-debug-20250507.0",
|
|
92
92
|
"@types/ws": "8.5.5",
|
|
93
93
|
"abort-controller": "3.0.0",
|
|
94
94
|
"chalk": "4.1.2",
|
|
@@ -102,11 +102,11 @@
|
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@applitools/bongo": "^5.10.0",
|
|
104
104
|
"@applitools/sea": "^1.0.0",
|
|
105
|
-
"@applitools/spec-driver-puppeteer": "^1.4.
|
|
106
|
-
"@applitools/spec-driver-selenium": "^1.5.
|
|
105
|
+
"@applitools/spec-driver-puppeteer": "^1.4.29",
|
|
106
|
+
"@applitools/spec-driver-selenium": "^1.5.100",
|
|
107
107
|
"@applitools/test-server": "^1.2.2",
|
|
108
108
|
"@applitools/test-utils": "^1.5.17",
|
|
109
|
-
"@applitools/tunnel-client": "^1.6.
|
|
109
|
+
"@applitools/tunnel-client": "^1.6.6",
|
|
110
110
|
"@types/mocha": "^10.0.7",
|
|
111
111
|
"@types/node": "^12.20.55",
|
|
112
112
|
"@types/selenium-webdriver": "^4.1.2",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Config, type EyesServerSettings } from '../types';
|
|
2
1
|
import { type Logger } from '@applitools/logger';
|
|
2
|
+
import type { Config, EyesServerSettings } from '../types';
|
|
3
3
|
import type { TestResult } from '@applitools/core-base';
|
|
4
4
|
import type { SpecType } from '@applitools/driver';
|
|
5
5
|
export type OfflineSnapshotsSettings = EyesServerSettings & {
|