@applitools/core 4.5.0 → 4.5.2
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 +84 -0
- package/dist/classic/core.js +3 -3
- package/dist/classic/utils/extract-default-environments.js +23 -21
- package/dist/core.js +4 -14
- package/dist/make-manager.js +12 -8
- package/dist/open-eyes.js +10 -10
- package/dist/troubleshoot/eyes.js +1 -1
- package/dist/ufg/core.js +3 -3
- package/dist/universal/core.js +3 -0
- package/package.json +11 -11
- package/types/classic/core.d.ts +1 -1
- package/types/core.d.ts +3 -3
- package/types/make-manager.d.ts +1 -2
- package/types/open-eyes.d.ts +1 -2
- package/types/types.d.ts +3 -0
- package/types/ufg/core.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [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
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* environment for each check for local environment ([#2135](https://github.com/applitools/eyes.sdk.javascript1/issues/2135)) ([f3a4483](https://github.com/applitools/eyes.sdk.javascript1/commit/f3a44831d41e190aa259367b17e930e7b6f39a04))
|
|
9
|
+
* fixed concurrency splank logging ([#2115](https://github.com/applitools/eyes.sdk.javascript1/issues/2115)) ([83afd7d](https://github.com/applitools/eyes.sdk.javascript1/commit/83afd7dd2b52125fdc233dadbaf774811ea1c738))
|
|
10
|
+
* fixed the issue when custom os name passed through configuration wasn't respected ([359fc0d](https://github.com/applitools/eyes.sdk.javascript1/commit/359fc0df5a9400312605bb9e8842784b7a05ba7d))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Dependencies
|
|
14
|
+
|
|
15
|
+
* @applitools/dom-shared bumped to 1.0.12
|
|
16
|
+
#### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* fix error handling in process page poll ([#2127](https://github.com/applitools/eyes.sdk.javascript1/issues/2127)) ([4346026](https://github.com/applitools/eyes.sdk.javascript1/commit/4346026d567b92747df5b4f13fb1e82b849a856e))
|
|
19
|
+
* @applitools/dom-snapshot bumped to 4.7.15
|
|
20
|
+
#### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* fix error handling in process page poll ([#2127](https://github.com/applitools/eyes.sdk.javascript1/issues/2127)) ([4346026](https://github.com/applitools/eyes.sdk.javascript1/commit/4346026d567b92747df5b4f13fb1e82b849a856e))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
* @applitools/nml-client bumped to 1.6.3
|
|
27
|
+
#### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* environment for each check for local environment ([#2135](https://github.com/applitools/eyes.sdk.javascript1/issues/2135)) ([f3a4483](https://github.com/applitools/eyes.sdk.javascript1/commit/f3a44831d41e190aa259367b17e930e7b6f39a04))
|
|
30
|
+
* @applitools/dom-capture bumped to 11.2.5
|
|
31
|
+
|
|
32
|
+
* @applitools/ec-client bumped to 1.7.21
|
|
33
|
+
|
|
34
|
+
* @applitools/core-base bumped to 1.8.0
|
|
35
|
+
#### Features
|
|
36
|
+
|
|
37
|
+
* sorted result regions of locate method ([ef6b249](https://github.com/applitools/eyes.sdk.javascript1/commit/ef6b249ad9d6998d6089423efd93f0220f13d378))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
#### Bug Fixes
|
|
41
|
+
|
|
42
|
+
* fixed concurrency splank logging ([#2115](https://github.com/applitools/eyes.sdk.javascript1/issues/2115)) ([83afd7d](https://github.com/applitools/eyes.sdk.javascript1/commit/83afd7dd2b52125fdc233dadbaf774811ea1c738))
|
|
43
|
+
|
|
44
|
+
## [4.5.1](https://github.com/applitools/eyes.sdk.javascript1/compare/js/core@4.5.0...js/core@4.5.1) (2023-12-19)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* avoid caching concurrency ([#2103](https://github.com/applitools/eyes.sdk.javascript1/issues/2103)) ([34db2e9](https://github.com/applitools/eyes.sdk.javascript1/commit/34db2e9c554b0851b18b514b1a8a82b83ff310cd))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Dependencies
|
|
53
|
+
|
|
54
|
+
* @applitools/spec-driver-webdriver bumped to 1.0.54
|
|
55
|
+
#### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* fixed extraction of the driver server url ([ddc6449](https://github.com/applitools/eyes.sdk.javascript1/commit/ddc6449fc72166ab26c99e9ba7bb83c05fd591d6))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
* @applitools/spec-driver-selenium bumped to 1.5.68
|
|
62
|
+
|
|
63
|
+
* @applitools/spec-driver-puppeteer bumped to 1.3.4
|
|
64
|
+
|
|
65
|
+
* @applitools/driver bumped to 1.16.1
|
|
66
|
+
#### Bug Fixes
|
|
67
|
+
|
|
68
|
+
* fixed bug with screenshot not being properly scaled on ios devices with appium 2 ([#2092](https://github.com/applitools/eyes.sdk.javascript1/issues/2092)) ([26678bf](https://github.com/applitools/eyes.sdk.javascript1/commit/26678bfe254def506ea82e6a645519d6567fb3fd))
|
|
69
|
+
* fixed extraction of the driver server url ([ddc6449](https://github.com/applitools/eyes.sdk.javascript1/commit/ddc6449fc72166ab26c99e9ba7bb83c05fd591d6))
|
|
70
|
+
* fixed infinite loop that may appear during attribute extraction ([#2102](https://github.com/applitools/eyes.sdk.javascript1/issues/2102)) ([6bef680](https://github.com/applitools/eyes.sdk.javascript1/commit/6bef680fbd2d5c26a46cf2a4f00bd083d1d02109))
|
|
71
|
+
* @applitools/screenshoter bumped to 3.8.20
|
|
72
|
+
#### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* fixed bug with screenshot not being properly scaled on ios devices with appium 2 ([#2092](https://github.com/applitools/eyes.sdk.javascript1/issues/2092)) ([26678bf](https://github.com/applitools/eyes.sdk.javascript1/commit/26678bfe254def506ea82e6a645519d6567fb3fd))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
* @applitools/nml-client bumped to 1.6.2
|
|
79
|
+
|
|
80
|
+
* @applitools/ec-client bumped to 1.7.20
|
|
81
|
+
|
|
82
|
+
* @applitools/core-base bumped to 1.7.5
|
|
83
|
+
#### Bug Fixes
|
|
84
|
+
|
|
85
|
+
* avoid caching concurrency ([#2103](https://github.com/applitools/eyes.sdk.javascript1/issues/2103)) ([34db2e9](https://github.com/applitools/eyes.sdk.javascript1/commit/34db2e9c554b0851b18b514b1a8a82b83ff310cd))
|
|
86
|
+
|
|
3
87
|
## [4.5.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/core@4.4.0...js/core@4.5.0) (2023-12-18)
|
|
4
88
|
|
|
5
89
|
|
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, 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, }) {
|
|
38
38
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'core-classic' } });
|
|
39
|
-
logger.log(`Core classic is initialized ${
|
|
40
|
-
base !== null &&
|
|
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 });
|
|
41
41
|
return utils.general.extend(base, core => {
|
|
42
42
|
return {
|
|
43
43
|
type: 'classic',
|
|
@@ -26,10 +26,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.extractDefaultEnvironments = void 0;
|
|
27
27
|
const utils = __importStar(require("@applitools/utils"));
|
|
28
28
|
async function extractDefaultEnvironments({ driver, settings, }) {
|
|
29
|
-
var _a, _b
|
|
30
|
-
const environment = {};
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const environment = { ...settings === null || settings === void 0 ? void 0 : settings.environment };
|
|
31
31
|
if (!driver)
|
|
32
|
-
return [
|
|
32
|
+
return [environment];
|
|
33
33
|
const currentContext = driver.currentContext;
|
|
34
34
|
try {
|
|
35
35
|
const driverEnvironment = await driver.getEnvironment();
|
|
@@ -37,29 +37,31 @@ async function extractDefaultEnvironments({ driver, settings, }) {
|
|
|
37
37
|
const size = await driver.getViewportSize();
|
|
38
38
|
environment.viewportSize = utils.geometry.scale(size, viewport.viewportScale);
|
|
39
39
|
if (driverEnvironment.isEC)
|
|
40
|
-
environment.ecSessionId = (
|
|
40
|
+
environment.ecSessionId = (_a = (await driver.getSessionId())) !== null && _a !== void 0 ? _a : undefined;
|
|
41
41
|
if (driverEnvironment.isWeb)
|
|
42
42
|
environment.userAgent = await driver.getUserAgentLegacy();
|
|
43
|
-
if (driverEnvironment.deviceName)
|
|
43
|
+
if (!environment.deviceName && driverEnvironment.deviceName)
|
|
44
44
|
environment.deviceName = driverEnvironment.deviceName;
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (
|
|
51
|
-
environment.os
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
environment.os
|
|
45
|
+
if (!environment.os) {
|
|
46
|
+
if (driverEnvironment.isNative && driverEnvironment.platformName) {
|
|
47
|
+
environment.os = driverEnvironment.platformName;
|
|
48
|
+
if (driverEnvironment.platformVersion)
|
|
49
|
+
environment.os += ` ${driverEnvironment.platformVersion}`;
|
|
50
|
+
if (!(settings === null || settings === void 0 ? void 0 : settings.keepPlatformNameAsIs)) {
|
|
51
|
+
if (/^android/i.test(environment.os)) {
|
|
52
|
+
environment.os = `Android${environment.os.slice(7)}`;
|
|
53
|
+
}
|
|
54
|
+
if (/^ios/i.test(environment.os)) {
|
|
55
|
+
environment.os = `iOS${environment.os.slice(3)}`;
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
else if (driverEnvironment.isReliable &&
|
|
60
|
+
driverEnvironment.isChromium &&
|
|
61
|
+
((driverEnvironment.isWindows && Number.parseInt(driverEnvironment.browserVersion) >= 107) ||
|
|
62
|
+
(driverEnvironment.isMac && Number.parseInt(driverEnvironment.browserVersion) >= 90))) {
|
|
63
|
+
environment.os = `${driverEnvironment.platformName} ${(_b = driverEnvironment.platformVersion) !== null && _b !== void 0 ? _b : ''}`.trim();
|
|
64
|
+
}
|
|
63
65
|
}
|
|
64
66
|
return [environment];
|
|
65
67
|
}
|
package/dist/core.js
CHANGED
|
@@ -42,14 +42,14 @@ const extract_test_environment_1 = require("./utils/extract-test-environment");
|
|
|
42
42
|
const validate_sdk_version_1 = require("./utils/validate-sdk-version");
|
|
43
43
|
const memory_usage_logging_1 = require("./utils/memory-usage-logging");
|
|
44
44
|
const utils = __importStar(require("@applitools/utils"));
|
|
45
|
-
function makeCore({ spec, clients,
|
|
45
|
+
function makeCore({ spec, clients, base: defaultBase, concurrency = utils.general.getEnvValue('CONCURRENCY', 'number'), environment: defaultEnvironment, agentId = 'core', cwd = process.cwd(), logger: defaultLogger, asyncCache, } = {}) {
|
|
46
46
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'core' } });
|
|
47
47
|
(0, memory_usage_logging_1.startMemoryUsageLogging)({ logger });
|
|
48
48
|
const environment = (0, extract_test_environment_1.extractTestEnvironment)(defaultEnvironment);
|
|
49
49
|
logger.log(`Core is initialized ${defaultBase ? 'with' : 'without'} custom base core and environment`, environment);
|
|
50
50
|
if (environment.sdk)
|
|
51
51
|
(0, validate_sdk_version_1.validateSdkVersion)(environment.sdk, { logger });
|
|
52
|
-
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId, cwd, logger });
|
|
52
|
+
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId, concurrency, cwd, logger });
|
|
53
53
|
return utils.general.extend(base, core => {
|
|
54
54
|
return {
|
|
55
55
|
base: base,
|
|
@@ -58,21 +58,11 @@ function makeCore({ spec, clients, concurrency, base: defaultBase, environment:
|
|
|
58
58
|
getNMLClient: (0, get_nml_client_1.makeGetNMLClient)({ client: clients === null || clients === void 0 ? void 0 : clients.nml, logger }),
|
|
59
59
|
getECClient: (0, get_ec_client_1.makeGetECClient)({ logger }),
|
|
60
60
|
getAccountInfo: (0, get_account_info_1.makeGetAccountInfo)({ core, logger }),
|
|
61
|
-
makeManager: (0, make_manager_1.makeMakeManager)({
|
|
62
|
-
spec,
|
|
63
|
-
clients,
|
|
64
|
-
concurrency,
|
|
65
|
-
core,
|
|
66
|
-
base: defaultBase,
|
|
67
|
-
agentId,
|
|
68
|
-
environment,
|
|
69
|
-
asyncCache,
|
|
70
|
-
logger,
|
|
71
|
-
}),
|
|
61
|
+
makeManager: (0, make_manager_1.makeMakeManager)({ spec, clients, core, agentId, cwd, environment, asyncCache, logger }),
|
|
72
62
|
locate: (0, locate_1.makeLocate)({ spec, core, logger }),
|
|
73
63
|
locateText: (0, locate_text_1.makeLocateText)({ spec, core, logger }),
|
|
74
64
|
extractText: (0, extract_text_1.makeExtractText)({ spec, core, logger }),
|
|
75
|
-
openEyes: (0, open_eyes_1.makeOpenEyes)({ spec, clients, core,
|
|
65
|
+
openEyes: (0, open_eyes_1.makeOpenEyes)({ spec, clients, core, environment, asyncCache, logger }),
|
|
76
66
|
closeBatch: (0, close_batch_1.makeCloseBatch)({ core, logger }),
|
|
77
67
|
deleteTest: (0, delete_test_1.makeDeleteTest)({ core, logger }),
|
|
78
68
|
};
|
package/dist/make-manager.js
CHANGED
|
@@ -30,24 +30,28 @@ 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,
|
|
33
|
+
function makeMakeManager({ spec, clients, core, base: defaultBase, agentId: defaultAgentId, environment, cwd = process.cwd(), logger: mainLogger, asyncCache, }) {
|
|
34
34
|
return async function makeManager({ type = 'classic', settings, logger = mainLogger, } = {}) {
|
|
35
|
-
var _a, _b, _c, _d, _e;
|
|
36
|
-
var
|
|
35
|
+
var _a, _b, _c, _d, _e, _f;
|
|
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 =
|
|
40
|
-
(
|
|
41
|
-
(
|
|
42
|
-
(
|
|
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 : 5));
|
|
40
|
+
(_c = settings.batch) !== null && _c !== void 0 ? _c : (settings.batch = {});
|
|
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
|
+
(_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);
|
|
43
43
|
logger.log('Command "makeManager" is called with settings', settings);
|
|
44
|
-
base !== null &&
|
|
44
|
+
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId: settings.agentId, concurrency: settings.concurrency, cwd, logger });
|
|
45
45
|
const cores = {
|
|
46
46
|
ufg: (0, core_2.makeCore)({ spec, base, fetchConcurrency: settings.fetchConcurrency, asyncCache, logger }),
|
|
47
47
|
classic: (0, core_1.makeCore)({ spec, base, logger }),
|
|
48
48
|
};
|
|
49
49
|
const storage = [];
|
|
50
50
|
return {
|
|
51
|
+
get concurrency() {
|
|
52
|
+
return base.concurrency;
|
|
53
|
+
},
|
|
54
|
+
base,
|
|
51
55
|
openEyes: utils.general.wrap((0, open_eyes_1.makeOpenEyes)({ type, clients, batch: settings.batch, spec, core, cores, environment, asyncCache, logger }), async (openEyes, options) => {
|
|
52
56
|
const eyes = await openEyes(options);
|
|
53
57
|
storage.push(eyes);
|
package/dist/open-eyes.js
CHANGED
|
@@ -34,10 +34,10 @@ const close_1 = require("./close");
|
|
|
34
34
|
const abort_1 = require("./abort");
|
|
35
35
|
const get_eyes_results_1 = require("./get-eyes-results");
|
|
36
36
|
const utils = __importStar(require("@applitools/utils"));
|
|
37
|
-
function makeOpenEyes({ type: defaultType = 'classic', clients,
|
|
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;
|
|
40
|
-
var
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
40
|
+
var _v, _w, _x, _y;
|
|
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,10 +45,10 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, concurrency, bat
|
|
|
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 = (_v = settings.batch).id) !== null && _g !== void 0 ? _g : (_v.id = (_h = utils.general.getEnvValue('BATCH_ID')) !== null && _h !== void 0 ? _h : `generated-${utils.general.guid()}`);
|
|
49
|
+
(_j = (_w = settings.batch).name) !== null && _j !== void 0 ? _j : (_w.name = utils.general.getEnvValue('BATCH_NAME'));
|
|
50
|
+
(_k = (_x = settings.batch).sequenceName) !== null && _k !== void 0 ? _k : (_x.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE'));
|
|
51
|
+
(_l = (_y = settings.batch).notifyOnCompletion) !== null && _l !== void 0 ? _l : (_y.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'));
|
|
@@ -65,7 +65,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, concurrency, bat
|
|
|
65
65
|
event: {
|
|
66
66
|
type: 'openEyes',
|
|
67
67
|
userTestId: settings.userTestId,
|
|
68
|
-
concurrency,
|
|
68
|
+
concurrency: (_t = cores === null || cores === void 0 ? void 0 : cores[type].concurrency) !== null && _t !== void 0 ? _t : core.concurrency,
|
|
69
69
|
environment,
|
|
70
70
|
driver: {
|
|
71
71
|
deviceName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.deviceName,
|
|
@@ -73,7 +73,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, concurrency, bat
|
|
|
73
73
|
browserVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.browserVersion,
|
|
74
74
|
platformName: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformName,
|
|
75
75
|
platformVersion: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.platformVersion,
|
|
76
|
-
isApplitoolsLib: (
|
|
76
|
+
isApplitoolsLib: (_u = driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.applitoolsLib) === null || _u === void 0 ? void 0 : _u.instrumented,
|
|
77
77
|
isEC: driverEnvironment === null || driverEnvironment === void 0 ? void 0 : driverEnvironment.isEC,
|
|
78
78
|
},
|
|
79
79
|
driverUrl,
|
|
@@ -86,7 +86,7 @@ function makeOpenEyes({ type: defaultType = 'classic', clients, concurrency, bat
|
|
|
86
86
|
settings: settings,
|
|
87
87
|
target: driver,
|
|
88
88
|
cores: cores !== null && cores !== void 0 ? cores : {
|
|
89
|
-
ufg: (0, core_2.makeCore)({ spec, clients, base: core.base,
|
|
89
|
+
ufg: (0, core_2.makeCore)({ spec, clients, base: core.base, asyncCache, logger }),
|
|
90
90
|
classic: (0, core_1.makeCore)({ spec, clients, base: core.base, logger }),
|
|
91
91
|
},
|
|
92
92
|
logger,
|
|
@@ -58,7 +58,7 @@ exports.default = {
|
|
|
58
58
|
validateRawAccountInfo(data);
|
|
59
59
|
},
|
|
60
60
|
async testServer() {
|
|
61
|
-
const server = (0, core_base_1.
|
|
61
|
+
const server = (0, core_base_1.makeCoreRequestsWithCache)();
|
|
62
62
|
const result = await server.getAccountInfo({ settings: utils_1.config });
|
|
63
63
|
validateAccountInfo(result);
|
|
64
64
|
},
|
package/dist/ufg/core.js
CHANGED
|
@@ -35,10 +35,10 @@ const get_nml_client_1 = require("../automation/get-nml-client");
|
|
|
35
35
|
const get_ufg_client_1 = require("./get-ufg-client");
|
|
36
36
|
const open_eyes_1 = require("./open-eyes");
|
|
37
37
|
const utils = __importStar(require("@applitools/utils"));
|
|
38
|
-
function makeCore({ spec, clients, base, concurrency, fetchConcurrency, agentId = 'core-ufg', cwd = process.cwd(), logger: defaultLogger, asyncCache, }) {
|
|
38
|
+
function makeCore({ spec, clients, base: defaultBase, concurrency, fetchConcurrency, agentId = 'core-ufg', cwd = process.cwd(), logger: defaultLogger, asyncCache, }) {
|
|
39
39
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'core-ufg' } });
|
|
40
|
-
logger.log(`Core ufg is initialized ${
|
|
41
|
-
base !== null &&
|
|
40
|
+
logger.log(`Core ufg is initialized ${defaultBase ? 'with' : 'without'} custom base core`);
|
|
41
|
+
const base = defaultBase !== null && defaultBase !== void 0 ? defaultBase : (0, core_base_1.makeCore)({ agentId, concurrency, cwd, logger });
|
|
42
42
|
return utils.general.extend(base, core => {
|
|
43
43
|
return {
|
|
44
44
|
type: 'ufg',
|
package/dist/universal/core.js
CHANGED
|
@@ -32,6 +32,7 @@ const utils = __importStar(require("@applitools/utils"));
|
|
|
32
32
|
function makeCore(options) {
|
|
33
33
|
const socketPromise = makeClientSocket(options);
|
|
34
34
|
const core = {
|
|
35
|
+
concurrency: undefined,
|
|
35
36
|
base: null,
|
|
36
37
|
async getAccountInfo(options) {
|
|
37
38
|
const socket = await socketPromise;
|
|
@@ -97,6 +98,8 @@ function makeCore(options) {
|
|
|
97
98
|
exports.makeCore = makeCore;
|
|
98
99
|
function makeManager({ socket, core, managerRef, }) {
|
|
99
100
|
const manager = {
|
|
101
|
+
concurrency: undefined,
|
|
102
|
+
base: null,
|
|
100
103
|
async openEyes(options) {
|
|
101
104
|
const eyesRef = await socket.request('EyesManager.openEyes', { ...options, manager: managerRef });
|
|
102
105
|
return makeEyes({ socket, core, eyesRef });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.2",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -74,18 +74,18 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@applitools/core-base": "1.
|
|
78
|
-
"@applitools/dom-capture": "11.2.
|
|
79
|
-
"@applitools/dom-snapshot": "4.7.
|
|
80
|
-
"@applitools/driver": "1.16.
|
|
81
|
-
"@applitools/ec-client": "1.7.
|
|
77
|
+
"@applitools/core-base": "1.8.0",
|
|
78
|
+
"@applitools/dom-capture": "11.2.5",
|
|
79
|
+
"@applitools/dom-snapshot": "4.7.15",
|
|
80
|
+
"@applitools/driver": "1.16.1",
|
|
81
|
+
"@applitools/ec-client": "1.7.21",
|
|
82
82
|
"@applitools/logger": "2.0.14",
|
|
83
|
-
"@applitools/nml-client": "1.6.
|
|
83
|
+
"@applitools/nml-client": "1.6.3",
|
|
84
84
|
"@applitools/req": "1.6.4",
|
|
85
|
-
"@applitools/screenshoter": "3.8.
|
|
85
|
+
"@applitools/screenshoter": "3.8.20",
|
|
86
86
|
"@applitools/snippets": "2.4.24",
|
|
87
87
|
"@applitools/socket": "1.1.14",
|
|
88
|
-
"@applitools/spec-driver-webdriver": "1.0.
|
|
88
|
+
"@applitools/spec-driver-webdriver": "1.0.54",
|
|
89
89
|
"@applitools/ufg-client": "1.9.9",
|
|
90
90
|
"@applitools/utils": "1.7.0",
|
|
91
91
|
"@types/ws": "8.5.5",
|
|
@@ -100,8 +100,8 @@
|
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@applitools/bongo": "^5.7.6",
|
|
102
102
|
"@applitools/sea": "^1.0.0",
|
|
103
|
-
"@applitools/spec-driver-puppeteer": "^1.3.
|
|
104
|
-
"@applitools/spec-driver-selenium": "^1.5.
|
|
103
|
+
"@applitools/spec-driver-puppeteer": "^1.3.4",
|
|
104
|
+
"@applitools/spec-driver-selenium": "^1.5.68",
|
|
105
105
|
"@applitools/test-server": "^1.2.2",
|
|
106
106
|
"@applitools/test-utils": "^1.5.17",
|
|
107
107
|
"@applitools/tunnel-client": "^1.4.0",
|
package/types/classic/core.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ type Options<TSpec extends SpecType> = {
|
|
|
14
14
|
cwd?: string;
|
|
15
15
|
logger?: Logger;
|
|
16
16
|
};
|
|
17
|
-
export declare function makeCore<TSpec extends SpecType>({ spec, clients, base, concurrency, agentId, cwd, logger: defaultLogger, }: Options<TSpec>): Core<TSpec>;
|
|
17
|
+
export declare function makeCore<TSpec extends SpecType>({ spec, clients, base: defaultBase, concurrency, agentId, cwd, logger: defaultLogger, }: Options<TSpec>): Core<TSpec>;
|
|
18
18
|
export {};
|
package/types/core.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ type Options<TSpec extends SpecType> = {
|
|
|
10
10
|
ufg?: UFGClient;
|
|
11
11
|
nml?: NMLClient;
|
|
12
12
|
};
|
|
13
|
-
concurrency?: number;
|
|
14
13
|
base?: BaseCore;
|
|
15
|
-
|
|
14
|
+
concurrency?: number;
|
|
16
15
|
environment?: Record<string, any>;
|
|
16
|
+
agentId?: string;
|
|
17
17
|
cwd?: string;
|
|
18
18
|
logger?: Logger;
|
|
19
19
|
asyncCache?: AsyncCache;
|
|
20
20
|
};
|
|
21
|
-
export declare function makeCore<TSpec extends SpecType>({ spec, clients,
|
|
21
|
+
export declare function makeCore<TSpec extends SpecType>({ spec, clients, base: defaultBase, concurrency, environment: defaultEnvironment, agentId, cwd, logger: defaultLogger, asyncCache, }?: Options<TSpec>): Core<TSpec, 'classic' | 'ufg'>;
|
|
22
22
|
export {};
|
package/types/make-manager.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ type Options<TSpec extends SpecType> = {
|
|
|
10
10
|
ufg?: UFGClient;
|
|
11
11
|
nml?: NMLClient;
|
|
12
12
|
};
|
|
13
|
-
concurrency?: number;
|
|
14
13
|
core: Core<TSpec>;
|
|
15
14
|
base?: BaseCore;
|
|
16
15
|
agentId?: string;
|
|
@@ -19,7 +18,7 @@ type Options<TSpec extends SpecType> = {
|
|
|
19
18
|
logger: Logger;
|
|
20
19
|
asyncCache?: AsyncCache;
|
|
21
20
|
};
|
|
22
|
-
export declare function makeMakeManager<TSpec extends SpecType>({ spec, clients,
|
|
21
|
+
export declare function makeMakeManager<TSpec extends SpecType>({ spec, clients, core, base: defaultBase, agentId: defaultAgentId, environment, cwd, logger: mainLogger, asyncCache, }: Options<TSpec>): <TType extends "classic" | "ufg" = "classic">({ type, settings, logger, }?: {
|
|
23
22
|
type?: TType | undefined;
|
|
24
23
|
settings?: ManagerSettings | undefined;
|
|
25
24
|
logger?: Logger | undefined;
|
package/types/open-eyes.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ type Options<TSpec extends SpecType, TType extends 'classic' | 'ufg'> = {
|
|
|
9
9
|
ufg?: UFGClient;
|
|
10
10
|
nml?: NMLClient;
|
|
11
11
|
};
|
|
12
|
-
concurrency?: number;
|
|
13
12
|
batch?: Batch;
|
|
14
13
|
core: Core<TSpec, TType>;
|
|
15
14
|
cores?: {
|
|
@@ -20,7 +19,7 @@ type Options<TSpec extends SpecType, TType extends 'classic' | 'ufg'> = {
|
|
|
20
19
|
logger: Logger;
|
|
21
20
|
asyncCache?: AsyncCache;
|
|
22
21
|
};
|
|
23
|
-
export declare function makeOpenEyes<TSpec extends SpecType, TDefaultType extends 'classic' | 'ufg' = 'classic'>({ type: defaultType, clients,
|
|
22
|
+
export declare function makeOpenEyes<TSpec extends SpecType, TDefaultType extends 'classic' | 'ufg' = 'classic'>({ type: defaultType, clients, batch, core, cores, spec, environment, logger: mainLogger, asyncCache, }: Options<TSpec, TDefaultType>): <TType extends "classic" | "ufg" = TDefaultType>({ type, settings, config, target, logger, }: {
|
|
24
23
|
type?: TType | undefined;
|
|
25
24
|
settings?: Partial<OpenSettings<TDefaultType> & OpenSettings<TType>> | undefined;
|
|
26
25
|
config?: (Config<TSpec, TDefaultType> & Config<TSpec, TType>) | undefined;
|
package/types/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MaybeArray } from '@applitools/utils';
|
|
2
|
+
import type * as BaseCore from '@applitools/core-base/types';
|
|
2
3
|
import type * as AutomationCore from './automation/types';
|
|
3
4
|
import type * as ClassicCore from './classic/types';
|
|
4
5
|
import type * as UFGCore from './ufg/types';
|
|
@@ -47,6 +48,8 @@ export interface Core<TSpec extends SpecType, TDefaultType extends 'classic' | '
|
|
|
47
48
|
}): Promise<string[]>;
|
|
48
49
|
}
|
|
49
50
|
export interface EyesManager<TSpec extends SpecType, TDefaultType extends 'classic' | 'ufg' = 'classic' | 'ufg'> {
|
|
51
|
+
readonly concurrency: number | undefined;
|
|
52
|
+
readonly base: BaseCore.Core;
|
|
50
53
|
openEyes<TType extends 'classic' | 'ufg' = TDefaultType>(options: {
|
|
51
54
|
type?: TType;
|
|
52
55
|
target?: AutomationCore.DriverTarget<TSpec>;
|
package/types/ufg/core.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ type Options<TSpec extends SpecType> = {
|
|
|
18
18
|
logger?: Logger;
|
|
19
19
|
asyncCache?: AsyncCache;
|
|
20
20
|
};
|
|
21
|
-
export declare function makeCore<TSpec extends SpecType>({ spec, clients, base, concurrency, fetchConcurrency, agentId, cwd, logger: defaultLogger, asyncCache, }: Options<TSpec>): Core<TSpec>;
|
|
21
|
+
export declare function makeCore<TSpec extends SpecType>({ spec, clients, base: defaultBase, concurrency, fetchConcurrency, agentId, cwd, logger: defaultLogger, asyncCache, }: Options<TSpec>): Core<TSpec>;
|
|
22
22
|
export {};
|