@applitools/core 4.25.0 → 4.27.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 +92 -0
- package/dist/autonomous/core.js +3 -0
- package/dist/autonomous/open-check-and-close.js +15 -0
- package/dist/offline/run-offline-snapshots.js +24 -25
- package/dist/ufg/utils/to-safe-check-settings.js +1 -1
- package/dist/universal/core-server.js +1 -1
- package/dist/universal/core.js +4 -0
- package/dist/universal/ws-server.js +9 -3
- package/dist/utils/ensure-offline-folder.js +1 -1
- package/package.json +16 -16
- package/types/autonomous/open-check-and-close.d.ts +16 -0
- package/types/autonomous/types.d.ts +9 -1
- package/types/universal/ws-server.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.27.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.26.0...js/core@4.27.0) (2024-12-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* check for new ufg balancer - cache result in getAccountInfo instead of makeCoreRequests ([#2692](https://github.com/Applitools-Dev/sdk/issues/2692)) ([e2a9705](https://github.com/Applitools-Dev/sdk/commit/e2a970594ffa6527798c5fac7a72188e30da986d))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* support webdriver.io 9 ([baee5ce](https://github.com/Applitools-Dev/sdk/commit/baee5ce96e8220c337b007e3a517b5546ce0fedc))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* @applitools/utils bumped to 1.7.6
|
|
19
|
+
#### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* support webdriver.io 9 ([baee5ce](https://github.com/Applitools-Dev/sdk/commit/baee5ce96e8220c337b007e3a517b5546ce0fedc))
|
|
22
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.21
|
|
23
|
+
#### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* support webdriver.io 9 ([baee5ce](https://github.com/Applitools-Dev/sdk/commit/baee5ce96e8220c337b007e3a517b5546ce0fedc))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
* @applitools/logger bumped to 2.0.20
|
|
30
|
+
|
|
31
|
+
* @applitools/dom-snapshot bumped to 4.11.12
|
|
32
|
+
|
|
33
|
+
* @applitools/socket bumped to 1.1.20
|
|
34
|
+
|
|
35
|
+
* @applitools/req bumped to 1.7.5
|
|
36
|
+
|
|
37
|
+
* @applitools/image bumped to 1.1.15
|
|
38
|
+
|
|
39
|
+
* @applitools/driver bumped to 1.20.1
|
|
40
|
+
|
|
41
|
+
* @applitools/spec-driver-selenium bumped to 1.5.92
|
|
42
|
+
|
|
43
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.21
|
|
44
|
+
|
|
45
|
+
* @applitools/screenshoter bumped to 3.10.1
|
|
46
|
+
|
|
47
|
+
* @applitools/nml-client bumped to 1.8.20
|
|
48
|
+
|
|
49
|
+
* @applitools/tunnel-client bumped to 1.5.11
|
|
50
|
+
|
|
51
|
+
* @applitools/ufg-client bumped to 1.15.1
|
|
52
|
+
|
|
53
|
+
* @applitools/core-base bumped to 1.21.0
|
|
54
|
+
#### Features
|
|
55
|
+
|
|
56
|
+
* check for new ufg balancer - cache result in getAccountInfo instead of makeCoreRequests ([#2692](https://github.com/Applitools-Dev/sdk/issues/2692)) ([e2a9705](https://github.com/Applitools-Dev/sdk/commit/e2a970594ffa6527798c5fac7a72188e30da986d))
|
|
57
|
+
* check for new ufg balancer ([#2683](https://github.com/Applitools-Dev/sdk/issues/2683)) ([60ca9f9](https://github.com/Applitools-Dev/sdk/commit/60ca9f98d37374c918e9c634af46d7f8266b95fc))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
#### Bug Fixes
|
|
61
|
+
|
|
62
|
+
* move apiKey from query param to request header ([d1d2642](https://github.com/Applitools-Dev/sdk/commit/d1d26424c64d8e03981b1482ca49870a866bc164))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
* @applitools/ec-client bumped to 1.9.17
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
## [4.26.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.25.0...js/core@4.26.0) (2024-12-05)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Features
|
|
73
|
+
|
|
74
|
+
* deterministic output for offline mode ([#2666](https://github.com/Applitools-Dev/sdk/issues/2666)) ([0e158c4](https://github.com/Applitools-Dev/sdk/commit/0e158c4ea62c4681513a952a9e2a681c4618a6bd))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
### Bug Fixes
|
|
78
|
+
|
|
79
|
+
* coded regions dynamic regions with `By` locators ([#2660](https://github.com/Applitools-Dev/sdk/issues/2660)) ([e71b3ae](https://github.com/Applitools-Dev/sdk/commit/e71b3aec7241e61c9ba0d637e6242cedd8f4be7b))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### Dependencies
|
|
83
|
+
|
|
84
|
+
* @applitools/ufg-client bumped to 1.15.0
|
|
85
|
+
#### Features
|
|
86
|
+
|
|
87
|
+
* deterministic output for offline mode ([#2666](https://github.com/Applitools-Dev/sdk/issues/2666)) ([0e158c4](https://github.com/Applitools-Dev/sdk/commit/0e158c4ea62c4681513a952a9e2a681c4618a6bd))
|
|
88
|
+
* @applitools/core-base bumped to 1.20.0
|
|
89
|
+
#### Features
|
|
90
|
+
|
|
91
|
+
* deterministic output for offline mode ([#2666](https://github.com/Applitools-Dev/sdk/issues/2666)) ([0e158c4](https://github.com/Applitools-Dev/sdk/commit/0e158c4ea62c4681513a952a9e2a681c4618a6bd))
|
|
92
|
+
* @applitools/ec-client bumped to 1.9.16
|
|
93
|
+
|
|
94
|
+
|
|
3
95
|
## [4.25.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.24.2...js/core@4.25.0) (2024-11-29)
|
|
4
96
|
|
|
5
97
|
|
package/dist/autonomous/core.js
CHANGED
|
@@ -9,6 +9,7 @@ const start_renders_1 = require("./start-renders");
|
|
|
9
9
|
const get_render_results_1 = require("./get-render-results");
|
|
10
10
|
const create_render_results_1 = require("./create-render-results");
|
|
11
11
|
const open_eyes_1 = require("./open-eyes");
|
|
12
|
+
const open_check_and_close_1 = require("./open-check-and-close");
|
|
12
13
|
function makeAutonomousCore({ spec, clients, base: defaultBase, asyncCache, agentId = 'core-autonomous', logger: defaultLogger, } = {}) {
|
|
13
14
|
const logger = (0, logger_1.makeLogger)({ logger: defaultLogger, format: { label: 'core-autonomous' } });
|
|
14
15
|
const core = (0, core_1.makeCore)({ spec, clients, base: defaultBase, asyncCache, agentId, logger });
|
|
@@ -19,7 +20,9 @@ function makeAutonomousCore({ spec, clients, base: defaultBase, asyncCache, agen
|
|
|
19
20
|
startRenders: (0, start_renders_1.makeStartRenders)({ core, logger }),
|
|
20
21
|
getRenderResults: (0, get_render_results_1.makeGetRenderResults)({ core, logger }),
|
|
21
22
|
createRenderResults: (0, create_render_results_1.makeCreateRenderResults)({ logger }),
|
|
23
|
+
/** @deprecated */
|
|
22
24
|
openEyes: (0, open_eyes_1.makeOpenEyes)({ core, logger }),
|
|
25
|
+
openCheckAndClose: (0, open_check_and_close_1.makeOpenCheckAndClose)({ core, logger }),
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
exports.makeAutonomousCore = makeAutonomousCore;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeOpenCheckAndClose = void 0;
|
|
4
|
+
const populate_eyes_server_settings_1 = require("../utils/populate-eyes-server-settings");
|
|
5
|
+
function makeOpenCheckAndClose({ core, logger: defaultLogger }) {
|
|
6
|
+
return async function openCheckAndClose({ target, openSettings, checkSettings, closeSettings, logger = defaultLogger, }) {
|
|
7
|
+
(0, populate_eyes_server_settings_1.populateEyesServerSettings)(openSettings);
|
|
8
|
+
return core.base.openCheckAndClose({
|
|
9
|
+
target,
|
|
10
|
+
settings: { ...openSettings, ...checkSettings, ...closeSettings },
|
|
11
|
+
logger,
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.makeOpenCheckAndClose = makeOpenCheckAndClose;
|
|
@@ -40,6 +40,7 @@ async function runOfflineSnapshots(options) {
|
|
|
40
40
|
var _a, _b;
|
|
41
41
|
if (!options.offlineLocationPath)
|
|
42
42
|
throw new Error('offlineLocationPath is required');
|
|
43
|
+
const offlineLocationPath = path_1.default.resolve(options.offlineLocationPath);
|
|
43
44
|
const startTime = Date.now();
|
|
44
45
|
const logger = (_a = options.logger) !== null && _a !== void 0 ? _a : (0, logger_1.makeLogger)({ format: { label: 'offline-exec' } });
|
|
45
46
|
const eyesServerSettings = { ...(_b = options.config) === null || _b === void 0 ? void 0 : _b.open, ...options };
|
|
@@ -48,20 +49,22 @@ async function runOfflineSnapshots(options) {
|
|
|
48
49
|
const ufgClient = await (0, get_ufg_client_1.makeGetUFGClient)({ logger })({
|
|
49
50
|
settings: { ...account.eyesServer, ...account.ufgServer },
|
|
50
51
|
});
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const testFolders = (await fs_1.default.promises.readdir(offlineLocationPath))
|
|
53
|
+
.filter(filename => filename.startsWith('test-'))
|
|
54
|
+
.sort();
|
|
55
|
+
if (testFolders.length === 1) {
|
|
56
|
+
logger.console.log(`Running single test from folder ${offlineLocationPath}`);
|
|
54
57
|
}
|
|
55
|
-
else if (
|
|
56
|
-
logger.console.log('No
|
|
58
|
+
else if (testFolders.length === 0) {
|
|
59
|
+
logger.console.log('No test artifacts were found at', offlineLocationPath);
|
|
57
60
|
}
|
|
58
61
|
else {
|
|
59
|
-
logger.console.log(`Running
|
|
62
|
+
logger.console.log(`Running ${testFolders.length} tests from folder ${offlineLocationPath}`);
|
|
60
63
|
}
|
|
61
|
-
if (
|
|
62
|
-
throw new Error(`Unable to find offline executions in ${
|
|
64
|
+
if (testFolders.length === 0) {
|
|
65
|
+
throw new Error(`Unable to find offline executions in ${offlineLocationPath}`);
|
|
63
66
|
}
|
|
64
|
-
const allTestResults =
|
|
67
|
+
const allTestResults = await runTests(testFolders);
|
|
65
68
|
const { isSuccess, outputStr } = processResults({ testResults: allTestResults, totalTime: Date.now() - startTime });
|
|
66
69
|
if (!isSuccess && options.failOnDiff) {
|
|
67
70
|
throw new Error(outputStr);
|
|
@@ -70,30 +73,26 @@ async function runOfflineSnapshots(options) {
|
|
|
70
73
|
logger.console.log(outputStr);
|
|
71
74
|
}
|
|
72
75
|
return allTestResults;
|
|
73
|
-
async function
|
|
74
|
-
|
|
75
|
-
const executionPath = path_1.default.resolve(options.offlineLocationPath, executionName);
|
|
76
|
-
executionLogger.log('handling execution', executionPath);
|
|
77
|
-
const testFolders = (await fs_1.default.promises.readdir(executionPath)).filter(foldername => foldername.startsWith('test-'));
|
|
78
|
-
executionLogger.log('running tests', testFolders);
|
|
76
|
+
async function runTests(testFolders) {
|
|
77
|
+
logger.log('running tests', testFolders);
|
|
79
78
|
const results = await Promise.all(testFolders.map(async (testFolder) => {
|
|
80
79
|
const testLogger = logger.extend({ tags: [testFolder] });
|
|
81
|
-
const testPath = path_1.default.
|
|
80
|
+
const testPath = path_1.default.join(offlineLocationPath, testFolder);
|
|
82
81
|
const fileOpenSettings = await fs_1.default.promises
|
|
83
|
-
.readFile(path_1.default.
|
|
82
|
+
.readFile(path_1.default.join(testPath, 'settings.json'), 'utf-8')
|
|
84
83
|
.then(JSON.parse);
|
|
85
84
|
const openSettings = (0, merge_configs_1.mergeConfigs)(fileOpenSettings, options.config.open);
|
|
86
85
|
logger.console.log(`Running test: ${openSettings.testName} (${formatEnvironment(openSettings.environment)})`);
|
|
87
|
-
return runTest(
|
|
86
|
+
return runTest(testPath, openSettings, testLogger);
|
|
88
87
|
}));
|
|
89
88
|
const batchIds = [...new Set(results.map(t => t.batchId))];
|
|
90
89
|
const allTestResults = results.map(t => t.results);
|
|
91
|
-
|
|
90
|
+
logger.log('done running all tests', allTestResults);
|
|
92
91
|
await core.closeBatch({ settings: batchIds.map(batchId => ({ batchId, ...account.eyesServer })) });
|
|
93
|
-
|
|
92
|
+
logger.log('done closing batches');
|
|
94
93
|
return allTestResults;
|
|
95
94
|
}
|
|
96
|
-
async function runTest(
|
|
95
|
+
async function runTest(testPath, openSettings, logger) {
|
|
97
96
|
const environment = await ufgClient.getActualEnvironment({
|
|
98
97
|
settings: { environment: openSettings.environment.requested },
|
|
99
98
|
});
|
|
@@ -111,7 +110,7 @@ async function runOfflineSnapshots(options) {
|
|
|
111
110
|
const checkFolders = (await fs_1.default.promises.readdir(testPath)).filter(folderpath => folderpath.startsWith('check-'));
|
|
112
111
|
logger.log('running checks for test', testPath, ':', checkFolders);
|
|
113
112
|
const targets = (await Promise.all(checkFolders.map(checkFolder => fs_1.default.promises.readFile(path_1.default.resolve(testPath, checkFolder, 'snapshot.json'), 'utf-8').then(JSON.parse))));
|
|
114
|
-
await uploadResources(
|
|
113
|
+
await uploadResources(targets, logger);
|
|
115
114
|
// logger.log('resource hashes for test', testFolder, ':', resourceHashes)
|
|
116
115
|
logger.log('uploaded resources for test', testPath);
|
|
117
116
|
await Promise.all(targets.map((target, index) => runCheck(eyes, target, index, logger)));
|
|
@@ -121,7 +120,7 @@ async function runOfflineSnapshots(options) {
|
|
|
121
120
|
logger.log('done running test', logger);
|
|
122
121
|
return { batchId: openSettings.batch.id, results: (await eyes.getResults({ logger }))[0] };
|
|
123
122
|
}
|
|
124
|
-
async function uploadResources(
|
|
123
|
+
async function uploadResources(targets, logger) {
|
|
125
124
|
const uploadLogger = logger.extend({ tags: ['upload-resources'] });
|
|
126
125
|
const promises = targets.map(async ({ target }) => {
|
|
127
126
|
let resourcePromises = Object.values(target.resources)
|
|
@@ -130,7 +129,7 @@ async function runOfflineSnapshots(options) {
|
|
|
130
129
|
const contentfuleResource = {
|
|
131
130
|
id: '',
|
|
132
131
|
url: '',
|
|
133
|
-
value: await fs_1.default.promises.readFile(path_1.default.
|
|
132
|
+
value: await fs_1.default.promises.readFile(path_1.default.join(offlineLocationPath, 'resources', resource.hash)),
|
|
134
133
|
contentType: resource.contentType,
|
|
135
134
|
hash: resource,
|
|
136
135
|
};
|
|
@@ -140,7 +139,7 @@ async function runOfflineSnapshots(options) {
|
|
|
140
139
|
resource: {
|
|
141
140
|
id: '',
|
|
142
141
|
url: '',
|
|
143
|
-
value: await fs_1.default.promises.readFile(path_1.default.
|
|
142
|
+
value: await fs_1.default.promises.readFile(path_1.default.join(offlineLocationPath, 'resources', target.snapshot.hash)),
|
|
144
143
|
contentType: target.snapshot.contentType,
|
|
145
144
|
hash: target.snapshot,
|
|
146
145
|
},
|
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.toSafeCheckSettings = void 0;
|
|
27
27
|
const utils = __importStar(require("@applitools/utils"));
|
|
28
|
-
const regionTypes = ['ignore', 'layout', 'strict', 'content', 'floating', 'accessibility'];
|
|
28
|
+
const regionTypes = ['ignore', 'layout', 'strict', 'content', 'floating', 'accessibility', 'dynamic'];
|
|
29
29
|
function toSafeCheckSettings({ settings }) {
|
|
30
30
|
const calculate = regionTypes.flatMap(regionType => {
|
|
31
31
|
var _a;
|
|
@@ -31,7 +31,7 @@ printStdout = false, isProcess = false, ...handlerOptions } = {}) {
|
|
|
31
31
|
defaultEnvironment,
|
|
32
32
|
...handlerOptions,
|
|
33
33
|
});
|
|
34
|
-
const { server, port } = await (0, ws_server_1.makeServer)({ ...handlerOptions, debug });
|
|
34
|
+
const { server, port } = await (0, ws_server_1.makeServer)({ ...handlerOptions, debug }, baseLogger);
|
|
35
35
|
if (isProcess) {
|
|
36
36
|
// eslint-disable-next-line no-console
|
|
37
37
|
console.log(port.toString()); // NOTE: this is a part of the generic protocol
|
package/dist/universal/core.js
CHANGED
|
@@ -7,7 +7,7 @@ const ws_1 = require("ws");
|
|
|
7
7
|
const { name, version } = require('../../package.json');
|
|
8
8
|
const TOKEN_HEADER = 'x-eyes-universal-token';
|
|
9
9
|
const TOKEN = `${name}@${version}`;
|
|
10
|
-
async function makeServer(options = {}) {
|
|
10
|
+
async function makeServer(options = {}, logger) {
|
|
11
11
|
const { port = 21077, singleton = true, debug = false, portResolutionMode = 'next', cert, key } = options;
|
|
12
12
|
const secure = Boolean(cert && key);
|
|
13
13
|
const http = secure ? new https_1.Server({ cert, key }) : new http_1.Server();
|
|
@@ -27,7 +27,13 @@ async function makeServer(options = {}) {
|
|
|
27
27
|
return new Promise((resolve, reject) => {
|
|
28
28
|
http.on('listening', () => {
|
|
29
29
|
const ws = new ws_1.Server({ server: http, path: '/eyes', maxPayload: 256 * 1024 * 1024 });
|
|
30
|
-
ws.on('close', () =>
|
|
30
|
+
ws.on('close', () => {
|
|
31
|
+
logger.log('Core universal server is closed');
|
|
32
|
+
http.close();
|
|
33
|
+
});
|
|
34
|
+
ws.on('error', err => {
|
|
35
|
+
logger.log('Core universal server error', err);
|
|
36
|
+
});
|
|
31
37
|
resolve({ server: ws, port: http.address().port });
|
|
32
38
|
});
|
|
33
39
|
http.on('error', async (err) => {
|
|
@@ -36,7 +42,7 @@ async function makeServer(options = {}) {
|
|
|
36
42
|
return resolve({ port });
|
|
37
43
|
}
|
|
38
44
|
else {
|
|
39
|
-
return resolve(await makeServer({ ...options, port: portResolutionMode === 'next' ? port + 1 : 0 }));
|
|
45
|
+
return resolve(await makeServer({ ...options, port: portResolutionMode === 'next' ? port + 1 : 0 }, logger));
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
reject(err);
|
|
@@ -32,7 +32,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
32
32
|
const utils = __importStar(require("@applitools/utils"));
|
|
33
33
|
function ensureOfflineFolder() {
|
|
34
34
|
const offlineLocationPath = utils.general.getEnvValue('OFFLINE_LOCATION_PATH')
|
|
35
|
-
? path_1.default.resolve(utils.general.getEnvValue('OFFLINE_LOCATION_PATH')
|
|
35
|
+
? path_1.default.resolve(utils.general.getEnvValue('OFFLINE_LOCATION_PATH'))
|
|
36
36
|
: undefined;
|
|
37
37
|
if (offlineLocationPath) {
|
|
38
38
|
fs_1.default.mkdirSync(offlineLocationPath, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.27.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -74,20 +74,20 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@applitools/core-base": "1.
|
|
77
|
+
"@applitools/core-base": "1.21.0",
|
|
78
78
|
"@applitools/dom-capture": "11.5.2",
|
|
79
|
-
"@applitools/dom-snapshot": "4.11.
|
|
80
|
-
"@applitools/driver": "1.20.
|
|
81
|
-
"@applitools/ec-client": "1.9.
|
|
82
|
-
"@applitools/logger": "2.0.
|
|
83
|
-
"@applitools/nml-client": "1.8.
|
|
84
|
-
"@applitools/req": "1.7.
|
|
85
|
-
"@applitools/screenshoter": "3.10.
|
|
79
|
+
"@applitools/dom-snapshot": "4.11.12",
|
|
80
|
+
"@applitools/driver": "1.20.1",
|
|
81
|
+
"@applitools/ec-client": "1.9.17",
|
|
82
|
+
"@applitools/logger": "2.0.20",
|
|
83
|
+
"@applitools/nml-client": "1.8.20",
|
|
84
|
+
"@applitools/req": "1.7.5",
|
|
85
|
+
"@applitools/screenshoter": "3.10.1",
|
|
86
86
|
"@applitools/snippets": "2.6.3",
|
|
87
|
-
"@applitools/socket": "1.1.
|
|
88
|
-
"@applitools/spec-driver-webdriver": "1.1.
|
|
89
|
-
"@applitools/ufg-client": "1.
|
|
90
|
-
"@applitools/utils": "1.7.
|
|
87
|
+
"@applitools/socket": "1.1.20",
|
|
88
|
+
"@applitools/spec-driver-webdriver": "1.1.21",
|
|
89
|
+
"@applitools/ufg-client": "1.15.1",
|
|
90
|
+
"@applitools/utils": "1.7.6",
|
|
91
91
|
"@types/ws": "8.5.5",
|
|
92
92
|
"abort-controller": "3.0.0",
|
|
93
93
|
"chalk": "4.1.2",
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@applitools/bongo": "^5.10.0",
|
|
102
102
|
"@applitools/sea": "^1.0.0",
|
|
103
|
-
"@applitools/spec-driver-puppeteer": "^1.4.
|
|
104
|
-
"@applitools/spec-driver-selenium": "^1.5.
|
|
103
|
+
"@applitools/spec-driver-puppeteer": "^1.4.21",
|
|
104
|
+
"@applitools/spec-driver-selenium": "^1.5.92",
|
|
105
105
|
"@applitools/test-server": "^1.2.2",
|
|
106
106
|
"@applitools/test-utils": "^1.5.17",
|
|
107
|
-
"@applitools/tunnel-client": "^1.5.
|
|
107
|
+
"@applitools/tunnel-client": "^1.5.11",
|
|
108
108
|
"@types/node": "^12.20.55",
|
|
109
109
|
"@types/selenium-webdriver": "^4.1.2",
|
|
110
110
|
"@types/semver": "^7.5.8",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Core as UFGCore } from '../ufg/types';
|
|
2
|
+
import type { OpenSettings } from './types';
|
|
3
|
+
import type { CheckSettings, CloseSettings, Target } from '@applitools/core-base/types';
|
|
4
|
+
import { type Logger } from '@applitools/logger';
|
|
5
|
+
type Options = {
|
|
6
|
+
core: UFGCore<any>;
|
|
7
|
+
logger: Logger;
|
|
8
|
+
};
|
|
9
|
+
export declare function makeOpenCheckAndClose({ core, logger: defaultLogger }: Options): ({ target, openSettings, checkSettings, closeSettings, logger, }: {
|
|
10
|
+
target: Target;
|
|
11
|
+
openSettings: OpenSettings;
|
|
12
|
+
checkSettings?: CheckSettings<import("@applitools/utils").Region> | undefined;
|
|
13
|
+
closeSettings?: CloseSettings | undefined;
|
|
14
|
+
logger: Logger;
|
|
15
|
+
}) => Promise<void>;
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Eyes as BaseEyes, ImageTarget as BaseImageTarget, OpenSettings as BaseOpenSettings, CheckSettings as BaseCheckSettings } from '@applitools/core-base/types';
|
|
1
|
+
import type { Eyes as BaseEyes, ImageTarget as BaseImageTarget, OpenSettings as BaseOpenSettings, CheckSettings as BaseCheckSettings, CloseSettings as BaseCloseSettings } from '@applitools/core-base/types';
|
|
2
2
|
import type * as UFGCore from '../ufg/types';
|
|
3
3
|
import { type Logger } from '@applitools/logger';
|
|
4
4
|
import { type SpecType } from '@applitools/driver';
|
|
@@ -28,10 +28,18 @@ export interface AutonomousCore<TSpec extends SpecType> {
|
|
|
28
28
|
rawResults: any[];
|
|
29
29
|
logger?: Logger;
|
|
30
30
|
}): Promise<RenderResult[]>;
|
|
31
|
+
/** @deprecated */
|
|
31
32
|
openEyes(options: {
|
|
32
33
|
settings: Partial<OpenSettings>;
|
|
33
34
|
logger?: Logger;
|
|
34
35
|
}): Promise<BaseEyes>;
|
|
36
|
+
openCheckAndClose(options: {
|
|
37
|
+
target: BaseImageTarget;
|
|
38
|
+
openSettings: Partial<OpenSettings>;
|
|
39
|
+
checkSettings?: BaseCheckSettings;
|
|
40
|
+
closeSettings?: BaseCloseSettings;
|
|
41
|
+
logger?: Logger;
|
|
42
|
+
}): Promise<void>;
|
|
35
43
|
}
|
|
36
44
|
export type SnapshotSettings<TSpec extends SpecType> = UFGCore.SnapshotSettings<TSpec> & UFGCore.EyesServerSettings;
|
|
37
45
|
export type RenderTargetWithSettings = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Server as WsServer } from 'ws';
|
|
3
|
+
import { Logger } from '@applitools/logger';
|
|
3
4
|
export type ServerOptions = {
|
|
4
5
|
port?: number;
|
|
5
6
|
singleton?: boolean;
|
|
@@ -8,7 +9,7 @@ export type ServerOptions = {
|
|
|
8
9
|
key?: string | Buffer;
|
|
9
10
|
cert?: string | Buffer;
|
|
10
11
|
};
|
|
11
|
-
export declare function makeServer(options
|
|
12
|
+
export declare function makeServer(options: ServerOptions | undefined, logger: Logger): Promise<{
|
|
12
13
|
server?: WsServer;
|
|
13
14
|
port: number;
|
|
14
15
|
}>;
|