@applitools/core 4.28.0 → 4.29.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,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.29.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.28.0...js/core@4.29.0) (2025-01-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* support batching tests in distributed env - close batch only when required ([#2733](https://github.com/Applitools-Dev/sdk/issues/2733)) ([2e59e4a](https://github.com/Applitools-Dev/sdk/commit/2e59e4a76edcc02b8888dfc78a42749bae76f79c))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* @applitools/dom-snapshot bumped to 4.11.14
|
|
19
|
+
#### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* @applitools/snippets bumped to 2.6.4
|
|
26
|
+
#### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
|
|
29
|
+
* @applitools/dom-capture bumped to 11.5.4
|
|
30
|
+
#### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* remove side-eyes and fix code scanning issues ([#2712](https://github.com/Applitools-Dev/sdk/issues/2712)) ([cda98e4](https://github.com/Applitools-Dev/sdk/commit/cda98e4748c73cd97c11f646a2b5e26ff9416892))
|
|
33
|
+
* @applitools/driver bumped to 1.20.3
|
|
34
|
+
|
|
35
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.23
|
|
36
|
+
|
|
37
|
+
* @applitools/spec-driver-selenium bumped to 1.5.94
|
|
38
|
+
|
|
39
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.23
|
|
40
|
+
|
|
41
|
+
* @applitools/screenshoter bumped to 3.10.3
|
|
42
|
+
|
|
43
|
+
* @applitools/nml-client bumped to 1.8.22
|
|
44
|
+
|
|
45
|
+
* @applitools/ec-client bumped to 1.10.1
|
|
46
|
+
|
|
47
|
+
|
|
3
48
|
## [4.28.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.27.1...js/core@4.28.0) (2024-12-31)
|
|
4
49
|
|
|
5
50
|
|
|
@@ -36,14 +36,15 @@ const to_base_check_settings_1 = require("../automation/utils/to-base-check-sett
|
|
|
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");
|
|
39
|
+
const format_results_1 = require("../utils/format-results");
|
|
39
40
|
async function runOfflineSnapshots(options) {
|
|
40
|
-
var _a
|
|
41
|
+
var _a;
|
|
41
42
|
if (!options.offlineLocationPath)
|
|
42
43
|
throw new Error('offlineLocationPath is required');
|
|
43
44
|
const offlineLocationPath = path_1.default.resolve(options.offlineLocationPath);
|
|
44
45
|
const startTime = Date.now();
|
|
45
46
|
const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : (0, logger_1.makeLogger)({ format: { label: 'offline-exec' } });
|
|
46
|
-
const eyesServerSettings = { ...
|
|
47
|
+
const eyesServerSettings = { ...options.config.open, ...options };
|
|
47
48
|
const core = (0, core_1.makeCore)();
|
|
48
49
|
const account = await core.getAccountInfo({ settings: eyesServerSettings });
|
|
49
50
|
const ufgClient = await (0, get_ufg_client_1.makeGetUFGClient)({ logger })({
|
|
@@ -65,7 +66,11 @@ async function runOfflineSnapshots(options) {
|
|
|
65
66
|
throw new Error(`Unable to find offline executions in ${offlineLocationPath}`);
|
|
66
67
|
}
|
|
67
68
|
const allTestResults = await runTests(testFolders);
|
|
68
|
-
const { isSuccess, outputStr } = processResults({
|
|
69
|
+
const { isSuccess, outputStr } = processResults({
|
|
70
|
+
testResults: allTestResults,
|
|
71
|
+
totalTime: Date.now() - startTime,
|
|
72
|
+
jsonFilePath: options.jsonFilePath,
|
|
73
|
+
});
|
|
69
74
|
if (!isSuccess && options.failOnDiff) {
|
|
70
75
|
throw new Error(outputStr);
|
|
71
76
|
}
|
|
@@ -88,7 +93,10 @@ async function runOfflineSnapshots(options) {
|
|
|
88
93
|
const batchIds = [...new Set(results.map(t => t.batchId))];
|
|
89
94
|
const allTestResults = results.map(t => t.results);
|
|
90
95
|
logger.log('done running all tests', allTestResults);
|
|
91
|
-
|
|
96
|
+
const keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean') || options.config.open.keepBatchOpen;
|
|
97
|
+
if (!keepBatchOpen) {
|
|
98
|
+
await core.closeBatch({ settings: batchIds.map(batchId => ({ batchId, ...account.eyesServer })) });
|
|
99
|
+
}
|
|
92
100
|
logger.log('done closing batches');
|
|
93
101
|
return allTestResults;
|
|
94
102
|
}
|
|
@@ -196,7 +204,7 @@ exports.runOfflineSnapshots = runOfflineSnapshots;
|
|
|
196
204
|
function uniq(arr) {
|
|
197
205
|
return [...new Set(arr)];
|
|
198
206
|
}
|
|
199
|
-
function processResults({ testResults, totalTime, saveNewTests = true, failOnDiff = true, }) {
|
|
207
|
+
function processResults({ testResults, totalTime, saveNewTests = true, failOnDiff = true, jsonFilePath, }) {
|
|
200
208
|
let outputStr = '\n';
|
|
201
209
|
const pluralize = utils.general.pluralize;
|
|
202
210
|
const testResultsWithErrors = testResults.filter(r => r && r.reason);
|
|
@@ -269,6 +277,10 @@ function processResults({ testResults, totalTime, saveNewTests = true, failOnDif
|
|
|
269
277
|
else if (passedOrNew.length) {
|
|
270
278
|
outputStr += chalk_1.default.green(`\nNo differences were found!`);
|
|
271
279
|
}
|
|
280
|
+
if (jsonFilePath) {
|
|
281
|
+
outputStr += '\n\nWriting test results to ' + jsonFilePath + '\n';
|
|
282
|
+
fs_1.default.writeFileSync(jsonFilePath, (0, format_results_1.toJsonOutput)(testResults));
|
|
283
|
+
}
|
|
272
284
|
if (hasResults) {
|
|
273
285
|
outputStr += `\n${seeDetailsStr}\nTotal time: ${Math.round(totalTime / 1000)} seconds\n`;
|
|
274
286
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.29.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -75,17 +75,17 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@applitools/core-base": "1.22.0",
|
|
78
|
-
"@applitools/dom-capture": "11.5.
|
|
79
|
-
"@applitools/dom-snapshot": "4.11.
|
|
80
|
-
"@applitools/driver": "1.20.
|
|
81
|
-
"@applitools/ec-client": "1.10.
|
|
78
|
+
"@applitools/dom-capture": "11.5.4",
|
|
79
|
+
"@applitools/dom-snapshot": "4.11.14",
|
|
80
|
+
"@applitools/driver": "1.20.3",
|
|
81
|
+
"@applitools/ec-client": "1.10.1",
|
|
82
82
|
"@applitools/logger": "2.1.0",
|
|
83
|
-
"@applitools/nml-client": "1.8.
|
|
83
|
+
"@applitools/nml-client": "1.8.22",
|
|
84
84
|
"@applitools/req": "1.7.6",
|
|
85
|
-
"@applitools/screenshoter": "3.10.
|
|
86
|
-
"@applitools/snippets": "2.6.
|
|
85
|
+
"@applitools/screenshoter": "3.10.3",
|
|
86
|
+
"@applitools/snippets": "2.6.4",
|
|
87
87
|
"@applitools/socket": "1.2.0",
|
|
88
|
-
"@applitools/spec-driver-webdriver": "1.1.
|
|
88
|
+
"@applitools/spec-driver-webdriver": "1.1.23",
|
|
89
89
|
"@applitools/ufg-client": "1.16.0",
|
|
90
90
|
"@applitools/utils": "1.7.7",
|
|
91
91
|
"@types/ws": "8.5.5",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@applitools/bongo": "^5.10.0",
|
|
102
102
|
"@applitools/sea": "^1.0.0",
|
|
103
|
-
"@applitools/spec-driver-puppeteer": "^1.4.
|
|
104
|
-
"@applitools/spec-driver-selenium": "^1.5.
|
|
103
|
+
"@applitools/spec-driver-puppeteer": "^1.4.23",
|
|
104
|
+
"@applitools/spec-driver-selenium": "^1.5.94",
|
|
105
105
|
"@applitools/test-server": "^1.2.2",
|
|
106
106
|
"@applitools/test-utils": "^1.5.17",
|
|
107
107
|
"@applitools/tunnel-client": "^1.6.0",
|
|
@@ -7,5 +7,6 @@ export type OfflineSnapshotsSettings = EyesServerSettings & {
|
|
|
7
7
|
failOnDiff: boolean;
|
|
8
8
|
config: Config<SpecType, 'ufg'>;
|
|
9
9
|
logger?: Logger;
|
|
10
|
+
jsonFilePath?: string;
|
|
10
11
|
};
|
|
11
12
|
export declare function runOfflineSnapshots(options: OfflineSnapshotsSettings): Promise<TestResult[]>;
|