@applitools/core 4.18.2 → 4.20.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 +69 -0
- package/dist/autonomous/core.js +1 -1
- package/dist/autonomous/create-render-target.js +2 -15
- package/dist/autonomous/take-snapshots.js +6 -2
- package/dist/classic/core.js +2 -2
- package/dist/classic/utils/take-dom-capture.js +1 -0
- package/dist/cli/cli.js +20 -0
- package/dist/core.js +6 -3
- package/dist/make-manager.js +4 -3
- package/dist/open-eyes.js +61 -1
- package/dist/run-offline-snapshots.js +346 -0
- package/dist/ufg/check.js +40 -96
- package/dist/ufg/core.js +4 -3
- package/dist/ufg/create-render-target-from-snapshot.js +21 -0
- package/dist/ufg/get-ufg-client.js +2 -2
- package/dist/ufg/take-snapshots.js +4 -6
- package/dist/ufg/utils/generate-safe-selectors.js +18 -18
- package/dist/ufg/utils/take-dom-snapshots.js +13 -14
- package/dist/{log-event.js → utils/ensure-offline-folder.js} +15 -11
- package/package.json +13 -12
- package/types/autonomous/create-render-target.d.ts +2 -2
- package/types/autonomous/start-renders.d.ts +2 -2
- package/types/autonomous/take-snapshots.d.ts +3 -2
- package/types/autonomous/types.d.ts +5 -5
- package/types/classic/core.d.ts +2 -1
- package/types/classic/utils/take-dom-capture.d.ts +8 -0
- package/types/make-manager.d.ts +2 -1
- package/types/run-offline-snapshots.d.ts +5 -0
- package/types/ufg/core.d.ts +2 -1
- package/types/ufg/create-render-target-from-snapshot.d.ts +8 -0
- package/types/ufg/get-ufg-client.d.ts +2 -1
- package/types/ufg/take-snapshots.d.ts +4 -6
- package/types/ufg/types.d.ts +3 -3
- package/types/ufg/utils/generate-safe-selectors.d.ts +18 -12
- package/types/utils/ensure-offline-folder.d.ts +1 -0
- package/types/log-event.d.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.20.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.19.0...js/core@4.20.0) (2024-09-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* offline execution ([#2528](https://github.com/Applitools-Dev/sdk/issues/2528)) ([e6c3b9e](https://github.com/Applitools-Dev/sdk/commit/e6c3b9e3315203027551da3bfdecf90490edd029))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/ufg-client bumped to 1.13.0
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
* offline execution ([#2528](https://github.com/Applitools-Dev/sdk/issues/2528)) ([e6c3b9e](https://github.com/Applitools-Dev/sdk/commit/e6c3b9e3315203027551da3bfdecf90490edd029))
|
|
17
|
+
* @applitools/core-base bumped to 1.17.0
|
|
18
|
+
#### Features
|
|
19
|
+
|
|
20
|
+
* offline execution ([#2528](https://github.com/Applitools-Dev/sdk/issues/2528)) ([e6c3b9e](https://github.com/Applitools-Dev/sdk/commit/e6c3b9e3315203027551da3bfdecf90490edd029))
|
|
21
|
+
* @applitools/ec-client bumped to 1.9.6
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [4.19.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.18.2...js/core@4.19.0) (2024-09-16)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* allow passing arguments to dom-capture from core ([#2531](https://github.com/Applitools-Dev/sdk/issues/2531)) ([9cfc9a5](https://github.com/Applitools-Dev/sdk/commit/9cfc9a5b5d6650afd1e7daf2714d6779a7dc2724))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* stale layout breakpoints elements ([#2479](https://github.com/Applitools-Dev/sdk/issues/2479)) ([f5e4b5a](https://github.com/Applitools-Dev/sdk/commit/f5e4b5ac8077b8c4b7ba67a38c4e58050a55ce75))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Dependencies
|
|
38
|
+
|
|
39
|
+
* @applitools/snippets bumped to 2.5.0
|
|
40
|
+
#### Features
|
|
41
|
+
|
|
42
|
+
* add playwright fixture ([#2412](https://github.com/Applitools-Dev/sdk/issues/2412)) ([0632e93](https://github.com/Applitools-Dev/sdk/commit/0632e93dd7f53029a8c5f4230d22a05abf5fefd4))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
#### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* stale layout breakpoints elements ([#2479](https://github.com/Applitools-Dev/sdk/issues/2479)) ([f5e4b5a](https://github.com/Applitools-Dev/sdk/commit/f5e4b5ac8077b8c4b7ba67a38c4e58050a55ce75))
|
|
48
|
+
* @applitools/dom-capture bumped to 11.5.0
|
|
49
|
+
#### Features
|
|
50
|
+
|
|
51
|
+
* ability to capture element properties ([#2525](https://github.com/Applitools-Dev/sdk/issues/2525)) ([ab35e1d](https://github.com/Applitools-Dev/sdk/commit/ab35e1dc929ba4bd82e99081527b277c8090f1e0))
|
|
52
|
+
* @applitools/driver bumped to 1.19.1
|
|
53
|
+
#### Bug Fixes
|
|
54
|
+
|
|
55
|
+
* stale layout breakpoints elements ([#2479](https://github.com/Applitools-Dev/sdk/issues/2479)) ([f5e4b5a](https://github.com/Applitools-Dev/sdk/commit/f5e4b5ac8077b8c4b7ba67a38c4e58050a55ce75))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.13
|
|
60
|
+
|
|
61
|
+
* @applitools/spec-driver-selenium bumped to 1.5.84
|
|
62
|
+
|
|
63
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.13
|
|
64
|
+
|
|
65
|
+
* @applitools/screenshoter bumped to 3.8.37
|
|
66
|
+
|
|
67
|
+
* @applitools/nml-client bumped to 1.8.11
|
|
68
|
+
|
|
69
|
+
* @applitools/ec-client bumped to 1.9.5
|
|
70
|
+
|
|
71
|
+
|
|
3
72
|
## [4.18.2](https://github.com/Applitools-Dev/sdk/compare/js/core@4.18.1...js/core@4.18.2) (2024-09-10)
|
|
4
73
|
|
|
5
74
|
|
package/dist/autonomous/core.js
CHANGED
|
@@ -14,7 +14,7 @@ function makeAutonomousCore({ spec, clients, base: defaultBase, asyncCache, agen
|
|
|
14
14
|
const core = (0, core_1.makeCore)({ spec, clients, base: defaultBase, asyncCache, agentId, cwd, logger });
|
|
15
15
|
return {
|
|
16
16
|
type: 'autonomous',
|
|
17
|
-
takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ core, logger }),
|
|
17
|
+
takeSnapshots: spec && (0, take_snapshots_1.makeTakeSnapshots)({ core, spec, logger }),
|
|
18
18
|
createRenderTarget: (0, create_render_target_1.makeCreateRenderTarget)({ core, logger }),
|
|
19
19
|
startRenders: (0, start_renders_1.makeStartRenders)({ core, logger }),
|
|
20
20
|
getRenderResults: (0, get_render_results_1.makeGetRenderResults)({ core, logger }),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeCreateRenderTarget = void 0;
|
|
4
|
+
const create_render_target_from_snapshot_1 = require("../ufg/create-render-target-from-snapshot");
|
|
4
5
|
function makeCreateRenderTarget({ core, logger: defaultLogger }) {
|
|
5
6
|
return async function createRenderTarget({ snapshot, logger = defaultLogger, }) {
|
|
6
7
|
const ufgClient = await core.getUFGClient({
|
|
@@ -11,21 +12,7 @@ function makeCreateRenderTarget({ core, logger: defaultLogger }) {
|
|
|
11
12
|
},
|
|
12
13
|
logger,
|
|
13
14
|
});
|
|
14
|
-
const target = await
|
|
15
|
-
snapshot: snapshot.target,
|
|
16
|
-
settings: {
|
|
17
|
-
environment: snapshot.environment,
|
|
18
|
-
cookies: snapshot.target.cookies,
|
|
19
|
-
headers: {
|
|
20
|
-
Referer: snapshot.url,
|
|
21
|
-
'User-Agent': snapshot.userAgent,
|
|
22
|
-
...snapshot.settings.headers,
|
|
23
|
-
},
|
|
24
|
-
proxy: snapshot.account.eyesServer.proxy,
|
|
25
|
-
autProxy: snapshot.settings.autProxy,
|
|
26
|
-
},
|
|
27
|
-
logger,
|
|
28
|
-
});
|
|
15
|
+
const target = await (0, create_render_target_from_snapshot_1.createRenderTargetFromSnapshot)({ ufgClient, snapshot, logger });
|
|
29
16
|
return { ...snapshot, target };
|
|
30
17
|
};
|
|
31
18
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.makeTakeSnapshots = void 0;
|
|
4
|
+
const driver_1 = require("@applitools/driver");
|
|
4
5
|
const populate_eyes_server_settings_1 = require("../utils/populate-eyes-server-settings");
|
|
5
|
-
|
|
6
|
+
const uniquify_environments_1 = require("../automation/utils/uniquify-environments");
|
|
7
|
+
function makeTakeSnapshots({ core, spec, logger: defaultLogger }) {
|
|
6
8
|
return async function takeSnapshots({ target, settings, logger = defaultLogger, }) {
|
|
7
9
|
(0, populate_eyes_server_settings_1.populateEyesServerSettings)(settings);
|
|
8
10
|
const account = await core.base.getAccountInfo({ settings: settings, logger });
|
|
9
|
-
|
|
11
|
+
settings.environments = (0, uniquify_environments_1.uniquifyEnvironments)(settings.environments);
|
|
12
|
+
const driver = await (0, driver_1.makeDriver)({ spec, driver: target, logger });
|
|
13
|
+
return core.takeSnapshots({ driver, settings, account, logger });
|
|
10
14
|
};
|
|
11
15
|
}
|
|
12
16
|
exports.makeTakeSnapshots = makeTakeSnapshots;
|
package/dist/classic/core.js
CHANGED
|
@@ -34,10 +34,10 @@ const extract_text_1 = require("../automation/extract-text");
|
|
|
34
34
|
const get_nml_client_1 = require("../automation/get-nml-client");
|
|
35
35
|
const open_eyes_1 = require("./open-eyes");
|
|
36
36
|
const utils = __importStar(require("@applitools/utils"));
|
|
37
|
-
function makeCore({ spec, clients, base: defaultBase, concurrency, agentId = 'core-classic', cwd = process.cwd(), logger: defaultLogger, }) {
|
|
37
|
+
function makeCore({ spec, clients, base: defaultBase, concurrency, agentId = 'core-classic', cwd = process.cwd(), logger: defaultLogger, offlineLocationPath, }) {
|
|
38
38
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'core-classic' } });
|
|
39
39
|
logger.log(`Core classic is initialized ${defaultBase ? 'with' : 'without'} custom base core`);
|
|
40
|
-
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId, concurrency, cwd, logger });
|
|
40
|
+
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId, concurrency, cwd, logger, offlineLocationPath });
|
|
41
41
|
return utils.general.extend(base, core => {
|
|
42
42
|
return {
|
|
43
43
|
type: 'classic',
|
|
@@ -11,6 +11,7 @@ async function takeDomCapture({ driver, settings, logger, }) {
|
|
|
11
11
|
const arg = {
|
|
12
12
|
chunkByteLength: (_a = settings === null || settings === void 0 ? void 0 : settings.chunkByteLength) !== null && _a !== void 0 ? _a : (Number(process.env.APPLITOOLS_SCRIPT_RESULT_MAX_BYTE_LENGTH) ||
|
|
13
13
|
(environment.isIOS ? 100000 : 250 * 1024 * 1024)),
|
|
14
|
+
...settings === null || settings === void 0 ? void 0 : settings.domCaptureArgs,
|
|
14
15
|
};
|
|
15
16
|
const scripts = {
|
|
16
17
|
main: features.canExecuteOnlyFunctionScripts
|
package/dist/cli/cli.js
CHANGED
|
@@ -32,6 +32,7 @@ const core_server_1 = require("../universal/core-server");
|
|
|
32
32
|
const core_server_process_1 = require("../universal/core-server-process");
|
|
33
33
|
const logs_1 = require("../troubleshoot/logs");
|
|
34
34
|
const check_network_1 = require("../troubleshoot/check-network");
|
|
35
|
+
const run_offline_snapshots_1 = require("../run-offline-snapshots");
|
|
35
36
|
const yargs_1 = __importDefault(require("yargs"));
|
|
36
37
|
const utils = __importStar(require("@applitools/utils"));
|
|
37
38
|
const fs_1 = __importDefault(require("fs"));
|
|
@@ -151,5 +152,24 @@ yargs_1.default
|
|
|
151
152
|
handler: async () => {
|
|
152
153
|
await (0, check_network_1.checkNetwork)();
|
|
153
154
|
},
|
|
155
|
+
})
|
|
156
|
+
.command({
|
|
157
|
+
command: 'run-offline-snapshots',
|
|
158
|
+
builder: yargs => yargs
|
|
159
|
+
.options({
|
|
160
|
+
offlineLocationPath: {
|
|
161
|
+
description: 'path to offline snapshots folder',
|
|
162
|
+
type: 'string',
|
|
163
|
+
},
|
|
164
|
+
})
|
|
165
|
+
.fail((_msg, err, _yargs) => {
|
|
166
|
+
if (err) {
|
|
167
|
+
console.error(err.message);
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
}),
|
|
171
|
+
handler: async (args) => {
|
|
172
|
+
await (0, run_offline_snapshots_1.runOfflineSnapshots)(args);
|
|
173
|
+
},
|
|
154
174
|
})
|
|
155
175
|
.wrap(yargs_1.default.terminalWidth()).argv;
|
package/dist/core.js
CHANGED
|
@@ -41,6 +41,7 @@ const make_manager_1 = require("./make-manager");
|
|
|
41
41
|
const close_batch_1 = require("./close-batch");
|
|
42
42
|
const delete_test_1 = require("./delete-test");
|
|
43
43
|
const extract_test_environment_1 = require("./utils/extract-test-environment");
|
|
44
|
+
const ensure_offline_folder_1 = require("./utils/ensure-offline-folder");
|
|
44
45
|
const validate_sdk_version_1 = require("./utils/validate-sdk-version");
|
|
45
46
|
const memory_usage_logging_1 = require("./utils/memory-usage-logging");
|
|
46
47
|
const utils = __importStar(require("@applitools/utils"));
|
|
@@ -51,10 +52,11 @@ function makeCore({ spec, clients, base: defaultBase, concurrency = utils.genera
|
|
|
51
52
|
logger.log(`Core is initialized ${defaultBase ? 'with' : 'without'} custom base core and environment `, environment);
|
|
52
53
|
if (environment.sdk)
|
|
53
54
|
(0, validate_sdk_version_1.validateSdkVersion)(environment.sdk, { logger });
|
|
54
|
-
const
|
|
55
|
+
const offlineLocationPath = (0, ensure_offline_folder_1.ensureOfflineFolder)();
|
|
56
|
+
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId, concurrency, cwd, logger, offlineLocationPath });
|
|
55
57
|
const cores = {
|
|
56
|
-
ufg: (0, core_2.makeCore)({ spec, clients, base, asyncCache, logger }),
|
|
57
|
-
classic: (0, core_1.makeCore)({ spec, clients, base, logger }),
|
|
58
|
+
ufg: (0, core_2.makeCore)({ spec, clients, base, asyncCache, logger, offlineLocationPath }),
|
|
59
|
+
classic: (0, core_1.makeCore)({ spec, clients, base, logger, offlineLocationPath }),
|
|
58
60
|
};
|
|
59
61
|
return utils.general.extend(base, core => {
|
|
60
62
|
return {
|
|
@@ -76,6 +78,7 @@ function makeCore({ spec, clients, base: defaultBase, concurrency = utils.genera
|
|
|
76
78
|
environment,
|
|
77
79
|
asyncCache,
|
|
78
80
|
logger,
|
|
81
|
+
offlineLocationPath,
|
|
79
82
|
}),
|
|
80
83
|
locate: (0, locate_1.makeLocate)({ spec, core, logger }),
|
|
81
84
|
locateText: (0, locate_text_1.makeLocateText)({ spec, core, logger }),
|
package/dist/make-manager.js
CHANGED
|
@@ -30,7 +30,7 @@ const core_2 = require("./ufg/core");
|
|
|
30
30
|
const open_eyes_1 = require("./open-eyes");
|
|
31
31
|
const get_manager_results_1 = require("./get-manager-results");
|
|
32
32
|
const utils = __importStar(require("@applitools/utils"));
|
|
33
|
-
function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defaultAgentId, environment, cwd = process.cwd(), logger: mainLogger, asyncCache, }) {
|
|
33
|
+
function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defaultAgentId, environment, cwd = process.cwd(), logger: mainLogger, asyncCache, offlineLocationPath, }) {
|
|
34
34
|
return async function makeManager({ type = 'classic', settings, logger = mainLogger, } = {}) {
|
|
35
35
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
36
36
|
var _h, _j;
|
|
@@ -42,9 +42,10 @@ function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defa
|
|
|
42
42
|
(_f = (_j = settings.batch).buildId) !== null && _f !== void 0 ? _f : (_j.buildId = utils.general.getEnvValue('BATCH_BUILD_ID'));
|
|
43
43
|
(_g = settings.agentId) !== null && _g !== void 0 ? _g : (settings.agentId = type === 'ufg' ? defaultAgentId === null || defaultAgentId === void 0 ? void 0 : defaultAgentId.replace(/(\/\d)/, '.visualgrid$1') : defaultAgentId);
|
|
44
44
|
logger.log('Command "makeManager" is called with settings', settings);
|
|
45
|
-
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId: settings.agentId, concurrency: settings.concurrency, cwd, logger });
|
|
45
|
+
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId: settings.agentId, concurrency: settings.concurrency, cwd, logger, offlineLocationPath });
|
|
46
|
+
const fetchConcurrency = settings.fetchConcurrency;
|
|
46
47
|
const cores = {
|
|
47
|
-
ufg: (0, core_2.makeCore)({ spec, clients, base, fetchConcurrency
|
|
48
|
+
ufg: (0, core_2.makeCore)({ spec, clients, base, fetchConcurrency, asyncCache, logger, offlineLocationPath }),
|
|
48
49
|
classic: (0, core_1.makeCore)({ spec, clients, base, logger }),
|
|
49
50
|
};
|
|
50
51
|
const storage = [];
|
package/dist/open-eyes.js
CHANGED
|
@@ -35,6 +35,7 @@ const abort_1 = require("./abort");
|
|
|
35
35
|
const get_eyes_results_1 = require("./get-eyes-results");
|
|
36
36
|
const populate_eyes_server_settings_1 = require("./utils/populate-eyes-server-settings");
|
|
37
37
|
const utils = __importStar(require("@applitools/utils"));
|
|
38
|
+
const core_base_1 = require("@applitools/core-base");
|
|
38
39
|
function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDuplicateTests, core, cores, spec, environment, logger: mainLogger, asyncCache, }) {
|
|
39
40
|
return async function openEyes({ type = defaultType, settings, config, target, logger = mainLogger, }) {
|
|
40
41
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
@@ -98,7 +99,9 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
|
|
|
98
99
|
},
|
|
99
100
|
logger,
|
|
100
101
|
});
|
|
101
|
-
const eyes = await getTypedEyes({ logger })
|
|
102
|
+
const eyes = await getTypedEyes({ logger }).catch(error => {
|
|
103
|
+
throw refineMissingApiKeyException(error, environment === null || environment === void 0 ? void 0 : environment.sdk);
|
|
104
|
+
});
|
|
102
105
|
return utils.general.extend(eyes, eyes => {
|
|
103
106
|
var _a, _b;
|
|
104
107
|
return ({
|
|
@@ -113,6 +116,63 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, removeDup
|
|
|
113
116
|
};
|
|
114
117
|
}
|
|
115
118
|
exports.makeOpenEyes = makeOpenEyes;
|
|
119
|
+
function refineMissingApiKeyException(error, sdk) {
|
|
120
|
+
var _a;
|
|
121
|
+
if (!sdk || typeof sdk !== 'object')
|
|
122
|
+
return error;
|
|
123
|
+
try {
|
|
124
|
+
if (error instanceof core_base_1.MissingApiKeyError) {
|
|
125
|
+
const apiKeyTutorials = {
|
|
126
|
+
python: {
|
|
127
|
+
'eyes-selenium': 'api-ref/sdk-api/selenium/python/#API',
|
|
128
|
+
'eyes-playwright': 'api-ref/sdk-api/playwright/python/#API',
|
|
129
|
+
'eyes-robotframework': 'api-ref/sdk-api/robot/#API',
|
|
130
|
+
'eyes-images': undefined,
|
|
131
|
+
},
|
|
132
|
+
ruby: {
|
|
133
|
+
eyes_images: 'api-ref/sdk-api/selenium/ruby/#API',
|
|
134
|
+
eyes_appium: undefined,
|
|
135
|
+
eyes_selenium: undefined,
|
|
136
|
+
eyes_universal: undefined,
|
|
137
|
+
eyes_capybara: undefined,
|
|
138
|
+
eyes_calabash: undefined,
|
|
139
|
+
},
|
|
140
|
+
java: {
|
|
141
|
+
java_appium: undefined,
|
|
142
|
+
java_selenium: 'api-ref/sdk-api/selenium/java/#API',
|
|
143
|
+
java_playwright: 'api-ref/sdk-api/playwright/java/#API',
|
|
144
|
+
java_images: undefined,
|
|
145
|
+
},
|
|
146
|
+
dotnet: {
|
|
147
|
+
'eyes-selenium': 'api-ref/sdk-api/selenium/csharp/#API',
|
|
148
|
+
'eyes-playwright': 'api-ref/sdk-api/playwright/csharp/#API',
|
|
149
|
+
'eyes-appium': undefined,
|
|
150
|
+
'eyes-appium2': undefined,
|
|
151
|
+
'eyes-images': undefined,
|
|
152
|
+
},
|
|
153
|
+
js: {
|
|
154
|
+
'eyes-images': undefined,
|
|
155
|
+
'eyes-webdriverio': 'api-ref/sdk-api/wdio/#API',
|
|
156
|
+
'eyes-selenium': 'api-ref/sdk-api/selenium/javascript/#API',
|
|
157
|
+
'eyes-playwright': 'api-ref/sdk-api/playwright/javascript/#API',
|
|
158
|
+
'eyes-puppeteer': 'api-ref/sdk-api/puppeteer/javascript/#API',
|
|
159
|
+
'eyes-storybook': 'api-ref/sdk-api/storybook/#API',
|
|
160
|
+
'eyes-cypress': 'api-ref/sdk-api/cypress/#API',
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
const { lang, name } = sdk !== null && sdk !== void 0 ? sdk : {};
|
|
164
|
+
const path = (_a = apiKeyTutorials[lang]) === null || _a === void 0 ? void 0 : _a[name];
|
|
165
|
+
if (path) {
|
|
166
|
+
error.message = error.message.replace('Default.html#cshid=api', path);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
// if it fails, no harm done. The error message is fine without this refinement
|
|
172
|
+
return error;
|
|
173
|
+
}
|
|
174
|
+
return error;
|
|
175
|
+
}
|
|
116
176
|
function getLatestCommitInfoFromEnvVars(logger) {
|
|
117
177
|
const timestamp = utils.general.getEnvValue('GIT_LATEST_COMMIT_TIMESTAMP');
|
|
118
178
|
const sha = utils.general.getEnvValue('GIT_LATEST_COMMIT_SHA');
|