@applitools/core 4.5.2 → 4.6.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 +36 -0
- package/dist/classic/get-base-eyes.js +2 -0
- package/dist/classic/open-eyes.js +2 -2
- package/dist/classic/utils/extract-default-environments.js +1 -0
- package/dist/make-manager.js +1 -1
- package/dist/open-eyes.js +11 -10
- package/dist/ufg/get-base-eyes.js +2 -0
- package/dist/ufg/open-eyes.js +2 -2
- package/package.json +5 -5
- package/types/automation/types.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.6.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/core@4.5.2...js/core@4.6.0) (2024-01-16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* added possibility to provide `fallbackBaselineId` in environment objects ([#2146](https://github.com/applitools/eyes.sdk.javascript1/issues/2146)) ([f0782ea](https://github.com/applitools/eyes.sdk.javascript1/commit/f0782ea4c38935f97fc47248ed6a5b67f87b0634))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add environment variable for setting ufg server ufg ([#2147](https://github.com/applitools/eyes.sdk.javascript1/issues/2147)) ([cfc701f](https://github.com/applitools/eyes.sdk.javascript1/commit/cfc701f7a43fed0fe252d4090b9c1dc490063c76))
|
|
14
|
+
* remove local environment id ([#2152](https://github.com/applitools/eyes.sdk.javascript1/issues/2152)) ([59aaeae](https://github.com/applitools/eyes.sdk.javascript1/commit/59aaeaed474fbde78b76ae7ac803960e3ecd8166))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* @applitools/dom-snapshot bumped to 4.7.16
|
|
20
|
+
#### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* handle unparsable values of media attribute in dom snapshot ([a2afe2e](https://github.com/applitools/eyes.sdk.javascript1/commit/a2afe2e18508f44f9c046270da0c1e09fb9aea03))
|
|
23
|
+
* @applitools/nml-client bumped to 1.6.4
|
|
24
|
+
#### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* remove local environment id ([#2152](https://github.com/applitools/eyes.sdk.javascript1/issues/2152)) ([59aaeae](https://github.com/applitools/eyes.sdk.javascript1/commit/59aaeaed474fbde78b76ae7ac803960e3ecd8166))
|
|
27
|
+
* @applitools/ec-client bumped to 1.7.22
|
|
28
|
+
|
|
29
|
+
* @applitools/core-base bumped to 1.9.0
|
|
30
|
+
#### Features
|
|
31
|
+
|
|
32
|
+
* added possibility to provide `fallbackBaselineId` in environment objects ([#2146](https://github.com/applitools/eyes.sdk.javascript1/issues/2146)) ([f0782ea](https://github.com/applitools/eyes.sdk.javascript1/commit/f0782ea4c38935f97fc47248ed6a5b67f87b0634))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
#### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* add environment variable for setting ufg server ufg ([#2147](https://github.com/applitools/eyes.sdk.javascript1/issues/2147)) ([cfc701f](https://github.com/applitools/eyes.sdk.javascript1/commit/cfc701f7a43fed0fe252d4090b9c1dc490063c76))
|
|
38
|
+
|
|
3
39
|
## [4.5.2](https://github.com/applitools/eyes.sdk.javascript1/compare/js/core@4.5.1...js/core@4.5.2) (2024-01-02)
|
|
4
40
|
|
|
5
41
|
|
|
@@ -40,11 +40,13 @@ function makeGetBaseEyes({ settings: defaultSettings, eyes, logger: mainLogger,
|
|
|
40
40
|
});
|
|
41
41
|
return getBaseEyesWithCache;
|
|
42
42
|
async function getBaseEyes({ settings, logger = mainLogger, }) {
|
|
43
|
+
var _a;
|
|
43
44
|
logger = logger.extend(mainLogger);
|
|
44
45
|
logger.log(`Command "getBaseEyes" is called with settings`, settings);
|
|
45
46
|
return eyes.core.base.openEyes({
|
|
46
47
|
settings: {
|
|
47
48
|
...defaultSettings,
|
|
49
|
+
fallbackBaselineId: (_a = settings.environment) === null || _a === void 0 ? void 0 : _a.fallbackBaselineId,
|
|
48
50
|
environment: { ...defaultSettings.environment, ...settings.environment },
|
|
49
51
|
},
|
|
50
52
|
logger,
|
|
@@ -54,7 +54,7 @@ function makeOpenEyes({ core, spec, logger: mainLogger }) {
|
|
|
54
54
|
const controller = new abort_controller_1.AbortController();
|
|
55
55
|
const account = await core.getAccountInfo({ settings, logger });
|
|
56
56
|
return utils.general.extend({}, eyes => {
|
|
57
|
-
var _a;
|
|
57
|
+
var _a, _b, _c;
|
|
58
58
|
return {
|
|
59
59
|
type: 'classic',
|
|
60
60
|
core,
|
|
@@ -63,7 +63,7 @@ function makeOpenEyes({ core, spec, logger: mainLogger }) {
|
|
|
63
63
|
batchId: (_a = settings.batch) === null || _a === void 0 ? void 0 : _a.id,
|
|
64
64
|
keepBatchOpen: settings.keepBatchOpen,
|
|
65
65
|
eyesServer: account.eyesServer,
|
|
66
|
-
ufgServer: account.ufgServer,
|
|
66
|
+
ufgServer: { ...account.ufgServer, ufgServerUrl: (_b = settings.ufgServerUrl) !== null && _b !== void 0 ? _b : (_c = account.ufgServer) === null || _c === void 0 ? void 0 : _c.ufgServerUrl },
|
|
67
67
|
uploadUrl: account.uploadUrl,
|
|
68
68
|
stitchingServiceUrl: account.stitchingServiceUrl,
|
|
69
69
|
supportedEnvironmentsUrl: account.supportedEnvironmentsUrl,
|
|
@@ -36,6 +36,7 @@ async function extractDefaultEnvironments({ driver, settings, }) {
|
|
|
36
36
|
const viewport = await driver.getViewport();
|
|
37
37
|
const size = await driver.getViewportSize();
|
|
38
38
|
environment.viewportSize = utils.geometry.scale(size, viewport.viewportScale);
|
|
39
|
+
environment.environmentId = utils.general.guid();
|
|
39
40
|
if (driverEnvironment.isEC)
|
|
40
41
|
environment.ecSessionId = (_a = (await driver.getSessionId())) !== null && _a !== void 0 ? _a : undefined;
|
|
41
42
|
if (driverEnvironment.isWeb)
|
package/dist/make-manager.js
CHANGED
|
@@ -36,7 +36,7 @@ function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defa
|
|
|
36
36
|
var _g;
|
|
37
37
|
logger = logger.extend(mainLogger, { tags: [`manager-${type}-${utils.general.shortid()}`] });
|
|
38
38
|
settings !== null && settings !== void 0 ? settings : (settings = {});
|
|
39
|
-
(_a = settings.concurrency) !== null && _a !== void 0 ? _a : (settings.concurrency = (_b = utils.general.getEnvValue('CONCURRENCY', 'number')) !== null && _b !== void 0 ? _b : (utils.types.isInteger(settings.legacyConcurrency) ? settings.legacyConcurrency * 5 :
|
|
39
|
+
(_a = settings.concurrency) !== null && _a !== void 0 ? _a : (settings.concurrency = (_b = utils.general.getEnvValue('CONCURRENCY', 'number')) !== null && _b !== void 0 ? _b : (utils.types.isInteger(settings.legacyConcurrency) ? settings.legacyConcurrency * 5 : 100));
|
|
40
40
|
(_c = settings.batch) !== null && _c !== void 0 ? _c : (settings.batch = {});
|
|
41
41
|
(_d = (_g = settings.batch).id) !== null && _d !== void 0 ? _d : (_g.id = (_e = utils.general.getEnvValue('BATCH_ID')) !== null && _e !== void 0 ? _e : `generated-${utils.general.guid()}`);
|
|
42
42
|
(_f = settings.agentId) !== null && _f !== void 0 ? _f : (settings.agentId = type === 'ufg' ? defaultAgentId === null || defaultAgentId === void 0 ? void 0 : defaultAgentId.replace(/(\/\d)/, '.visualgrid$1') : defaultAgentId);
|
package/dist/open-eyes.js
CHANGED
|
@@ -36,8 +36,8 @@ const get_eyes_results_1 = require("./get-eyes-results");
|
|
|
36
36
|
const utils = __importStar(require("@applitools/utils"));
|
|
37
37
|
function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cores, spec, environment, logger: mainLogger, asyncCache, }) {
|
|
38
38
|
return async function openEyes({ type = defaultType, settings, config, target, logger = mainLogger, }) {
|
|
39
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
40
|
-
var
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
40
|
+
var _w, _x, _y, _z;
|
|
41
41
|
logger = logger.extend(mainLogger, { tags: [`eyes-${type}-${utils.general.shortid()}`] });
|
|
42
42
|
settings = { ...config === null || config === void 0 ? void 0 : config.open, ...settings };
|
|
43
43
|
(_a = settings.userTestId) !== null && _a !== void 0 ? _a : (settings.userTestId = `${settings.testName}--${utils.general.guid()}`);
|
|
@@ -45,16 +45,17 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cor
|
|
|
45
45
|
(_e = settings.apiKey) !== null && _e !== void 0 ? _e : (settings.apiKey = utils.general.getEnvValue('API_KEY'));
|
|
46
46
|
(_f = settings.useDnsCache) !== null && _f !== void 0 ? _f : (settings.useDnsCache = utils.general.getEnvValue('USE_DNS_CACHE', 'boolean'));
|
|
47
47
|
settings.batch = { ...batch, ...settings.batch };
|
|
48
|
-
(_g = (
|
|
49
|
-
(_j = (
|
|
50
|
-
(_k = (
|
|
51
|
-
(_l = (
|
|
48
|
+
(_g = (_w = settings.batch).id) !== null && _g !== void 0 ? _g : (_w.id = (_h = utils.general.getEnvValue('BATCH_ID')) !== null && _h !== void 0 ? _h : `generated-${utils.general.guid()}`);
|
|
49
|
+
(_j = (_x = settings.batch).name) !== null && _j !== void 0 ? _j : (_x.name = utils.general.getEnvValue('BATCH_NAME'));
|
|
50
|
+
(_k = (_y = settings.batch).sequenceName) !== null && _k !== void 0 ? _k : (_y.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE'));
|
|
51
|
+
(_l = (_z = settings.batch).notifyOnCompletion) !== null && _l !== void 0 ? _l : (_z.notifyOnCompletion = utils.general.getEnvValue('BATCH_NOTIFY', 'boolean'));
|
|
52
52
|
(_m = settings.keepBatchOpen) !== null && _m !== void 0 ? _m : (settings.keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean'));
|
|
53
53
|
(_o = settings.branchName) !== null && _o !== void 0 ? _o : (settings.branchName = utils.general.getEnvValue('BRANCH'));
|
|
54
54
|
(_p = settings.parentBranchName) !== null && _p !== void 0 ? _p : (settings.parentBranchName = utils.general.getEnvValue('PARENT_BRANCH'));
|
|
55
55
|
(_q = settings.baselineBranchName) !== null && _q !== void 0 ? _q : (settings.baselineBranchName = utils.general.getEnvValue('BASELINE_BRANCH'));
|
|
56
|
-
(_r = settings.
|
|
57
|
-
(_s = settings.
|
|
56
|
+
(_r = settings.ufgServerUrl) !== null && _r !== void 0 ? _r : (settings.ufgServerUrl = utils.general.getEnvValue('UFG_SERVER_URL'));
|
|
57
|
+
(_s = settings.ignoreBaseline) !== null && _s !== void 0 ? _s : (settings.ignoreBaseline = false);
|
|
58
|
+
(_t = settings.compareWithParentBranch) !== null && _t !== void 0 ? _t : (settings.compareWithParentBranch = false);
|
|
58
59
|
const driver = target && (await (0, driver_1.makeDriver)({ spec, driver: target, logger, customConfig: settings }));
|
|
59
60
|
const driverEnvironment = await (driver === null || driver === void 0 ? void 0 : driver.getEnvironment());
|
|
60
61
|
const driverUrl = await (driver === null || driver === void 0 ? void 0 : driver.getDriverUrl());
|
|
@@ -65,7 +66,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cor
|
|
|
65
66
|
event: {
|
|
66
67
|
type: 'openEyes',
|
|
67
68
|
userTestId: settings.userTestId,
|
|
68
|
-
concurrency: (
|
|
69
|
+
concurrency: (_u = cores === null || cores === void 0 ? void 0 : cores[type].concurrency) !== null && _u !== void 0 ? _u : core.concurrency,
|
|
69
70
|
environment,
|
|
70
71
|
driver: {
|
|
71
72
|
deviceName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.deviceName,
|
|
@@ -73,7 +74,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, batch, core, cor
|
|
|
73
74
|
browserVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.browserVersion,
|
|
74
75
|
platformName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformName,
|
|
75
76
|
platformVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformVersion,
|
|
76
|
-
isApplitoolsLib: (
|
|
77
|
+
isApplitoolsLib: (_v = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _v === void 0 ? void 0 : _v.instrumented,
|
|
77
78
|
isEC: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.isEC,
|
|
78
79
|
},
|
|
79
80
|
driverUrl,
|
|
@@ -39,6 +39,7 @@ function makeGetBaseEyes({ settings: defaultSettings, eyes, logger: mainLogger,
|
|
|
39
39
|
});
|
|
40
40
|
return getBaseEyesWithCache;
|
|
41
41
|
async function getBaseEyes({ settings, logger = mainLogger, }) {
|
|
42
|
+
var _a;
|
|
42
43
|
logger = logger.extend(mainLogger);
|
|
43
44
|
logger.log(`Command "getBaseEyes" is called with settings`, settings);
|
|
44
45
|
const ufgClient = await eyes.core.getUFGClient({
|
|
@@ -56,6 +57,7 @@ function makeGetBaseEyes({ settings: defaultSettings, eyes, logger: mainLogger,
|
|
|
56
57
|
return eyes.core.base.openEyes({
|
|
57
58
|
settings: {
|
|
58
59
|
...defaultSettings,
|
|
60
|
+
fallbackBaselineId: (_a = settings.environment) === null || _a === void 0 ? void 0 : _a.fallbackBaselineId,
|
|
59
61
|
environment: { ...defaultSettings.environment, ...environment, properties: settings.environment.properties },
|
|
60
62
|
},
|
|
61
63
|
logger,
|
package/dist/ufg/open-eyes.js
CHANGED
|
@@ -54,7 +54,7 @@ function makeOpenEyes({ core, spec, logger: mainLogger }) {
|
|
|
54
54
|
const controller = new abort_controller_1.AbortController();
|
|
55
55
|
const account = await core.getAccountInfo({ settings, logger });
|
|
56
56
|
return utils.general.extend({}, eyes => {
|
|
57
|
-
var _a;
|
|
57
|
+
var _a, _b, _c;
|
|
58
58
|
return {
|
|
59
59
|
type: 'ufg',
|
|
60
60
|
core,
|
|
@@ -63,7 +63,7 @@ function makeOpenEyes({ core, spec, logger: mainLogger }) {
|
|
|
63
63
|
batchId: (_a = settings.batch) === null || _a === void 0 ? void 0 : _a.id,
|
|
64
64
|
keepBatchOpen: settings.keepBatchOpen,
|
|
65
65
|
eyesServer: account.eyesServer,
|
|
66
|
-
ufgServer: account.ufgServer,
|
|
66
|
+
ufgServer: { ...account.ufgServer, ufgServerUrl: (_b = settings.ufgServerUrl) !== null && _b !== void 0 ? _b : (_c = account.ufgServer) === null || _c === void 0 ? void 0 : _c.ufgServerUrl },
|
|
67
67
|
uploadUrl: account.uploadUrl,
|
|
68
68
|
stitchingServiceUrl: account.stitchingServiceUrl,
|
|
69
69
|
supportedEnvironmentsUrl: account.supportedEnvironmentsUrl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@applitools/core-base": "1.
|
|
77
|
+
"@applitools/core-base": "1.9.0",
|
|
78
78
|
"@applitools/dom-capture": "11.2.5",
|
|
79
|
-
"@applitools/dom-snapshot": "4.7.
|
|
79
|
+
"@applitools/dom-snapshot": "4.7.16",
|
|
80
80
|
"@applitools/driver": "1.16.1",
|
|
81
|
-
"@applitools/ec-client": "1.7.
|
|
81
|
+
"@applitools/ec-client": "1.7.22",
|
|
82
82
|
"@applitools/logger": "2.0.14",
|
|
83
|
-
"@applitools/nml-client": "1.6.
|
|
83
|
+
"@applitools/nml-client": "1.6.4",
|
|
84
84
|
"@applitools/req": "1.6.4",
|
|
85
85
|
"@applitools/screenshoter": "3.8.20",
|
|
86
86
|
"@applitools/snippets": "2.4.24",
|
|
@@ -34,10 +34,12 @@ export interface AndroidDeviceEnvironment {
|
|
|
34
34
|
export type RenderEnvironment = (DesktopBrowserEnvironment | ChromeEmulationDeviceEnvironment | IOSDeviceEnvironment | AndroidDeviceEnvironment) & {
|
|
35
35
|
environmentId?: string;
|
|
36
36
|
properties?: BaseCore.CustomProperty[];
|
|
37
|
+
fallbackBaselineId?: string;
|
|
37
38
|
};
|
|
38
39
|
export type ExactEnvironment = BaseCore.Environment & {
|
|
39
40
|
environmentId?: string;
|
|
40
41
|
requested?: RenderEnvironment;
|
|
42
|
+
fallbackBaselineId?: string;
|
|
41
43
|
};
|
|
42
44
|
export type Environment = RenderEnvironment | ExactEnvironment;
|
|
43
45
|
export interface Core<TSpec extends SpecType> extends BaseCore.Core {
|