@applitools/core 4.39.2 → 4.39.3-debug-extractLatestCommitInfo-offline
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,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.39.3](https://github.com/Applitools-Dev/sdk/compare/js/core@4.39.2...js/core@4.39.3) (2025-05-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* should prefer updateBaselineIfNew from config over snapshot ([cfecb82](https://github.com/Applitools-Dev/sdk/commit/cfecb82ff7be9b6aaee388a90742cea97c67a9ef))
|
|
9
|
+
|
|
3
10
|
## [4.39.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.39.1...js/core@4.39.2) (2025-05-20)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -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;
|
|
@@ -39,6 +39,7 @@ const merge_configs_1 = require("./merge-configs");
|
|
|
39
39
|
const format_results_1 = require("../utils/format-results");
|
|
40
40
|
const throat_1 = __importDefault(require("throat"));
|
|
41
41
|
const os_1 = __importDefault(require("os"));
|
|
42
|
+
const extract_git_info_1 = require("../utils/extract-git-info");
|
|
42
43
|
const throttledReadFile = (0, throat_1.default)(Number(process.env.APPLITOOLS_FILE_READING_CONCURRENCY) || 1000, fs_1.default.promises.readFile);
|
|
43
44
|
function getConsoleLogLimit() {
|
|
44
45
|
var _a;
|
|
@@ -153,7 +154,7 @@ async function runOfflineSnapshots(options) {
|
|
|
153
154
|
resultsGetter = await runOpenCheckAndClose({
|
|
154
155
|
...target,
|
|
155
156
|
settings: {
|
|
156
|
-
...(0, merge_configs_1.mergeConfigs)((0, merge_configs_1.mergeConfigs)(
|
|
157
|
+
...(0, merge_configs_1.mergeConfigs)(target.settings, (0, merge_configs_1.mergeConfigs)(openSettings, closeSettings)),
|
|
157
158
|
...account.eyesServer,
|
|
158
159
|
environment: {
|
|
159
160
|
...openSettings.environment,
|
|
@@ -238,6 +239,7 @@ async function runOfflineSnapshots(options) {
|
|
|
238
239
|
async function openEyes(settings, environment, logger) {
|
|
239
240
|
const eyes = await core.base.openEyes({
|
|
240
241
|
settings: {
|
|
242
|
+
latestCommitInfo: await (0, extract_git_info_1.extractLatestCommitInfo)({ logger, execOptions: { cwd: offlineLocationPath } }),
|
|
241
243
|
...settings,
|
|
242
244
|
environment: {
|
|
243
245
|
...settings.environment,
|
package/package.json
CHANGED