@applitools/core 4.28.0 → 4.29.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 CHANGED
@@ -1,5 +1,96 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.29.1](https://github.com/Applitools-Dev/sdk/compare/js/core@4.29.0...js/core@4.29.1) (2025-01-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
9
+ * universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * @applitools/socket bumped to 1.2.1
15
+ #### Bug Fixes
16
+
17
+ * mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
18
+ * @applitools/req bumped to 1.7.7
19
+ #### Bug Fixes
20
+
21
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
22
+ * @applitools/spec-driver-webdriver bumped to 1.1.24
23
+ #### Bug Fixes
24
+
25
+ * universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
26
+ * @applitools/ufg-client bumped to 1.16.1
27
+ #### Bug Fixes
28
+
29
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
30
+
31
+
32
+
33
+ * @applitools/screenshoter bumped to 3.10.4
34
+
35
+ * @applitools/nml-client bumped to 1.8.23
36
+
37
+ * @applitools/tunnel-client bumped to 1.6.1
38
+ #### Bug Fixes
39
+
40
+ * memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
41
+
42
+
43
+
44
+ * @applitools/core-base bumped to 1.22.1
45
+
46
+ * @applitools/ec-client bumped to 1.10.2
47
+
48
+
49
+ ## [4.29.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.28.0...js/core@4.29.0) (2025-01-13)
50
+
51
+
52
+ ### Features
53
+
54
+ * jsonFilePath in offline mode ([#2734](https://github.com/Applitools-Dev/sdk/issues/2734)) ([2f9fbe8](https://github.com/Applitools-Dev/sdk/commit/2f9fbe8fc3c5212db6b7cc58a98b041c3ffd5572))
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * 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))
60
+
61
+
62
+ ### Dependencies
63
+
64
+ * @applitools/dom-snapshot bumped to 4.11.14
65
+ #### Bug Fixes
66
+
67
+ * 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))
68
+
69
+
70
+
71
+ * @applitools/snippets bumped to 2.6.4
72
+ #### Bug Fixes
73
+
74
+ * 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))
75
+ * @applitools/dom-capture bumped to 11.5.4
76
+ #### Bug Fixes
77
+
78
+ * 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))
79
+ * @applitools/driver bumped to 1.20.3
80
+
81
+ * @applitools/spec-driver-webdriver bumped to 1.1.23
82
+
83
+ * @applitools/spec-driver-selenium bumped to 1.5.94
84
+
85
+ * @applitools/spec-driver-puppeteer bumped to 1.4.23
86
+
87
+ * @applitools/screenshoter bumped to 3.10.3
88
+
89
+ * @applitools/nml-client bumped to 1.8.22
90
+
91
+ * @applitools/ec-client bumped to 1.10.1
92
+
93
+
3
94
  ## [4.28.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.27.1...js/core@4.28.0) (2024-12-31)
4
95
 
5
96
 
@@ -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, _b;
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 = { ...(_b = options.config) === null || _b === void 0 ? void 0 : _b.open, ...options };
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({ testResults: allTestResults, totalTime: Date.now() - startTime });
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
- await core.closeBatch({ settings: batchIds.map(batchId => ({ batchId, ...account.eyesServer })) });
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.28.0",
3
+ "version": "4.29.1",
4
4
  "homepage": "https://applitools.com",
5
5
  "bugs": {
6
6
  "url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
@@ -55,7 +55,8 @@
55
55
  "test:e2e": "MOCHA_GROUP=e2e run --top-level mocha './test/e2e/**/*.spec.ts' --parallel --jobs ${MOCHA_JOBS:-15} --exit",
56
56
  "test:it": "MOCHA_GROUP=it run --top-level mocha './test/it/**/*.spec.ts'",
57
57
  "test:unit": "MOCHA_GROUP=unit run --top-level mocha './test/unit/**/*.spec.ts'",
58
- "setup": "run --top-level browsers:setup"
58
+ "setup": "run --top-level browsers:setup",
59
+ "setup:standalone": "sh -c 'yarn chromedriver --port=4444 --verbose &'"
59
60
  },
60
61
  "sea": {
61
62
  "bin": "eyes-core",
@@ -74,19 +75,19 @@
74
75
  }
75
76
  },
76
77
  "dependencies": {
77
- "@applitools/core-base": "1.22.0",
78
- "@applitools/dom-capture": "11.5.3",
79
- "@applitools/dom-snapshot": "4.11.13",
80
- "@applitools/driver": "1.20.2",
81
- "@applitools/ec-client": "1.10.0",
78
+ "@applitools/core-base": "1.22.1",
79
+ "@applitools/dom-capture": "11.5.4",
80
+ "@applitools/dom-snapshot": "4.11.14",
81
+ "@applitools/driver": "1.20.3",
82
+ "@applitools/ec-client": "1.10.2",
82
83
  "@applitools/logger": "2.1.0",
83
- "@applitools/nml-client": "1.8.21",
84
- "@applitools/req": "1.7.6",
85
- "@applitools/screenshoter": "3.10.2",
86
- "@applitools/snippets": "2.6.3",
87
- "@applitools/socket": "1.2.0",
88
- "@applitools/spec-driver-webdriver": "1.1.22",
89
- "@applitools/ufg-client": "1.16.0",
84
+ "@applitools/nml-client": "1.8.23",
85
+ "@applitools/req": "1.7.7",
86
+ "@applitools/screenshoter": "3.10.4",
87
+ "@applitools/snippets": "2.6.4",
88
+ "@applitools/socket": "1.2.1",
89
+ "@applitools/spec-driver-webdriver": "1.1.24",
90
+ "@applitools/ufg-client": "1.16.1",
90
91
  "@applitools/utils": "1.7.7",
91
92
  "@types/ws": "8.5.5",
92
93
  "abort-controller": "3.0.0",
@@ -100,15 +101,16 @@
100
101
  "devDependencies": {
101
102
  "@applitools/bongo": "^5.10.0",
102
103
  "@applitools/sea": "^1.0.0",
103
- "@applitools/spec-driver-puppeteer": "^1.4.22",
104
- "@applitools/spec-driver-selenium": "^1.5.93",
104
+ "@applitools/spec-driver-puppeteer": "^1.4.23",
105
+ "@applitools/spec-driver-selenium": "^1.5.94",
105
106
  "@applitools/test-server": "^1.2.2",
106
107
  "@applitools/test-utils": "^1.5.17",
107
- "@applitools/tunnel-client": "^1.6.0",
108
+ "@applitools/tunnel-client": "^1.6.1",
108
109
  "@types/node": "^12.20.55",
109
110
  "@types/selenium-webdriver": "^4.1.2",
110
111
  "@types/semver": "^7.5.8",
111
112
  "@types/yargs": "^17.0.22",
113
+ "chromedriver": "^131.0.5",
112
114
  "nock": "^13.3.2",
113
115
  "png-async": "^0.9.4",
114
116
  "puppeteer": "^19.11.1",
@@ -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[]>;