@applitools/eyes-browser 1.5.20 → 1.5.22
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 +60 -0
- package/dist/index.js +89 -21
- package/package.json +2 -2
- package/types/Eyes.d.ts +3 -2
- package/types/SettingsWithPage.d.ts +1 -0
- package/types/input/BatchInfo.d.ts +5 -0
- package/types/input/CheckSettings.d.ts +34 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.5.22](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.5.21...js/eyes-browser@1.5.22) (2026-01-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/driver bumped to 1.25.0
|
|
9
|
+
#### Features
|
|
10
|
+
|
|
11
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
12
|
+
* @applitools/spec-driver-puppeteer bumped to 1.7.0
|
|
13
|
+
#### Features
|
|
14
|
+
|
|
15
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
* @applitools/core bumped to 4.55.0
|
|
20
|
+
#### Features
|
|
21
|
+
|
|
22
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
* @applitools/dom-snapshot bumped to 4.15.6
|
|
27
|
+
|
|
28
|
+
* @applitools/spec-driver-webdriver bumped to 1.5.5
|
|
29
|
+
|
|
30
|
+
* @applitools/spec-driver-selenium bumped to 1.7.11
|
|
31
|
+
|
|
32
|
+
* @applitools/screenshoter bumped to 3.12.12
|
|
33
|
+
|
|
34
|
+
* @applitools/nml-client bumped to 1.11.15
|
|
35
|
+
|
|
36
|
+
* @applitools/ec-client bumped to 1.12.17
|
|
37
|
+
|
|
38
|
+
* @applitools/eyes bumped to 1.38.0
|
|
39
|
+
#### Features
|
|
40
|
+
|
|
41
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## [1.5.21](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.5.20...js/eyes-browser@1.5.21) (2026-01-14)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Dependencies
|
|
50
|
+
|
|
51
|
+
* @applitools/core bumped to 4.54.3
|
|
52
|
+
#### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* `close`/`getResults` race condition ([#3450](https://github.com/Applitools-Dev/sdk/issues/3450)) ([2e5437d](https://github.com/Applitools-Dev/sdk/commit/2e5437dcfde6fda58d76227659ee249bfa3885a7))
|
|
55
|
+
* @applitools/eyes bumped to 1.37.0
|
|
56
|
+
#### Features
|
|
57
|
+
|
|
58
|
+
* expose buildId in BatchInfo type | FLD-4020 ([#3466](https://github.com/Applitools-Dev/sdk/issues/3466)) ([7868ba0](https://github.com/Applitools-Dev/sdk/commit/7868ba08de9a9d348c42d8eac5a953dce44844d0))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
3
63
|
## [1.5.20](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.5.19...js/eyes-browser@1.5.20) (2026-01-11)
|
|
4
64
|
|
|
5
65
|
|
package/dist/index.js
CHANGED
|
@@ -71874,6 +71874,14 @@ var require_driver = __commonJS({
|
|
|
71874
71874
|
}
|
|
71875
71875
|
return normalizedRegion;
|
|
71876
71876
|
}
|
|
71877
|
+
async bringToFront() {
|
|
71878
|
+
var _a, _b;
|
|
71879
|
+
try {
|
|
71880
|
+
await ((_b = (_a = this._spec).bringToFront) === null || _b === void 0 ? void 0 : _b.call(_a, this.target));
|
|
71881
|
+
} catch (error) {
|
|
71882
|
+
this._logger.warn("Unable to bringToFront the current context due to the error", error);
|
|
71883
|
+
}
|
|
71884
|
+
}
|
|
71877
71885
|
async getRegionInViewport(context, region) {
|
|
71878
71886
|
await context.focus();
|
|
71879
71887
|
return context.getRegionInViewport(region);
|
|
@@ -89225,20 +89233,23 @@ var require_close2 = __commonJS({
|
|
|
89225
89233
|
logger.log('Command "close" starting filler tests for environments', settings.environments);
|
|
89226
89234
|
await Promise.all(uniqueEnvironments.map((environment) => eyes.getBaseEyes({ settings: { environment }, logger })));
|
|
89227
89235
|
}
|
|
89228
|
-
eyes.storage.forEach(
|
|
89229
|
-
|
|
89230
|
-
|
|
89231
|
-
const [eyes2] = await Promise.all([item.eyes, ...item.jobs]);
|
|
89236
|
+
eyes.storage.forEach((item) => {
|
|
89237
|
+
const closePromise = (async () => {
|
|
89238
|
+
var _a2, _b;
|
|
89232
89239
|
try {
|
|
89233
|
-
await
|
|
89240
|
+
const [eyes2] = await Promise.all([item.eyes, ...item.jobs]);
|
|
89241
|
+
try {
|
|
89242
|
+
await eyes2.close({ settings, logger });
|
|
89243
|
+
} catch (error) {
|
|
89244
|
+
logger.warn('Command "close" received an error during performing, trying to perform abort instead', error);
|
|
89245
|
+
await eyes2.abort({ settings, logger });
|
|
89246
|
+
}
|
|
89234
89247
|
} catch (error) {
|
|
89235
|
-
logger.warn('Command "close" received an error during
|
|
89236
|
-
await
|
|
89248
|
+
logger.warn('Command "close" received an error during waiting for eyes instances in background', error);
|
|
89249
|
+
await ((_b = (_a2 = error.info) === null || _a2 === void 0 ? void 0 : _a2.eyes) === null || _b === void 0 ? void 0 : _b.abort({ settings, logger }));
|
|
89237
89250
|
}
|
|
89238
|
-
}
|
|
89239
|
-
|
|
89240
|
-
await ((_b = (_a2 = error.info) === null || _a2 === void 0 ? void 0 : _a2.eyes) === null || _b === void 0 ? void 0 : _b.abort({ settings, logger }));
|
|
89241
|
-
}
|
|
89251
|
+
})();
|
|
89252
|
+
item.jobs.push(closePromise);
|
|
89242
89253
|
});
|
|
89243
89254
|
};
|
|
89244
89255
|
}
|
|
@@ -95713,7 +95724,7 @@ creating temp style for access.`), r3 = Zh(e3);
|
|
|
95713
95724
|
function B2(e3) {
|
|
95714
95725
|
return n4.defaultView && n4.defaultView.frameElement && n4.defaultView.frameElement.getAttribute(e3);
|
|
95715
95726
|
}
|
|
95716
|
-
}(t3).then((e3) => (h2.log("processPage end"), e3.scriptVersion = "4.15.
|
|
95727
|
+
}(t3).then((e3) => (h2.log("processPage end"), e3.scriptVersion = "4.15.6", e3));
|
|
95717
95728
|
}, window[x], "domSnapshotResult");
|
|
95718
95729
|
return function(e3) {
|
|
95719
95730
|
try {
|
|
@@ -96513,9 +96524,10 @@ var require_to_safe_check_settings = __commonJS({
|
|
|
96513
96524
|
const { region, ...options } = utils34.types.has(reference, "region") ? reference : { region: reference };
|
|
96514
96525
|
if (isRegion(region))
|
|
96515
96526
|
return reference;
|
|
96516
|
-
const
|
|
96517
|
-
if (!safeSelector)
|
|
96527
|
+
const selectorInfo = selectors.calculate.shift();
|
|
96528
|
+
if (!(selectorInfo === null || selectorInfo === void 0 ? void 0 : selectorInfo.safeSelector))
|
|
96518
96529
|
return [];
|
|
96530
|
+
const { originalSelector, safeSelector } = selectorInfo;
|
|
96519
96531
|
return {
|
|
96520
96532
|
region: safeSelector,
|
|
96521
96533
|
regionId: utils34.types.isString(originalSelector) ? originalSelector : originalSelector === null || originalSelector === void 0 ? void 0 : originalSelector.selector,
|
|
@@ -96546,7 +96558,7 @@ var require_to_generated_selectors = __commonJS({
|
|
|
96546
96558
|
init_setInterval();
|
|
96547
96559
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96548
96560
|
exports.toGeneratedSelectors = void 0;
|
|
96549
|
-
function toGeneratedSelectors({ elementReferences, logger, transformElementReference }) {
|
|
96561
|
+
function toGeneratedSelectors({ elementReferences, logger, transformElementReference, logDeprecations }) {
|
|
96550
96562
|
var _a, _b, _c;
|
|
96551
96563
|
const elementReferencesToMark = [
|
|
96552
96564
|
(_a = elementReferences.target) !== null && _a !== void 0 ? _a : [],
|
|
@@ -96593,7 +96605,8 @@ var require_to_generated_selectors = __commonJS({
|
|
|
96593
96605
|
safeSelector: isError ? null : safeSelector
|
|
96594
96606
|
};
|
|
96595
96607
|
});
|
|
96596
|
-
} else {
|
|
96608
|
+
} else if (target || scrolling || calculate.length) {
|
|
96609
|
+
logDeprecations("toGeneratedSelectors: `transformElementReference` was unexpectedly called.");
|
|
96597
96610
|
target = elementReferences.target && transformElementReference(elementReferences.target);
|
|
96598
96611
|
scrolling = elementReferences.scrolling && transformElementReference(elementReferences.scrolling);
|
|
96599
96612
|
calculate = ((_c2 = elementReferences.calculate) !== null && _c2 !== void 0 ? _c2 : []).map((elementReference) => {
|
|
@@ -96691,6 +96704,7 @@ var require_take_snapshots2 = __commonJS({
|
|
|
96691
96704
|
const { elementReferencesToMark, getGeneratedSelectors } = (0, to_generated_selectors_1.toGeneratedSelectors)({
|
|
96692
96705
|
elementReferences,
|
|
96693
96706
|
logger,
|
|
96707
|
+
logDeprecations,
|
|
96694
96708
|
// dead code - `transformElementReference` was used for NMG but it's not longer used anywhere
|
|
96695
96709
|
transformElementReference: (elementReference) => {
|
|
96696
96710
|
var _a2;
|
|
@@ -96741,6 +96755,7 @@ var require_take_snapshots2 = __commonJS({
|
|
|
96741
96755
|
}
|
|
96742
96756
|
}
|
|
96743
96757
|
} else {
|
|
96758
|
+
logDeprecations("takeSnapshots: taking native snapshots is no longer supported. How did you reach this message? (dead code)");
|
|
96744
96759
|
const nmlClient = await core.getNMLClient({
|
|
96745
96760
|
driver,
|
|
96746
96761
|
settings: { ...account.eyesServer, supportedEnvironmentsUrl: account.supportedEnvironmentsUrl },
|
|
@@ -96787,6 +96802,18 @@ var require_take_snapshots2 = __commonJS({
|
|
|
96787
96802
|
title,
|
|
96788
96803
|
userAgent
|
|
96789
96804
|
}));
|
|
96805
|
+
function logDeprecations(...args) {
|
|
96806
|
+
core.logEvent({
|
|
96807
|
+
settings: {
|
|
96808
|
+
level: "Error",
|
|
96809
|
+
event: {
|
|
96810
|
+
type: "SDK.unreachableCodeReached",
|
|
96811
|
+
message: args.join(" ")
|
|
96812
|
+
},
|
|
96813
|
+
...account.eyesServer
|
|
96814
|
+
}
|
|
96815
|
+
});
|
|
96816
|
+
}
|
|
96790
96817
|
};
|
|
96791
96818
|
}
|
|
96792
96819
|
exports.makeTakeSnapshots = makeTakeSnapshots;
|
|
@@ -119464,6 +119491,7 @@ var require_check4 = __commonJS({
|
|
|
119464
119491
|
logger.console.log(chalk_1.default.yellow(lang.matchLevelContentDeprecatedWarning));
|
|
119465
119492
|
}
|
|
119466
119493
|
const driver = (0, driver_1.isDriver)(target, spec) ? await (0, driver_1.makeDriver)({ spec, driver: target, reset: target === defaultTarget, logger }) : null;
|
|
119494
|
+
await (driver === null || driver === void 0 ? void 0 : driver.bringToFront());
|
|
119467
119495
|
const typedEyes = await eyes.getTypedEyes({ type, logger });
|
|
119468
119496
|
return typedEyes.check({ target: driver !== null && driver !== void 0 ? driver : target, settings, logger });
|
|
119469
119497
|
};
|
|
@@ -121127,7 +121155,7 @@ var require_package3 = __commonJS({
|
|
|
121127
121155
|
"../core/package.json"(exports, module) {
|
|
121128
121156
|
module.exports = {
|
|
121129
121157
|
name: "@applitools/core",
|
|
121130
|
-
version: "4.
|
|
121158
|
+
version: "4.55.0",
|
|
121131
121159
|
homepage: "https://applitools.com",
|
|
121132
121160
|
bugs: {
|
|
121133
121161
|
url: "https://github.com/applitools/eyes.sdk.javascript1/issues"
|
|
@@ -126499,6 +126527,9 @@ var require_spec_driver3 = __commonJS({
|
|
|
126499
126527
|
},
|
|
126500
126528
|
async executeBrowserCommands(driver, commands2) {
|
|
126501
126529
|
return socket.request("Driver.executeBrowserCommands", { driver, commands: commands2 });
|
|
126530
|
+
},
|
|
126531
|
+
async bringToFront(driver) {
|
|
126532
|
+
return socket.request("Driver.bringToFront", { driver });
|
|
126502
126533
|
}
|
|
126503
126534
|
};
|
|
126504
126535
|
spec = addDefaultCommands(spec);
|
|
@@ -128043,7 +128074,7 @@ var require_package4 = __commonJS({
|
|
|
128043
128074
|
"../eyes/package.json"(exports, module) {
|
|
128044
128075
|
module.exports = {
|
|
128045
128076
|
name: "@applitools/eyes",
|
|
128046
|
-
version: "1.
|
|
128077
|
+
version: "1.38.0",
|
|
128047
128078
|
keywords: [
|
|
128048
128079
|
"applitools",
|
|
128049
128080
|
"eyes",
|
|
@@ -128073,6 +128104,10 @@ var require_package4 = __commonJS({
|
|
|
128073
128104
|
types: "./types/index.d.ts",
|
|
128074
128105
|
default: "./dist/index.js"
|
|
128075
128106
|
},
|
|
128107
|
+
"./SettingsWithPage": {
|
|
128108
|
+
types: "./types/SettingsWithPage.d.ts",
|
|
128109
|
+
default: "./dist/SettingsWithPage.js"
|
|
128110
|
+
},
|
|
128076
128111
|
"./dist/*": "./dist/*.js",
|
|
128077
128112
|
"./package.json": "./package.json"
|
|
128078
128113
|
},
|
|
@@ -129710,13 +129745,15 @@ var BatchInfoData = class {
|
|
|
129710
129745
|
utils13.guard.isString(batch.sequenceName, { name: "sequenceName", strict: false });
|
|
129711
129746
|
utils13.guard.isBoolean(batch.notifyOnCompletion, { name: "notifyOnCompletion", strict: false });
|
|
129712
129747
|
utils13.guard.isArray(batch.properties, { name: "properties", strict: false });
|
|
129748
|
+
utils13.guard.isString(batch.buildId, { name: "buildId", strict: false });
|
|
129713
129749
|
this._batch = {
|
|
129714
129750
|
id: (_b = (_a = batch.id) != null ? _a : utils13.general.getEnvValue("BATCH_ID")) != null ? _b : `generated-${utils13.general.guid()}`,
|
|
129715
129751
|
name: (_c = batch.name) != null ? _c : utils13.general.getEnvValue("BATCH_NAME"),
|
|
129716
129752
|
sequenceName: (_d = batch.sequenceName) != null ? _d : utils13.general.getEnvValue("BATCH_SEQUENCE"),
|
|
129717
129753
|
startedAt: (_e = batch.startedAt) != null ? _e : /* @__PURE__ */ new Date(),
|
|
129718
129754
|
notifyOnCompletion: (_g = (_f = batch.notifyOnCompletion) != null ? _f : utils13.general.getEnvValue("BATCH_NOTIFY", "boolean")) != null ? _g : false,
|
|
129719
|
-
properties: batch.properties
|
|
129755
|
+
properties: batch.properties,
|
|
129756
|
+
buildId: batch.buildId
|
|
129720
129757
|
};
|
|
129721
129758
|
}
|
|
129722
129759
|
get id() {
|
|
@@ -129810,6 +129847,20 @@ var BatchInfoData = class {
|
|
|
129810
129847
|
this.properties.push(property);
|
|
129811
129848
|
return this;
|
|
129812
129849
|
}
|
|
129850
|
+
get buildId() {
|
|
129851
|
+
return this._batch.buildId;
|
|
129852
|
+
}
|
|
129853
|
+
set buildId(buildId) {
|
|
129854
|
+
utils13.guard.isString(buildId, { name: "buildId", strict: false });
|
|
129855
|
+
this._batch.buildId = buildId;
|
|
129856
|
+
}
|
|
129857
|
+
getBuildId() {
|
|
129858
|
+
return this.buildId;
|
|
129859
|
+
}
|
|
129860
|
+
setBuildId(buildId) {
|
|
129861
|
+
this.buildId = buildId;
|
|
129862
|
+
return this;
|
|
129863
|
+
}
|
|
129813
129864
|
/** @internal */
|
|
129814
129865
|
toObject() {
|
|
129815
129866
|
return this._batch;
|
|
@@ -130243,6 +130294,11 @@ var CheckSettingsAutomationFluent = class extends CheckSettingsBaseFluent {
|
|
|
130243
130294
|
return utils14.types.isNumber(value) || utils14.types.isString(value) || this._isElementReference(value);
|
|
130244
130295
|
}
|
|
130245
130296
|
region(region) {
|
|
130297
|
+
if (utils14.types.isPlainObject(region) && utils14.types.has(region, "page")) {
|
|
130298
|
+
const { page, ...regionWithoutPage } = region;
|
|
130299
|
+
this._settings.page = page;
|
|
130300
|
+
region = regionWithoutPage;
|
|
130301
|
+
}
|
|
130246
130302
|
if (this._isSelectorReference(region) && this._isSelectorReference(this._settings.region) && utils14.types.has(this._settings.region, "selector")) {
|
|
130247
130303
|
let lastSelector = this._settings.region;
|
|
130248
130304
|
while (lastSelector.shadow)
|
|
@@ -130270,7 +130326,15 @@ var CheckSettingsAutomationFluent = class extends CheckSettingsBaseFluent {
|
|
|
130270
130326
|
return this;
|
|
130271
130327
|
}
|
|
130272
130328
|
frame(contextOrFrame, scrollRootElement) {
|
|
130329
|
+
let page;
|
|
130330
|
+
if (utils14.types.isPlainObject(contextOrFrame) && utils14.types.has(contextOrFrame, "page")) {
|
|
130331
|
+
page = contextOrFrame.page;
|
|
130332
|
+
}
|
|
130273
130333
|
const context = this._isFrameReference(contextOrFrame) || this._isSelectorReference(contextOrFrame) ? { frame: contextOrFrame, scrollRootElement } : contextOrFrame;
|
|
130334
|
+
if (page) {
|
|
130335
|
+
;
|
|
130336
|
+
this._settings.page = page;
|
|
130337
|
+
}
|
|
130274
130338
|
if (!this._settings.frames)
|
|
130275
130339
|
this._settings.frames = [];
|
|
130276
130340
|
this._settings.frames.push(context);
|
|
@@ -130391,7 +130455,7 @@ var CheckSettingsAutomationFluent = class extends CheckSettingsBaseFluent {
|
|
|
130391
130455
|
toJSON() {
|
|
130392
130456
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
130393
130457
|
return {
|
|
130394
|
-
target:
|
|
130458
|
+
target: this._settings.page,
|
|
130395
130459
|
settings: utils14.general.removeUndefinedProps({
|
|
130396
130460
|
name: this._settings.name,
|
|
130397
130461
|
region: this._settings.region ? this.toCoreRegion(this._settings.region) : this._settings.region,
|
|
@@ -133349,7 +133413,11 @@ var Eyes = class {
|
|
|
133349
133413
|
return this.check({ name, region: selector, timeout, fully: true });
|
|
133350
133414
|
}
|
|
133351
133415
|
async checkRegion(imageOrRegion, regionOrName, nameOrTimeout, ignoreMismatch = false) {
|
|
133352
|
-
return utils32.types.has(imageOrRegion, ["x", "y", "width", "height"]) ? this.check({
|
|
133416
|
+
return utils32.types.has(imageOrRegion, ["x", "y", "width", "height"]) ? this.check({
|
|
133417
|
+
region: imageOrRegion,
|
|
133418
|
+
name: regionOrName,
|
|
133419
|
+
timeout: nameOrTimeout
|
|
133420
|
+
}) : this.check(
|
|
133353
133421
|
{ image: imageOrRegion },
|
|
133354
133422
|
{ region: regionOrName, name: nameOrTimeout, ignoreMismatch }
|
|
133355
133423
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-browser",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.22",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"applitools",
|
|
6
6
|
"browser",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@applitools/eyes": "1.
|
|
51
|
+
"@applitools/eyes": "1.38.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^12.20.55",
|
package/types/Eyes.d.ts
CHANGED
|
@@ -26,7 +26,8 @@ import { ValidationResult } from './output/ValidationResult';
|
|
|
26
26
|
import { SessionEventHandler, SessionEventHandlers } from './SessionEventHandlers';
|
|
27
27
|
import { EyesRunner } from './Runners';
|
|
28
28
|
import { Logger } from './Logger';
|
|
29
|
-
export
|
|
29
|
+
export { CheckSettingsOptIn } from './input/CheckSettings';
|
|
30
|
+
export declare class Eyes<TSpec extends Core.SpecType = Core.SpecType, TCheckSettingsWithAutomation extends CheckSettingsAutomation<TSpec> = CheckSettingsAutomation<TSpec>> {
|
|
30
31
|
protected static readonly _sdk: SDK<Core.SpecType>;
|
|
31
32
|
protected get _sdk(): SDK<TSpec>;
|
|
32
33
|
private _logger;
|
|
@@ -102,7 +103,7 @@ export declare class Eyes<TSpec extends Core.SpecType = Core.SpecType> {
|
|
|
102
103
|
open(appName?: string, testName?: string, viewportSize?: RectangleSize, sessionType?: SessionType): Promise<void>;
|
|
103
104
|
check(name: string, checkSettings: CheckSettingsImageFluent | CheckSettingsAutomationFluent<TSpec>): Promise<MatchResultData>;
|
|
104
105
|
check(target: Image, checkSettings?: CheckSettingsImage): Promise<MatchResultData>;
|
|
105
|
-
check(checkSettings?:
|
|
106
|
+
check(checkSettings?: TCheckSettingsWithAutomation): Promise<MatchResultData>;
|
|
106
107
|
/** @deprecated */
|
|
107
108
|
checkWindow(name?: string, timeout?: number, fully?: boolean): Promise<MatchResultData>;
|
|
108
109
|
/** @deprecated */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CheckSettingsOptIn as CheckSettings, RegionReferenceWithPage as RegionReference } from './input/CheckSettings';
|
|
@@ -6,6 +6,7 @@ export type BatchInfo = {
|
|
|
6
6
|
startedAt?: Date | string;
|
|
7
7
|
notifyOnCompletion?: boolean;
|
|
8
8
|
properties?: PropertyData[];
|
|
9
|
+
buildId?: string;
|
|
9
10
|
};
|
|
10
11
|
export declare class BatchInfoData implements Required<BatchInfo> {
|
|
11
12
|
private _batch;
|
|
@@ -38,6 +39,10 @@ export declare class BatchInfoData implements Required<BatchInfo> {
|
|
|
38
39
|
setProperties(properties: PropertyData[]): this;
|
|
39
40
|
addProperty(name: string, value: string): this;
|
|
40
41
|
addProperty(prop: PropertyData): this;
|
|
42
|
+
get buildId(): string;
|
|
43
|
+
set buildId(buildId: string);
|
|
44
|
+
getBuildId(): string;
|
|
45
|
+
setBuildId(buildId: string): this;
|
|
41
46
|
/** @internal */
|
|
42
47
|
toObject(): BatchInfo;
|
|
43
48
|
/** @internal */
|
|
@@ -82,7 +82,7 @@ type LayoutBreakpoints = boolean | number[] | {
|
|
|
82
82
|
heightBreakpoints: boolean;
|
|
83
83
|
reload?: boolean;
|
|
84
84
|
};
|
|
85
|
-
export type CheckSettingsAutomation<TSpec extends Core.SpecType
|
|
85
|
+
export type CheckSettingsAutomation<TSpec extends Core.SpecType, TRegionReference = RegionReference<TSpec>> = CheckSettingsBase<TRegionReference> & {
|
|
86
86
|
frames?: (ContextReference<TSpec> | FrameReference<TSpec>)[];
|
|
87
87
|
webview?: boolean | string;
|
|
88
88
|
scrollRootElement?: ElementReference<TSpec>;
|
|
@@ -108,6 +108,31 @@ export type CheckSettingsAutomation<TSpec extends Core.SpecType> = CheckSettings
|
|
|
108
108
|
waitBeforeCapture?: number | (() => Promise<void>);
|
|
109
109
|
lazyLoad?: boolean | LazyLoadOptions;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* All available opt-in properties for CheckSettings.
|
|
113
|
+
* Platforms can selectively include these properties as needed.
|
|
114
|
+
*
|
|
115
|
+
* @template TSpec - The spec type for the platform
|
|
116
|
+
*/
|
|
117
|
+
type CheckSettingsWithPage<TSpec extends Core.SpecType> = {
|
|
118
|
+
page?: TSpec['driver'];
|
|
119
|
+
};
|
|
120
|
+
export type RegionReferenceWithPage<TSpec extends Core.SpecType> = (Region & {
|
|
121
|
+
page?: TSpec['driver'];
|
|
122
|
+
}) | {
|
|
123
|
+
selector: TSpec['selector'] | string;
|
|
124
|
+
page?: TSpec['driver'];
|
|
125
|
+
} | ElementReference<TSpec>;
|
|
126
|
+
/**
|
|
127
|
+
* Opt-in properties for multi-page context support.
|
|
128
|
+
* Platforms that support multi-page contexts (Playwright, Puppeteer) should include this.
|
|
129
|
+
*
|
|
130
|
+
* @template TSpec - The spec type for the platform
|
|
131
|
+
* @template TKeys - Optional array of property keys to include. If not specified, only 'page' is included.
|
|
132
|
+
*
|
|
133
|
+
*/
|
|
134
|
+
export type CheckSettingsOptIn<TSpec extends Core.SpecType, TKeys extends readonly (keyof CheckSettingsWithPage<TSpec>)[] = ['page']> = Pick<CheckSettingsWithPage<TSpec>, TKeys[number]>;
|
|
135
|
+
export type CheckSettingsAutomationWithOptIn<TSpec extends Core.SpecType> = CheckSettingsAutomation<TSpec, RegionReferenceWithPage<TSpec>> & CheckSettingsOptIn<TSpec, ['page']>;
|
|
111
136
|
export declare class CheckSettingsBaseFluent<TRegion = never> {
|
|
112
137
|
protected _settings: CheckSettingsBase<TRegion>;
|
|
113
138
|
protected parent?: this;
|
|
@@ -192,16 +217,17 @@ export declare class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
|
|
|
192
217
|
settings: Core.CheckSettings<never, 'classic'>;
|
|
193
218
|
};
|
|
194
219
|
}
|
|
195
|
-
export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType = Core.SpecType> extends CheckSettingsBaseFluent<RegionReference<TSpec>> {
|
|
220
|
+
export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType = Core.SpecType, TCheckSettingsWithAutomation extends CheckSettingsAutomation<TSpec> = CheckSettingsAutomation<TSpec>> extends CheckSettingsBaseFluent<RegionReference<TSpec>> {
|
|
196
221
|
protected _settings: CheckSettingsAutomation<TSpec>;
|
|
197
222
|
protected static readonly _spec: Core.SpecDriver<Core.SpecType>;
|
|
198
223
|
protected _spec: Core.SpecDriver<TSpec>;
|
|
199
224
|
protected _isElementReference(value: any): value is ElementReference<TSpec>;
|
|
200
225
|
protected _isSelectorReference(selector: any): selector is SelectorReference<TSpec>;
|
|
201
226
|
protected _isFrameReference(value: any): value is FrameReference<TSpec>;
|
|
202
|
-
constructor(settings?:
|
|
227
|
+
constructor(settings?: CheckSettingsAutomationFluent<TSpec>);
|
|
228
|
+
constructor(settings?: TCheckSettingsWithAutomation);
|
|
203
229
|
/** @internal */
|
|
204
|
-
constructor(settings?:
|
|
230
|
+
constructor(settings?: TCheckSettingsWithAutomation | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>, parent?: CheckSettingsAutomationFluent<TSpec>);
|
|
205
231
|
region(region: RegionReference<TSpec>): this;
|
|
206
232
|
shadow(selector: SelectorReference<TSpec>): typeof this;
|
|
207
233
|
frame(context: ContextReference<TSpec>): this;
|
|
@@ -252,7 +278,7 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
|
|
|
252
278
|
};
|
|
253
279
|
/** @internal */
|
|
254
280
|
toJSON(): {
|
|
255
|
-
target: undefined;
|
|
281
|
+
target: TSpec['driver'] | undefined;
|
|
256
282
|
settings: Core.CheckSettings<TSpec, 'classic'> & Core.CheckSettings<TSpec, 'ufg'>;
|
|
257
283
|
};
|
|
258
284
|
}
|
|
@@ -264,7 +290,7 @@ export type TargetImage = {
|
|
|
264
290
|
url(imageUrl: URL | string): CheckSettingsImageFluent;
|
|
265
291
|
};
|
|
266
292
|
export declare const TargetImage: TargetImage;
|
|
267
|
-
export type
|
|
293
|
+
export type TargetAutomationBase<TSpec extends Core.SpecType = Core.SpecType> = {
|
|
268
294
|
/** @internal */
|
|
269
295
|
spec: Core.SpecDriver<TSpec>;
|
|
270
296
|
window(): CheckSettingsAutomationFluent<TSpec>;
|
|
@@ -274,7 +300,8 @@ export type TargetAutomation<TSpec extends Core.SpecType = Core.SpecType> = {
|
|
|
274
300
|
shadow(selector: SelectorReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
|
|
275
301
|
webview(webview?: string | boolean): CheckSettingsAutomationFluent<TSpec>;
|
|
276
302
|
};
|
|
277
|
-
export
|
|
303
|
+
export type TargetAutomation<TSpec extends Core.SpecType = Core.SpecType> = TargetAutomationBase<TSpec>;
|
|
304
|
+
export declare const TargetAutomation: TargetAutomationBase<Core.SpecType>;
|
|
278
305
|
export type Target<TSpec extends Core.SpecType = Core.SpecType> = TargetImage & TargetAutomation<TSpec>;
|
|
279
306
|
export declare const Target: Target<Core.SpecType>;
|
|
280
307
|
export {};
|