@applitools/core 4.33.0 → 4.35.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 +94 -0
- package/dist/automation/utils/take-screenshot.js +9 -1
- package/dist/check.js +2 -1
- package/dist/classic/check-and-close.js +9 -1
- package/dist/classic/check.js +9 -1
- package/dist/get-eyes-results.js +2 -2
- package/dist/get-manager-results.js +2 -2
- package/dist/offline/run-offline-snapshots.js +13 -13
- package/dist/ufg/utils/take-dom-snapshots.js +2 -2
- package/dist/universal/spec-driver.js +24 -0
- package/package.json +17 -17
- package/types/automation/types.d.ts +1 -1
- package/types/offline/run-offline-snapshots.d.ts +1 -0
- package/types/universal/spec-driver.d.ts +5 -2
- package/types/universal/types.d.ts +2 -0
- package/dist/errors/test-error.js +0 -32
- package/types/errors/test-error.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,99 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.35.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.34.0...js/core@4.35.0) (2025-03-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add accessibility field to screenshot ([#2815](https://github.com/Applitools-Dev/sdk/issues/2815)) ([3d111f3](https://github.com/Applitools-Dev/sdk/commit/3d111f354c5eedeb8914f18318ccecce5fd13002))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/nml-client bumped to 1.9.0
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
* add accessibility field to screenshot ([#2815](https://github.com/Applitools-Dev/sdk/issues/2815)) ([3d111f3](https://github.com/Applitools-Dev/sdk/commit/3d111f354c5eedeb8914f18318ccecce5fd13002))
|
|
17
|
+
* @applitools/core-base bumped to 1.23.0
|
|
18
|
+
#### Features
|
|
19
|
+
|
|
20
|
+
* add accessibility field to screenshot ([#2815](https://github.com/Applitools-Dev/sdk/issues/2815)) ([3d111f3](https://github.com/Applitools-Dev/sdk/commit/3d111f354c5eedeb8914f18318ccecce5fd13002))
|
|
21
|
+
* @applitools/ec-client bumped to 1.10.8
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [4.34.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.33.0...js/core@4.34.0) (2025-03-30)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* allow sending callback functions to waitBeforeCapture ([#2780](https://github.com/Applitools-Dev/sdk/issues/2780)) ([4caa2e8](https://github.com/Applitools-Dev/sdk/commit/4caa2e8ae055d3dd48164eeceaa4c691eeadcdd4))
|
|
30
|
+
* offline results state granularity ([#2872](https://github.com/Applitools-Dev/sdk/issues/2872)) ([c5f6e4e](https://github.com/Applitools-Dev/sdk/commit/c5f6e4ed87c4855704ce1a6c568393a35b677c1d))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* reject openCheckAndClose on request failures ([#2870](https://github.com/Applitools-Dev/sdk/issues/2870)) ([1d12d60](https://github.com/Applitools-Dev/sdk/commit/1d12d60991e8f222002273d5447702158f1cba84))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Dependencies
|
|
39
|
+
|
|
40
|
+
* @applitools/utils bumped to 1.8.0
|
|
41
|
+
#### Features
|
|
42
|
+
|
|
43
|
+
* allow sending callback functions to waitBeforeCapture ([#2780](https://github.com/Applitools-Dev/sdk/issues/2780)) ([4caa2e8](https://github.com/Applitools-Dev/sdk/commit/4caa2e8ae055d3dd48164eeceaa4c691eeadcdd4))
|
|
44
|
+
* @applitools/dom-snapshot bumped to 4.11.17
|
|
45
|
+
#### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* input range value render issue - add input range to need map list ([#2866](https://github.com/Applitools-Dev/sdk/issues/2866)) ([6b3c113](https://github.com/Applitools-Dev/sdk/commit/6b3c113ab3068fc89b3d3917a12fc51bad66ca97))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
* @applitools/socket bumped to 1.2.3
|
|
52
|
+
|
|
53
|
+
* @applitools/driver bumped to 1.21.0
|
|
54
|
+
#### Features
|
|
55
|
+
|
|
56
|
+
* allow sending callback functions to waitBeforeCapture ([#2780](https://github.com/Applitools-Dev/sdk/issues/2780)) ([4caa2e8](https://github.com/Applitools-Dev/sdk/commit/4caa2e8ae055d3dd48164eeceaa4c691eeadcdd4))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
* @applitools/screenshoter bumped to 3.11.0
|
|
61
|
+
#### Features
|
|
62
|
+
|
|
63
|
+
* allow sending callback functions to waitBeforeCapture ([#2780](https://github.com/Applitools-Dev/sdk/issues/2780)) ([4caa2e8](https://github.com/Applitools-Dev/sdk/commit/4caa2e8ae055d3dd48164eeceaa4c691eeadcdd4))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
* @applitools/logger bumped to 2.1.2
|
|
68
|
+
|
|
69
|
+
* @applitools/req bumped to 1.7.9
|
|
70
|
+
|
|
71
|
+
* @applitools/image bumped to 1.1.18
|
|
72
|
+
|
|
73
|
+
* @applitools/dom-capture bumped to 11.5.5
|
|
74
|
+
|
|
75
|
+
* @applitools/spec-driver-webdriver bumped to 1.2.1
|
|
76
|
+
|
|
77
|
+
* @applitools/spec-driver-selenium bumped to 1.5.97
|
|
78
|
+
|
|
79
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.26
|
|
80
|
+
|
|
81
|
+
* @applitools/nml-client bumped to 1.8.27
|
|
82
|
+
|
|
83
|
+
* @applitools/tunnel-client bumped to 1.6.4
|
|
84
|
+
|
|
85
|
+
* @applitools/ufg-client bumped to 1.16.8
|
|
86
|
+
|
|
87
|
+
* @applitools/core-base bumped to 1.22.3
|
|
88
|
+
#### Bug Fixes
|
|
89
|
+
|
|
90
|
+
* reject openCheckAndClose on request failures ([#2870](https://github.com/Applitools-Dev/sdk/issues/2870)) ([1d12d60](https://github.com/Applitools-Dev/sdk/commit/1d12d60991e8f222002273d5447702158f1cba84))
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
* @applitools/ec-client bumped to 1.10.7
|
|
95
|
+
|
|
96
|
+
|
|
3
97
|
## [4.33.0](https://github.com/Applitools-Dev/sdk/compare/js/core@4.32.2...js/core@4.33.0) (2025-03-13)
|
|
4
98
|
|
|
5
99
|
|
|
@@ -43,7 +43,15 @@ async function takeScreenshot({ driver, settings, logger, }) {
|
|
|
43
43
|
hideCaret: settings.hideCaret,
|
|
44
44
|
scrollingMode: (_c = (_b = settings.stitchMode) === null || _b === void 0 ? void 0 : _b.toLowerCase()) !== null && _c !== void 0 ? _c : 'scroll',
|
|
45
45
|
overlap: settings.overlap,
|
|
46
|
-
wait:
|
|
46
|
+
wait: async () => {
|
|
47
|
+
var _a;
|
|
48
|
+
if (typeof settings.waitBeforeCapture === 'number') {
|
|
49
|
+
await utils.general.sleep(settings.waitBeforeCapture);
|
|
50
|
+
}
|
|
51
|
+
else if (settings.waitBeforeCapture) {
|
|
52
|
+
await ((_a = driver.executeUserFunction) === null || _a === void 0 ? void 0 : _a.call(driver, settings.waitBeforeCapture));
|
|
53
|
+
}
|
|
54
|
+
},
|
|
47
55
|
framed: environment.isNative,
|
|
48
56
|
lazyLoad: settings.lazyLoad,
|
|
49
57
|
stabilization: settings.normalization && {
|
package/dist/check.js
CHANGED
|
@@ -51,7 +51,8 @@ function makeCheck({ type: defaultType = 'classic', eyes, target: defaultTarget,
|
|
|
51
51
|
settings.enablePatterns ||
|
|
52
52
|
settings.useDom ||
|
|
53
53
|
!utils.types.isEmpty(settings.dynamicRegions) ||
|
|
54
|
-
!utils.types.isEmpty(settings.layoutRegions)
|
|
54
|
+
!utils.types.isEmpty(settings.layoutRegions) ||
|
|
55
|
+
!utils.types.isEmpty(settings.accessibilitySettings));
|
|
55
56
|
(_h = settings.autProxy) !== null && _h !== void 0 ? _h : (settings.autProxy = eyes.test.eyesServer.proxy);
|
|
56
57
|
(_j = settings.useDom) !== null && _j !== void 0 ? _j : (settings.useDom = false);
|
|
57
58
|
(_k = (_r = settings).retryTimeout) !== null && _k !== void 0 ? _k : (_r.retryTimeout = 0);
|
|
@@ -127,6 +127,9 @@ function makeCheckAndClose({ eyes, target: defaultTarget, environments: defaultE
|
|
|
127
127
|
settings: { ...eyes.test.eyesServer, supportedEnvironmentsUrl: eyes.test.supportedEnvironmentsUrl },
|
|
128
128
|
logger,
|
|
129
129
|
});
|
|
130
|
+
if (typeof settings.waitBeforeCapture === 'function') {
|
|
131
|
+
throw new Error('providing functions to waitBeforeCapture is not supported in NML - please use a number instead');
|
|
132
|
+
}
|
|
130
133
|
const screenshots = await nmlClient.takeScreenshots({
|
|
131
134
|
settings: {
|
|
132
135
|
environments: uniqueEnvironments,
|
|
@@ -139,12 +142,17 @@ function makeCheckAndClose({ eyes, target: defaultTarget, environments: defaultE
|
|
|
139
142
|
waitBetweenStitches: settings.waitBetweenStitches,
|
|
140
143
|
lazyLoad: settings.lazyLoad,
|
|
141
144
|
name: settings.name,
|
|
145
|
+
sendDom: settings.sendDom,
|
|
142
146
|
},
|
|
143
147
|
logger,
|
|
144
148
|
});
|
|
145
149
|
screenshots.forEach(({ environment, ...baseTarget }) => {
|
|
150
|
+
var _a, _b;
|
|
146
151
|
exactEnvironments.push(environment);
|
|
147
|
-
|
|
152
|
+
if ((_a = baseTarget.dom) === null || _a === void 0 ? void 0 : _a.error) {
|
|
153
|
+
logger.warn('could not fetch DOM: ' + baseTarget.dom.error);
|
|
154
|
+
}
|
|
155
|
+
baseTargets.push({ ...baseTarget, dom: (_b = baseTarget.dom) === null || _b === void 0 ? void 0 : _b.url, isTransformed: true });
|
|
148
156
|
baseSettings.push(getBaseCheckSettings({ calculatedRegions: [] }));
|
|
149
157
|
});
|
|
150
158
|
}
|
package/dist/classic/check.js
CHANGED
|
@@ -324,6 +324,9 @@ async function takeNMLScreenshot({ driver, settings, environments, logger, eyes,
|
|
|
324
324
|
},
|
|
325
325
|
});
|
|
326
326
|
const calculate = elementReferences.calculate;
|
|
327
|
+
if (typeof settings.waitBeforeCapture === 'function') {
|
|
328
|
+
throw new Error('providing functions to waitBeforeCapture is not supported in NML - please use a number instead');
|
|
329
|
+
}
|
|
327
330
|
const screenshots = await nmlClient.takeScreenshots({
|
|
328
331
|
settings: {
|
|
329
332
|
environments: environments,
|
|
@@ -339,10 +342,12 @@ async function takeNMLScreenshot({ driver, settings, environments, logger, eyes,
|
|
|
339
342
|
region: elementReferences.target,
|
|
340
343
|
selectorsToFindRegionsFor: calculate.map(({ name }) => name),
|
|
341
344
|
scrollRootElement: elementReferences.scrolling,
|
|
345
|
+
sendDom: settings.sendDom,
|
|
342
346
|
},
|
|
343
347
|
logger,
|
|
344
348
|
});
|
|
345
349
|
return screenshots.map(({ calculateRegions, ...baseTarget }) => {
|
|
350
|
+
var _a, _b;
|
|
346
351
|
const aggregateCalculatedRegions = [];
|
|
347
352
|
calculate.forEach(({ reference }, index) => {
|
|
348
353
|
const regions = calculateRegions === null || calculateRegions === void 0 ? void 0 : calculateRegions[index];
|
|
@@ -353,8 +358,11 @@ async function takeNMLScreenshot({ driver, settings, environments, logger, eyes,
|
|
|
353
358
|
logger.log(`Regions "${reference}" was not found in the screenshot`);
|
|
354
359
|
}
|
|
355
360
|
});
|
|
361
|
+
if ((_a = baseTarget.dom) === null || _a === void 0 ? void 0 : _a.error) {
|
|
362
|
+
logger.warn('could not fetch DOM: ' + baseTarget.dom.error);
|
|
363
|
+
}
|
|
356
364
|
return {
|
|
357
|
-
baseTarget: { ...baseTarget, isTransformed: true },
|
|
365
|
+
baseTarget: { ...baseTarget, dom: (_b = baseTarget.dom) === null || _b === void 0 ? void 0 : _b.url, isTransformed: true },
|
|
358
366
|
baseSetting: getBaseCheckSettings({
|
|
359
367
|
calculatedRegions: aggregateCalculatedRegions,
|
|
360
368
|
}),
|
package/dist/get-eyes-results.js
CHANGED
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.makeGetEyesResults = void 0;
|
|
27
|
-
const
|
|
27
|
+
const core_base_1 = require("@applitools/core-base");
|
|
28
28
|
const utils = __importStar(require("@applitools/utils"));
|
|
29
29
|
function makeGetEyesResults({ eyes, logger: mainLogger, }) {
|
|
30
30
|
return async function getEyesResults({ settings, logger = mainLogger, } = {}) {
|
|
@@ -35,7 +35,7 @@ function makeGetEyesResults({ eyes, logger: mainLogger, }) {
|
|
|
35
35
|
results.forEach(result => {
|
|
36
36
|
var _a;
|
|
37
37
|
if (result.status !== 'Passed')
|
|
38
|
-
throw (_a = result === null || result === void 0 ? void 0 : result.reason) !== null && _a !== void 0 ? _a : new
|
|
38
|
+
throw (_a = result === null || result === void 0 ? void 0 : result.reason) !== null && _a !== void 0 ? _a : new core_base_1.TestError(result);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
return results;
|
|
@@ -24,7 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.makeGetManagerResults = void 0;
|
|
27
|
-
const
|
|
27
|
+
const core_base_1 = require("@applitools/core-base");
|
|
28
28
|
const internal_error_1 = require("./errors/internal-error");
|
|
29
29
|
const separate_duplicate_results_1 = require("./utils/separate-duplicate-results");
|
|
30
30
|
const utils = __importStar(require("@applitools/utils"));
|
|
@@ -40,7 +40,7 @@ function makeGetManagerResults({ core, storage, logger: mainLogger, }) {
|
|
|
40
40
|
var _a;
|
|
41
41
|
return ({
|
|
42
42
|
result,
|
|
43
|
-
error: result.status !== 'Passed' ? (_a = result.reason) !== null && _a !== void 0 ? _a : new
|
|
43
|
+
error: result.status !== 'Passed' ? (_a = result.reason) !== null && _a !== void 0 ? _a : new core_base_1.TestError(result) : undefined,
|
|
44
44
|
userTestId: result.userTestId,
|
|
45
45
|
environment: result.environment,
|
|
46
46
|
});
|
|
@@ -77,7 +77,10 @@ async function runOfflineSnapshots(options) {
|
|
|
77
77
|
totalTime: Date.now() - startTime,
|
|
78
78
|
jsonFilePath: options.jsonFilePath,
|
|
79
79
|
});
|
|
80
|
-
if (!isSuccess && options.
|
|
80
|
+
if (!isSuccess.onErrors && options.failOnError) {
|
|
81
|
+
throw new Error(outputStr);
|
|
82
|
+
}
|
|
83
|
+
else if (!isSuccess.onDiffs && options.failOnDiff) {
|
|
81
84
|
throw new Error(outputStr);
|
|
82
85
|
}
|
|
83
86
|
else {
|
|
@@ -155,7 +158,11 @@ async function runOfflineSnapshots(options) {
|
|
|
155
158
|
await eyes.close({ settings: closeSettings });
|
|
156
159
|
}
|
|
157
160
|
else {
|
|
158
|
-
await eyes.abort(
|
|
161
|
+
await eyes.abort({
|
|
162
|
+
settings: {
|
|
163
|
+
reason: 'internal',
|
|
164
|
+
},
|
|
165
|
+
});
|
|
159
166
|
}
|
|
160
167
|
logger.log('done running test', testPath);
|
|
161
168
|
return { batchId: openSettings.batch.id, results: (await eyes.getResults({ logger }))[0] };
|
|
@@ -236,7 +243,7 @@ exports.runOfflineSnapshots = runOfflineSnapshots;
|
|
|
236
243
|
function uniq(arr) {
|
|
237
244
|
return [...new Set(arr)];
|
|
238
245
|
}
|
|
239
|
-
function processResults({ testResults, totalTime, saveNewTests = true,
|
|
246
|
+
function processResults({ testResults, totalTime, saveNewTests = true, jsonFilePath, }) {
|
|
240
247
|
let outputStr = '\n';
|
|
241
248
|
const pluralize = utils.general.pluralize;
|
|
242
249
|
const testResultsWithErrors = testResults.filter(r => r && r.reason);
|
|
@@ -319,16 +326,9 @@ function processResults({ testResults, totalTime, saveNewTests = true, failOnDif
|
|
|
319
326
|
// if (Number(testConcurrency) === 5) {
|
|
320
327
|
// outputStr += `\n${concurrencyMsg}\n`
|
|
321
328
|
// }
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
else if (failOnDiff) {
|
|
327
|
-
isSuccess = !warnForUnsavedNewTests && passedOrNew.length && !unresolvedOrFailed.length;
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
isSuccess = true;
|
|
331
|
-
}
|
|
329
|
+
const isSuccess = { onErrors: true, onDiffs: true };
|
|
330
|
+
isSuccess.onErrors = !errors.length;
|
|
331
|
+
isSuccess.onDiffs = !!(!warnForUnsavedNewTests && passedOrNew.length && !unresolvedOrFailed.length);
|
|
332
332
|
return {
|
|
333
333
|
outputStr,
|
|
334
334
|
isSuccess,
|
|
@@ -141,8 +141,8 @@ async function takeDomSnapshots({ driver, settings, hooks, provides, logger, })
|
|
|
141
141
|
if (utils.types.isNumber(settings.waitBeforeCapture)) {
|
|
142
142
|
await utils.general.sleep(settings.waitBeforeCapture);
|
|
143
143
|
}
|
|
144
|
-
else {
|
|
145
|
-
await ((_b =
|
|
144
|
+
else if (settings.waitBeforeCapture) {
|
|
145
|
+
await ((_b = driver.executeUserFunction) === null || _b === void 0 ? void 0 : _b.call(driver, settings.waitBeforeCapture));
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
function calculateBreakpoint({ breakpoints, value }) {
|
|
@@ -151,9 +151,33 @@ function makeSpec({ socket, spec, }) {
|
|
|
151
151
|
async reload(driver) {
|
|
152
152
|
return socket.request('Driver.reload', { driver });
|
|
153
153
|
},
|
|
154
|
+
async isUserFunction(ref) {
|
|
155
|
+
return utils.types.has(ref, 'applitools-ref-id');
|
|
156
|
+
},
|
|
157
|
+
async executeUserFunction(userFunction) {
|
|
158
|
+
return socket.request('Driver.executeUserFunction', userFunction);
|
|
159
|
+
},
|
|
154
160
|
};
|
|
161
|
+
// add default commands to spec (if not already there) such as `isUserFunction`
|
|
162
|
+
spec = addDefaultCommands(spec);
|
|
155
163
|
return spec.reduce((spec, name) => {
|
|
156
164
|
return Object.assign(spec, { [name]: commands[name] });
|
|
157
165
|
}, {});
|
|
158
166
|
}
|
|
159
167
|
exports.makeSpec = makeSpec;
|
|
168
|
+
// returns a new clone of the spec commands array with additional commands universal can support even if the spec doesn't
|
|
169
|
+
function addDefaultCommands(spec) {
|
|
170
|
+
const defaultCommands = [
|
|
171
|
+
{
|
|
172
|
+
command: 'isUserFunction',
|
|
173
|
+
dependsOn: ['executeUserFunction'],
|
|
174
|
+
},
|
|
175
|
+
];
|
|
176
|
+
const commands = spec.slice();
|
|
177
|
+
defaultCommands.forEach(({ command, dependsOn }) => {
|
|
178
|
+
if (!commands.includes(command) && dependsOn.every(dep => commands.includes(dep))) {
|
|
179
|
+
commands.push(command);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
return commands;
|
|
183
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.35.0",
|
|
4
4
|
"homepage": "https://applitools.com",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -75,20 +75,20 @@
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@applitools/core-base": "1.
|
|
79
|
-
"@applitools/dom-capture": "11.5.
|
|
80
|
-
"@applitools/dom-snapshot": "4.11.
|
|
81
|
-
"@applitools/driver": "1.
|
|
82
|
-
"@applitools/ec-client": "1.10.
|
|
83
|
-
"@applitools/logger": "2.1.
|
|
84
|
-
"@applitools/nml-client": "1.
|
|
85
|
-
"@applitools/req": "1.7.
|
|
86
|
-
"@applitools/screenshoter": "3.
|
|
78
|
+
"@applitools/core-base": "1.23.0",
|
|
79
|
+
"@applitools/dom-capture": "11.5.5",
|
|
80
|
+
"@applitools/dom-snapshot": "4.11.17",
|
|
81
|
+
"@applitools/driver": "1.21.0",
|
|
82
|
+
"@applitools/ec-client": "1.10.8",
|
|
83
|
+
"@applitools/logger": "2.1.2",
|
|
84
|
+
"@applitools/nml-client": "1.9.0",
|
|
85
|
+
"@applitools/req": "1.7.9",
|
|
86
|
+
"@applitools/screenshoter": "3.11.0",
|
|
87
87
|
"@applitools/snippets": "2.6.4",
|
|
88
|
-
"@applitools/socket": "1.2.
|
|
89
|
-
"@applitools/spec-driver-webdriver": "1.2.
|
|
90
|
-
"@applitools/ufg-client": "1.16.
|
|
91
|
-
"@applitools/utils": "1.
|
|
88
|
+
"@applitools/socket": "1.2.3",
|
|
89
|
+
"@applitools/spec-driver-webdriver": "1.2.1",
|
|
90
|
+
"@applitools/ufg-client": "1.16.8",
|
|
91
|
+
"@applitools/utils": "1.8.0",
|
|
92
92
|
"@types/ws": "8.5.5",
|
|
93
93
|
"abort-controller": "3.0.0",
|
|
94
94
|
"chalk": "4.1.2",
|
|
@@ -101,11 +101,11 @@
|
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@applitools/bongo": "^5.10.0",
|
|
103
103
|
"@applitools/sea": "^1.0.0",
|
|
104
|
-
"@applitools/spec-driver-puppeteer": "^1.4.
|
|
105
|
-
"@applitools/spec-driver-selenium": "^1.5.
|
|
104
|
+
"@applitools/spec-driver-puppeteer": "^1.4.26",
|
|
105
|
+
"@applitools/spec-driver-selenium": "^1.5.97",
|
|
106
106
|
"@applitools/test-server": "^1.2.2",
|
|
107
107
|
"@applitools/test-utils": "^1.5.17",
|
|
108
|
-
"@applitools/tunnel-client": "^1.6.
|
|
108
|
+
"@applitools/tunnel-client": "^1.6.4",
|
|
109
109
|
"@types/node": "^12.20.55",
|
|
110
110
|
"@types/selenium-webdriver": "^4.1.2",
|
|
111
111
|
"@types/semver": "^7.5.8",
|
|
@@ -147,7 +147,7 @@ export interface ScreenshotSettings<TSpec extends SpecType> extends BaseCore.Ima
|
|
|
147
147
|
top?: number;
|
|
148
148
|
bottom?: number;
|
|
149
149
|
};
|
|
150
|
-
waitBeforeCapture?: number;
|
|
150
|
+
waitBeforeCapture?: number | (() => Promise<void>);
|
|
151
151
|
waitBetweenStitches?: number;
|
|
152
152
|
lazyLoad?: boolean | LazyLoadOptions;
|
|
153
153
|
sendDom?: boolean;
|
|
@@ -5,6 +5,7 @@ import type { SpecType } from '@applitools/driver';
|
|
|
5
5
|
export type OfflineSnapshotsSettings = EyesServerSettings & {
|
|
6
6
|
offlineLocationPath: string;
|
|
7
7
|
failOnDiff: boolean;
|
|
8
|
+
failOnError: boolean;
|
|
8
9
|
config: Config<SpecType, 'ufg'>;
|
|
9
10
|
logger?: Logger;
|
|
10
11
|
jsonFilePath?: string;
|
|
@@ -4,9 +4,12 @@ export type Driver = Ref;
|
|
|
4
4
|
export type Context = Ref;
|
|
5
5
|
export type Element = Ref;
|
|
6
6
|
export type Selector = string | CommonSelector | Ref;
|
|
7
|
-
export type
|
|
7
|
+
export type UserFunction = Ref;
|
|
8
|
+
export type PrimarySpecType = SpecType<Driver, Context, Element, Selector, never, UserFunction>;
|
|
8
9
|
export type SpecDriver = BaseSpecDriver<PrimarySpecType>;
|
|
10
|
+
type CommandName = keyof UniversalSpecDriver<PrimarySpecType>;
|
|
9
11
|
export declare function makeSpec({ socket, spec, }: {
|
|
10
12
|
socket: ServerSocket<PrimarySpecType, any>;
|
|
11
|
-
spec:
|
|
13
|
+
spec: CommandName[];
|
|
12
14
|
}): SpecDriver;
|
|
15
|
+
export {};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestError = void 0;
|
|
4
|
-
const core_base_1 = require("@applitools/core-base");
|
|
5
|
-
class TestError extends core_base_1.CoreError {
|
|
6
|
-
constructor(result) {
|
|
7
|
-
if (result.status === 'Failed') {
|
|
8
|
-
super(`Test '${result.name}' of '${result.appName}' is failed! See details at ${result.url}`, {
|
|
9
|
-
reason: 'test failed',
|
|
10
|
-
result,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
else if (result.status === 'Unresolved') {
|
|
14
|
-
if (result.isNew) {
|
|
15
|
-
super(`Test '${result.name}' of '${result.appName}' is new! Please approve the new baseline at ${result.url}`, {
|
|
16
|
-
reason: 'test new',
|
|
17
|
-
result,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
super(`Test '${result.name}' of '${result.appName}' detected differences! See details at: ${result.url}`, {
|
|
22
|
-
reason: 'test different',
|
|
23
|
-
result,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
super('');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.TestError = TestError;
|