@applitools/core 4.14.0 → 4.15.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 +22 -0
- package/dist/open-eyes.js +27 -12
- package/package.json +4 -4
- package/types/open-eyes.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.15.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.14.0...js/core@4.15.0) (2024-05-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* expose git latest commit info in env vars ([#2349](https://github.com/Applitools-Dev/sdk/issues/2349)) ([1db248c](https://github.com/Applitools-Dev/sdk/commit/1db248c83ee1cbc83f905163fe5bd63dd5e293c2))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/dom-capture bumped to 11.2.7
|
|
14
|
+
#### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* capture user input from input elements ([#2347](https://github.com/Applitools-Dev/sdk/issues/2347)) ([f82d3bb](https://github.com/Applitools-Dev/sdk/commit/f82d3bbc79c624ab7e8eeade7559b523f6adfeac))
|
|
17
|
+
* @applitools/ec-client bumped to 1.8.5
|
|
18
|
+
|
|
19
|
+
* @applitools/core-base bumped to 1.14.0
|
|
20
|
+
#### Features
|
|
21
|
+
|
|
22
|
+
* expose git latest commit info in env vars ([#2349](https://github.com/Applitools-Dev/sdk/issues/2349)) ([1db248c](https://github.com/Applitools-Dev/sdk/commit/1db248c83ee1cbc83f905163fe5bd63dd5e293c2))
|
|
23
|
+
* long eyes requests with custom domain ([#2343](https://github.com/Applitools-Dev/sdk/issues/2343)) ([d54beea](https://github.com/Applitools-Dev/sdk/commit/d54beea8c33a56a0516904773daaa5095340fd12))
|
|
24
|
+
|
|
3
25
|
## [4.14.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.13.1...js/core@4.14.0) (2024-05-01)
|
|
4
26
|
|
|
5
27
|
|
package/dist/open-eyes.js
CHANGED
|
@@ -37,26 +37,27 @@ const populate_eyes_server_settings_1 = require("./utils/populate-eyes-server-se
|
|
|
37
37
|
const utils = __importStar(require("@applitools/utils"));
|
|
38
38
|
function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cores, spec, environment, logger: mainLogger, asyncCache, }) {
|
|
39
39
|
return async function openEyes({ type = defaultType, settings, config, target, logger = mainLogger, }) {
|
|
40
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
41
|
-
var
|
|
40
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
41
|
+
var _u, _v, _w, _x, _y;
|
|
42
42
|
logger = logger.extend(mainLogger, { tags: [`eyes-${type}-${utils.general.shortid()}`] });
|
|
43
43
|
settings = { ...config === null || config === void 0 ? void 0 : config.open, ...settings };
|
|
44
44
|
(0, populate_eyes_server_settings_1.populateEyesServerSettings)(settings);
|
|
45
45
|
(_a = settings.userTestId) !== null && _a !== void 0 ? _a : (settings.userTestId = `${settings.testName}--${utils.general.guid()}`);
|
|
46
46
|
settings.batch = { ...batch, ...settings.batch };
|
|
47
|
-
(_b = (
|
|
48
|
-
(_d = (
|
|
49
|
-
(_e = (
|
|
50
|
-
(_f = (
|
|
51
|
-
(_g = (
|
|
47
|
+
(_b = (_u = settings.batch).id) !== null && _b !== void 0 ? _b : (_u.id = (_c = utils.general.getEnvValue('BATCH_ID')) !== null && _c !== void 0 ? _c : `generated-${utils.general.guid()}`);
|
|
48
|
+
(_d = (_v = settings.batch).buildId) !== null && _d !== void 0 ? _d : (_v.buildId = utils.general.getEnvValue('BATCH_BUILD_ID'));
|
|
49
|
+
(_e = (_w = settings.batch).name) !== null && _e !== void 0 ? _e : (_w.name = utils.general.getEnvValue('BATCH_NAME'));
|
|
50
|
+
(_f = (_x = settings.batch).sequenceName) !== null && _f !== void 0 ? _f : (_x.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE'));
|
|
51
|
+
(_g = (_y = settings.batch).notifyOnCompletion) !== null && _g !== void 0 ? _g : (_y.notifyOnCompletion = utils.general.getEnvValue('BATCH_NOTIFY', 'boolean'));
|
|
52
52
|
(_h = settings.keepBatchOpen) !== null && _h !== void 0 ? _h : (settings.keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean'));
|
|
53
53
|
(_j = settings.branchName) !== null && _j !== void 0 ? _j : (settings.branchName = utils.general.getEnvValue('BRANCH'));
|
|
54
54
|
(_k = settings.parentBranchName) !== null && _k !== void 0 ? _k : (settings.parentBranchName = utils.general.getEnvValue('PARENT_BRANCH'));
|
|
55
55
|
(_l = settings.baselineBranchName) !== null && _l !== void 0 ? _l : (settings.baselineBranchName = utils.general.getEnvValue('BASELINE_BRANCH'));
|
|
56
56
|
(_m = settings.gitBranchingTimestamp) !== null && _m !== void 0 ? _m : (settings.gitBranchingTimestamp = utils.general.getEnvValue('GIT_MERGE_BASE_TIMESTAMP'));
|
|
57
|
-
(_o = settings.
|
|
58
|
-
(_p = settings.
|
|
59
|
-
(_q = settings.
|
|
57
|
+
(_o = settings.latestCommitInfo) !== null && _o !== void 0 ? _o : (settings.latestCommitInfo = getLatestCommitInfoFromEnvVars(logger));
|
|
58
|
+
(_p = settings.ufgServerUrl) !== null && _p !== void 0 ? _p : (settings.ufgServerUrl = utils.general.getEnvValue('UFG_SERVER_URL'));
|
|
59
|
+
(_q = settings.ignoreBaseline) !== null && _q !== void 0 ? _q : (settings.ignoreBaseline = false);
|
|
60
|
+
(_r = settings.compareWithParentBranch) !== null && _r !== void 0 ? _r : (settings.compareWithParentBranch = false);
|
|
60
61
|
const driver = target && (await (0, driver_1.makeDriver)({ spec, driver: target, logger, customConfig: settings }));
|
|
61
62
|
const driverEnvironment = await (driver === null || driver === void 0 ? void 0 : driver.getEnvironment());
|
|
62
63
|
const driverUrl = await (driver === null || driver === void 0 ? void 0 : driver.getDriverUrl());
|
|
@@ -67,7 +68,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cor
|
|
|
67
68
|
event: {
|
|
68
69
|
type: 'openEyes',
|
|
69
70
|
userTestId: settings.userTestId,
|
|
70
|
-
concurrency: (
|
|
71
|
+
concurrency: (_s = cores === null || cores === void 0 ? void 0 : cores[type].concurrency) !== null && _s !== void 0 ? _s : core.concurrency,
|
|
71
72
|
environment,
|
|
72
73
|
driver: {
|
|
73
74
|
deviceName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.deviceName,
|
|
@@ -75,7 +76,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cor
|
|
|
75
76
|
browserVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.browserVersion,
|
|
76
77
|
platformName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformName,
|
|
77
78
|
platformVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformVersion,
|
|
78
|
-
isApplitoolsLib: (
|
|
79
|
+
isApplitoolsLib: (_t = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _t === void 0 ? void 0 : _t.instrumented,
|
|
79
80
|
isEC: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.isEC,
|
|
80
81
|
},
|
|
81
82
|
driverUrl,
|
|
@@ -108,3 +109,17 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cor
|
|
|
108
109
|
};
|
|
109
110
|
}
|
|
110
111
|
exports.makeOpenEyes = makeOpenEyes;
|
|
112
|
+
function getLatestCommitInfoFromEnvVars(logger) {
|
|
113
|
+
const timestamp = utils.general.getEnvValue('GIT_LATEST_COMMIT_TIMESTAMP');
|
|
114
|
+
const sha = utils.general.getEnvValue('GIT_LATEST_COMMIT_SHA');
|
|
115
|
+
if (timestamp && sha) {
|
|
116
|
+
return { timestamp, sha };
|
|
117
|
+
}
|
|
118
|
+
else if (timestamp && !sha) {
|
|
119
|
+
logger.warn(`APPLITOOLS_GIT_LATEST_COMMIT_TIMESTAMP was provided without APPLITOOLS_GIT_LATEST_COMMIT_SHA. Proceeding provided timestamp ${timestamp} and NO_SHA_PROVIDED`);
|
|
120
|
+
return { timestamp, sha: 'NO_SHA_PROVIDED' };
|
|
121
|
+
}
|
|
122
|
+
else if (sha && !timestamp) {
|
|
123
|
+
logger.warn(`APPLITOOLS_GIT_LATEST_COMMIT_SHA was provided without APPLITOOLS_GIT_LATEST_COMMIT_TIMESTAMP. Not populating latestCommitInfo with the provided sha ${sha}.`);
|
|
124
|
+
}
|
|
125
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.15.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@applitools/core-base": "1.
|
|
78
|
-
"@applitools/dom-capture": "11.2.
|
|
77
|
+
"@applitools/core-base": "1.14.0",
|
|
78
|
+
"@applitools/dom-capture": "11.2.7",
|
|
79
79
|
"@applitools/dom-snapshot": "4.11.1",
|
|
80
80
|
"@applitools/driver": "1.17.2",
|
|
81
|
-
"@applitools/ec-client": "1.8.
|
|
81
|
+
"@applitools/ec-client": "1.8.5",
|
|
82
82
|
"@applitools/logger": "2.0.16",
|
|
83
83
|
"@applitools/nml-client": "1.8.4",
|
|
84
84
|
"@applitools/req": "1.6.7",
|
package/types/open-eyes.d.ts
CHANGED