@applitools/eyes-browser 1.4.2 → 1.4.3
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 +7 -0
- package/dist/index.js +196 -20
- package/package.json +1 -1
- package/types/input/CheckSettings.d.ts +53 -48
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.3](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.4.2...js/eyes-browser@1.4.3) (2024-05-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* trigger js build ([6d486b7](https://github.com/Applitools-Dev/sdk/commit/6d486b7471e15504b1f712e2979ca3c543c1157a))
|
|
9
|
+
|
|
3
10
|
## [1.4.2](https://github.com/Applitools-Dev/sdk/compare/js/eyes-browser@1.4.1...js/eyes-browser@1.4.2) (2024-05-07)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.js
CHANGED
|
@@ -36695,7 +36695,9 @@ var require_check2 = __commonJS({
|
|
|
36695
36695
|
if (settings.retryTimeout) {
|
|
36696
36696
|
logger.log(`Retry timeout is set to ${settings.retryTimeout}ms - will retry checking until it passes or timeout is reached`);
|
|
36697
36697
|
const start = Date.now();
|
|
36698
|
-
|
|
36698
|
+
const environmentLogger = logger.extend({ tags: [`environment-${utils34.general.shortid()}`] });
|
|
36699
|
+
const baseEyes = await Promise.all(uniqueEnvironments.map((environment) => getBaseEyes({ environment, driver, logger: environmentLogger })));
|
|
36700
|
+
if (baseEyes.map((baseEye) => baseEye.test.isNew).some((isNew) => isNew)) {
|
|
36699
36701
|
await new Promise((resolve) => setTimeout(resolve, settings.retryTimeout));
|
|
36700
36702
|
}
|
|
36701
36703
|
let asExpected = false, retries = 0;
|
|
@@ -36747,11 +36749,39 @@ var require_check2 = __commonJS({
|
|
|
36747
36749
|
item.jobs.push(promise.then());
|
|
36748
36750
|
return item;
|
|
36749
36751
|
}
|
|
36752
|
+
function getBaseEyes({ environment, driver, logger }) {
|
|
36753
|
+
return eyes.getBaseEyes({ settings: { environment, driver }, logger });
|
|
36754
|
+
}
|
|
36750
36755
|
}
|
|
36751
36756
|
exports.makeCheck = makeCheck;
|
|
36752
|
-
async function
|
|
36753
|
-
|
|
36754
|
-
|
|
36757
|
+
async function logAmmutabilityIfNeeded({ eyes, baseEyes, settings }) {
|
|
36758
|
+
var _a;
|
|
36759
|
+
if (settings.assumesMutability) {
|
|
36760
|
+
await eyes.core.logEvent({
|
|
36761
|
+
settings: {
|
|
36762
|
+
level: "Notice",
|
|
36763
|
+
event: {
|
|
36764
|
+
type: "eyes.check",
|
|
36765
|
+
message: "Assuming mutability for check Target",
|
|
36766
|
+
test: {
|
|
36767
|
+
checkName: settings.name,
|
|
36768
|
+
batchId: baseEyes.test.batchId,
|
|
36769
|
+
sessionId: baseEyes.test.sessionId,
|
|
36770
|
+
testName: baseEyes.test.testName,
|
|
36771
|
+
testId: baseEyes.test.testId,
|
|
36772
|
+
userTestId: baseEyes.test.userTestId,
|
|
36773
|
+
appId: baseEyes.test.appId,
|
|
36774
|
+
baselineId: baseEyes.test.baselineId,
|
|
36775
|
+
environmentId: (_a = baseEyes.test.environment) === null || _a === void 0 ? void 0 : _a.environmentId
|
|
36776
|
+
},
|
|
36777
|
+
isNew: baseEyes.test.isNew,
|
|
36778
|
+
resultsUrl: baseEyes.test.resultsUrl
|
|
36779
|
+
},
|
|
36780
|
+
...eyes.test.eyesServer
|
|
36781
|
+
}
|
|
36782
|
+
});
|
|
36783
|
+
settings.assumesMutability = false;
|
|
36784
|
+
}
|
|
36755
36785
|
}
|
|
36756
36786
|
async function checkEnvironment({ eyes, driver, target, environment, signal, logger, settings }) {
|
|
36757
36787
|
var _a, _b;
|
|
@@ -36762,6 +36792,11 @@ var require_check2 = __commonJS({
|
|
|
36762
36792
|
abortError({ logger: environmentLogger, message: 'Command "check" was aborted before checking' });
|
|
36763
36793
|
}
|
|
36764
36794
|
const baseEyes = await eyes.getBaseEyes({ settings: { environment, driver }, logger: environmentLogger });
|
|
36795
|
+
void logAmmutabilityIfNeeded({
|
|
36796
|
+
eyes,
|
|
36797
|
+
baseEyes,
|
|
36798
|
+
settings
|
|
36799
|
+
});
|
|
36765
36800
|
try {
|
|
36766
36801
|
if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
|
36767
36802
|
abortError({
|
|
@@ -37107,7 +37142,7 @@ var require_check_and_close2 = __commonJS({
|
|
|
37107
37142
|
baseSettings.push(settings);
|
|
37108
37143
|
}
|
|
37109
37144
|
const promises = exactEnvironments.map(async (environment, index) => {
|
|
37110
|
-
var _a2, _b2, _c2;
|
|
37145
|
+
var _a2, _b2, _c2, _d;
|
|
37111
37146
|
const environmentLogger = logger.extend({ tags: [`environment-${utils34.general.shortid()}`] });
|
|
37112
37147
|
try {
|
|
37113
37148
|
if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
|
@@ -37123,13 +37158,38 @@ var require_check_and_close2 = __commonJS({
|
|
|
37123
37158
|
environmentLogger.warn(`Check on environment with id "${(_a2 = baseEyes.test.environment) === null || _a2 === void 0 ? void 0 : _a2.environmentId}" was aborted during one of the previous steps`);
|
|
37124
37159
|
throw new abort_error_1.AbortError(`Check on environment with id "${(_b2 = baseEyes.test.environment) === null || _b2 === void 0 ? void 0 : _b2.environmentId}" was aborted during one of the previous steps`);
|
|
37125
37160
|
}
|
|
37161
|
+
if (settings.assumesMutability) {
|
|
37162
|
+
eyes.core.logEvent({
|
|
37163
|
+
settings: {
|
|
37164
|
+
level: "Notice",
|
|
37165
|
+
event: {
|
|
37166
|
+
type: "eyes.check",
|
|
37167
|
+
message: "Assuming mutability for check Target",
|
|
37168
|
+
test: {
|
|
37169
|
+
checkName: settings.name,
|
|
37170
|
+
batchId: baseEyes.test.batchId,
|
|
37171
|
+
sessionId: baseEyes.test.sessionId,
|
|
37172
|
+
testName: baseEyes.test.testName,
|
|
37173
|
+
testId: baseEyes.test.testId,
|
|
37174
|
+
userTestId: baseEyes.test.userTestId,
|
|
37175
|
+
appId: baseEyes.test.appId,
|
|
37176
|
+
baselineId: baseEyes.test.baselineId,
|
|
37177
|
+
environmentId: (_c2 = baseEyes.test.environment) === null || _c2 === void 0 ? void 0 : _c2.environmentId
|
|
37178
|
+
},
|
|
37179
|
+
isNew: baseEyes.test.isNew,
|
|
37180
|
+
resultsUrl: baseEyes.test.resultsUrl
|
|
37181
|
+
},
|
|
37182
|
+
...eyes.test.eyesServer
|
|
37183
|
+
}
|
|
37184
|
+
});
|
|
37185
|
+
}
|
|
37126
37186
|
await baseEyes.checkAndClose({
|
|
37127
37187
|
target: baseTargets[index],
|
|
37128
37188
|
settings: baseSettings[index],
|
|
37129
37189
|
logger: environmentLogger
|
|
37130
37190
|
});
|
|
37131
37191
|
} catch (error) {
|
|
37132
|
-
environmentLogger.error(`Check on environment with id "${(
|
|
37192
|
+
environmentLogger.error(`Check on environment with id "${(_d = baseEyes.test.environment) === null || _d === void 0 ? void 0 : _d.environmentId}" failed due to an error`, error);
|
|
37133
37193
|
if (baseEyes.running && !(signal === null || signal === void 0 ? void 0 : signal.aborted))
|
|
37134
37194
|
await baseEyes.abort({ logger: environmentLogger, settings: { reason: error } });
|
|
37135
37195
|
}
|
|
@@ -85203,7 +85263,7 @@ var require_check3 = __commonJS({
|
|
|
85203
85263
|
}
|
|
85204
85264
|
const generatedSelectors = snapshots.map((snapshot) => getGeneratedSelectors(utils34.types.has(snapshot, "generatedSelectors") ? snapshot.generatedSelectors : void 0));
|
|
85205
85265
|
const promises = uniqueEnvironments.map(async (environment, index) => {
|
|
85206
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
85266
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _j;
|
|
85207
85267
|
const environmentLogger = logger.extend({ tags: [`environment-${utils34.general.shortid()}`] });
|
|
85208
85268
|
const ufgEnvironment = environment;
|
|
85209
85269
|
if (utils34.types.has(ufgEnvironment, "name") && ufgEnvironment.name === "edge") {
|
|
@@ -85283,13 +85343,38 @@ var require_check3 = __commonJS({
|
|
|
85283
85343
|
environmentLogger.warn(`Render on environment with id "${(_f = baseEyes.test.environment) === null || _f === void 0 ? void 0 : _f.environmentId}" was aborted during one of the previous steps`);
|
|
85284
85344
|
throw new abort_error_1.AbortError(`Render on environment with id "${(_g = baseEyes.test.environment) === null || _g === void 0 ? void 0 : _g.environmentId}" was aborted during one of the previous steps`);
|
|
85285
85345
|
}
|
|
85346
|
+
if (settings.assumesMutability) {
|
|
85347
|
+
eyes.core.logEvent({
|
|
85348
|
+
settings: {
|
|
85349
|
+
level: "Notice",
|
|
85350
|
+
event: {
|
|
85351
|
+
type: "eyes.check",
|
|
85352
|
+
message: "Assuming mutability for check Target",
|
|
85353
|
+
test: {
|
|
85354
|
+
checkName: settings.name,
|
|
85355
|
+
batchId: baseEyes.test.batchId,
|
|
85356
|
+
sessionId: baseEyes.test.sessionId,
|
|
85357
|
+
testName: baseEyes.test.testName,
|
|
85358
|
+
testId: baseEyes.test.testId,
|
|
85359
|
+
userTestId: baseEyes.test.userTestId,
|
|
85360
|
+
appId: baseEyes.test.appId,
|
|
85361
|
+
baselineId: baseEyes.test.baselineId,
|
|
85362
|
+
environmentId: (_h = baseEyes.test.environment) === null || _h === void 0 ? void 0 : _h.environmentId
|
|
85363
|
+
},
|
|
85364
|
+
isNew: baseEyes.test.isNew,
|
|
85365
|
+
resultsUrl: baseEyes.test.resultsUrl
|
|
85366
|
+
},
|
|
85367
|
+
...eyes.test.eyesServer
|
|
85368
|
+
}
|
|
85369
|
+
});
|
|
85370
|
+
}
|
|
85286
85371
|
await baseEyes.check({
|
|
85287
85372
|
target: { ...baseTarget, isTransformed: true },
|
|
85288
85373
|
settings: baseSettings,
|
|
85289
85374
|
logger: environmentLogger
|
|
85290
85375
|
});
|
|
85291
85376
|
} catch (error) {
|
|
85292
|
-
environmentLogger.error(`Render on environment with id "${(
|
|
85377
|
+
environmentLogger.error(`Render on environment with id "${(_j = baseEyes.test.environment) === null || _j === void 0 ? void 0 : _j.environmentId}" failed due to an error`, error);
|
|
85293
85378
|
if (baseEyes.running && !(signal === null || signal === void 0 ? void 0 : signal.aborted))
|
|
85294
85379
|
await baseEyes.abort({ logger: environmentLogger, settings: { reason: error } });
|
|
85295
85380
|
}
|
|
@@ -85448,7 +85533,7 @@ var require_check_and_close3 = __commonJS({
|
|
|
85448
85533
|
}
|
|
85449
85534
|
const generatedSelectors = snapshots.map((snapshot) => getGeneratedSelectors(utils34.types.has(snapshot, "generatedSelectors") ? snapshot.generatedSelectors : void 0));
|
|
85450
85535
|
const promises = uniqueEnvironments.map(async (environment, index) => {
|
|
85451
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h;
|
|
85536
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _j;
|
|
85452
85537
|
const environmentLogger = logger.extend({ tags: [`environment-${utils34.general.shortid()}`] });
|
|
85453
85538
|
const ufgEnvironment = environment;
|
|
85454
85539
|
if (utils34.types.has(ufgEnvironment, "name") && ufgEnvironment.name === "edge") {
|
|
@@ -85528,13 +85613,38 @@ var require_check_and_close3 = __commonJS({
|
|
|
85528
85613
|
environmentLogger.warn(`Render on environment with id "${(_f = baseEyes.test.environment) === null || _f === void 0 ? void 0 : _f.environmentId}" was aborted during one of the previous steps`);
|
|
85529
85614
|
throw new abort_error_1.AbortError(`Render on environment with id "${(_g = baseEyes.test.environment) === null || _g === void 0 ? void 0 : _g.environmentId}" was aborted during one of the previous steps`);
|
|
85530
85615
|
}
|
|
85616
|
+
if (settings.assumesMutability) {
|
|
85617
|
+
eyes.core.logEvent({
|
|
85618
|
+
settings: {
|
|
85619
|
+
level: "Notice",
|
|
85620
|
+
event: {
|
|
85621
|
+
type: "eyes.check",
|
|
85622
|
+
message: "Assuming mutability for check Target",
|
|
85623
|
+
test: {
|
|
85624
|
+
checkName: settings.name,
|
|
85625
|
+
batchId: baseEyes.test.batchId,
|
|
85626
|
+
sessionId: baseEyes.test.sessionId,
|
|
85627
|
+
testName: baseEyes.test.testName,
|
|
85628
|
+
testId: baseEyes.test.testId,
|
|
85629
|
+
userTestId: baseEyes.test.userTestId,
|
|
85630
|
+
appId: baseEyes.test.appId,
|
|
85631
|
+
baselineId: baseEyes.test.baselineId,
|
|
85632
|
+
environmentId: (_h = baseEyes.test.environment) === null || _h === void 0 ? void 0 : _h.environmentId
|
|
85633
|
+
},
|
|
85634
|
+
isNew: baseEyes.test.isNew,
|
|
85635
|
+
resultsUrl: baseEyes.test.resultsUrl
|
|
85636
|
+
},
|
|
85637
|
+
...eyes.test.eyesServer
|
|
85638
|
+
}
|
|
85639
|
+
});
|
|
85640
|
+
}
|
|
85531
85641
|
await baseEyes.checkAndClose({
|
|
85532
85642
|
target: { ...baseTarget, isTransformed: true },
|
|
85533
85643
|
settings: baseSettings,
|
|
85534
85644
|
logger: environmentLogger
|
|
85535
85645
|
});
|
|
85536
85646
|
} catch (error) {
|
|
85537
|
-
environmentLogger.error(`Render on environment with id "${(
|
|
85647
|
+
environmentLogger.error(`Render on environment with id "${(_j = baseEyes.test.environment) === null || _j === void 0 ? void 0 : _j.environmentId}" failed due to an error`, error);
|
|
85538
85648
|
if (baseEyes.running && !(signal === null || signal === void 0 ? void 0 : signal.aborted))
|
|
85539
85649
|
await baseEyes.abort({ logger: environmentLogger, settings: { reason: error } });
|
|
85540
85650
|
}
|
|
@@ -92795,9 +92905,18 @@ init_buffer();
|
|
|
92795
92905
|
init_setInterval();
|
|
92796
92906
|
var utils14 = __toESM(require_browser3());
|
|
92797
92907
|
var CheckSettingsBaseFluent = class {
|
|
92798
|
-
constructor(settings) {
|
|
92908
|
+
constructor(settings, parent) {
|
|
92799
92909
|
this._settings = {};
|
|
92910
|
+
this.childs = [];
|
|
92911
|
+
var _a;
|
|
92800
92912
|
this._settings = utils14.types.instanceOf(settings, CheckSettingsBaseFluent) ? settings.toObject() : settings != null ? settings : {};
|
|
92913
|
+
this.parent = parent != null ? parent : settings == null ? void 0 : settings.parent;
|
|
92914
|
+
if (parent) {
|
|
92915
|
+
(_a = parent.childs) != null ? _a : parent.childs = [];
|
|
92916
|
+
parent.childs.push(this);
|
|
92917
|
+
} else {
|
|
92918
|
+
this._settings = utils14.types.instanceOf(settings, CheckSettingsBaseFluent) ? settings.toObject() : settings != null ? settings : {};
|
|
92919
|
+
}
|
|
92801
92920
|
}
|
|
92802
92921
|
region(region) {
|
|
92803
92922
|
if (utils14.types.has(region, ["left", "top", "width", "height"])) {
|
|
@@ -93005,11 +93124,58 @@ var CheckSettingsBaseFluent = class {
|
|
|
93005
93124
|
toString() {
|
|
93006
93125
|
return utils14.general.toString(this);
|
|
93007
93126
|
}
|
|
93127
|
+
/** @internal */
|
|
93128
|
+
assumesMutability() {
|
|
93129
|
+
if (this.childs.length)
|
|
93130
|
+
return true;
|
|
93131
|
+
for (let parent = this.parent; parent; parent = parent.parent) {
|
|
93132
|
+
if (parent.childs.length !== 1)
|
|
93133
|
+
return true;
|
|
93134
|
+
}
|
|
93135
|
+
return void 0;
|
|
93136
|
+
}
|
|
93137
|
+
static makeMutableTreeProxy(self2, ctor) {
|
|
93138
|
+
const shouldNotBeProxied = ["assumesMutability", "childs", "parent"];
|
|
93139
|
+
const shouldNotCreateChild = ["toObject", "toJSON", "toString"];
|
|
93140
|
+
return new Proxy(self2, {
|
|
93141
|
+
get(target, prop, receiver) {
|
|
93142
|
+
if (shouldNotBeProxied.includes(String(prop)))
|
|
93143
|
+
return Reflect.get(target, prop, receiver);
|
|
93144
|
+
let rootTarget = target;
|
|
93145
|
+
while (rootTarget.parent)
|
|
93146
|
+
rootTarget = rootTarget.parent;
|
|
93147
|
+
const origProp = Reflect.get(rootTarget, prop, receiver);
|
|
93148
|
+
if (typeof origProp !== "function")
|
|
93149
|
+
return origProp;
|
|
93150
|
+
if (shouldNotCreateChild.includes(String(prop)))
|
|
93151
|
+
return origProp;
|
|
93152
|
+
return function(...args) {
|
|
93153
|
+
const result = origProp.call(rootTarget, ...args);
|
|
93154
|
+
if (result instanceof CheckSettingsBaseFluent) {
|
|
93155
|
+
if (result instanceof CheckSettingsImageFluent || result instanceof CheckSettingsAutomationFluent) {
|
|
93156
|
+
return new ctor(null, null, target);
|
|
93157
|
+
} else {
|
|
93158
|
+
throw new Error("Unknown CheckSettings type");
|
|
93159
|
+
}
|
|
93160
|
+
}
|
|
93161
|
+
return result;
|
|
93162
|
+
};
|
|
93163
|
+
}
|
|
93164
|
+
});
|
|
93165
|
+
}
|
|
93008
93166
|
};
|
|
93009
93167
|
var CheckSettingsImageFluent = class extends CheckSettingsBaseFluent {
|
|
93010
|
-
constructor(settings, target) {
|
|
93011
|
-
super(
|
|
93012
|
-
|
|
93168
|
+
constructor(settings, target, parent) {
|
|
93169
|
+
super(void 0, parent);
|
|
93170
|
+
const self2 = CheckSettingsBaseFluent.makeMutableTreeProxy(this, CheckSettingsImageFluent);
|
|
93171
|
+
this._target = null;
|
|
93172
|
+
self2._target = target != null ? target : settings == null ? void 0 : settings._target;
|
|
93173
|
+
self2._settings = utils14.types.instanceOf(settings, CheckSettingsImageFluent) ? settings.toObject() : settings != null ? settings : {};
|
|
93174
|
+
if (settings instanceof CheckSettingsImageFluent) {
|
|
93175
|
+
parent != null ? parent : parent = settings.parent;
|
|
93176
|
+
parent == null ? void 0 : parent.childs.pop();
|
|
93177
|
+
}
|
|
93178
|
+
return self2;
|
|
93013
93179
|
}
|
|
93014
93180
|
image(image) {
|
|
93015
93181
|
var _a;
|
|
@@ -93064,16 +93230,25 @@ var CheckSettingsImageFluent = class extends CheckSettingsBaseFluent {
|
|
|
93064
93230
|
floatingRegions: (_e = this._settings.floatingRegions) == null ? void 0 : _e.slice(),
|
|
93065
93231
|
accessibilityRegions: (_f = this._settings.accessibilityRegions) == null ? void 0 : _f.slice(),
|
|
93066
93232
|
pageId: this._settings.pageId,
|
|
93067
|
-
userCommandId: this._settings.variationGroupId
|
|
93233
|
+
userCommandId: this._settings.variationGroupId,
|
|
93234
|
+
assumesMutability: this.assumesMutability()
|
|
93068
93235
|
})
|
|
93069
93236
|
};
|
|
93070
93237
|
}
|
|
93071
93238
|
};
|
|
93072
93239
|
var CheckSettingsAutomationFluent = class extends CheckSettingsBaseFluent {
|
|
93073
|
-
constructor(settings, spec) {
|
|
93074
|
-
super(settings);
|
|
93075
|
-
this.
|
|
93076
|
-
this.
|
|
93240
|
+
constructor(settings, spec, parent) {
|
|
93241
|
+
super(void 0, parent != null ? parent : settings == null ? void 0 : settings.parent);
|
|
93242
|
+
this._settings = null;
|
|
93243
|
+
this._spec = null;
|
|
93244
|
+
const self2 = CheckSettingsBaseFluent.makeMutableTreeProxy(this, CheckSettingsAutomationFluent);
|
|
93245
|
+
self2._spec = spec;
|
|
93246
|
+
self2._settings = utils14.types.instanceOf(settings, CheckSettingsAutomationFluent) ? settings.toObject() : settings != null ? settings : {};
|
|
93247
|
+
if (settings instanceof CheckSettingsAutomationFluent) {
|
|
93248
|
+
parent != null ? parent : parent = settings.parent;
|
|
93249
|
+
parent == null ? void 0 : parent.childs.pop();
|
|
93250
|
+
}
|
|
93251
|
+
return self2;
|
|
93077
93252
|
}
|
|
93078
93253
|
_isElementReference(value) {
|
|
93079
93254
|
var _a, _b, _c;
|
|
@@ -93254,7 +93429,8 @@ var CheckSettingsAutomationFluent = class extends CheckSettingsBaseFluent {
|
|
|
93254
93429
|
waitBeforeCapture: this._settings.waitBeforeCapture,
|
|
93255
93430
|
retryTimeout: this._settings.timeout,
|
|
93256
93431
|
userCommandId: this._settings.variationGroupId,
|
|
93257
|
-
densityMetrics: this._settings.densityMetrics
|
|
93432
|
+
densityMetrics: this._settings.densityMetrics,
|
|
93433
|
+
assumesMutability: this.assumesMutability()
|
|
93258
93434
|
})
|
|
93259
93435
|
};
|
|
93260
93436
|
}
|
package/package.json
CHANGED
|
@@ -92,22 +92,24 @@ export type CheckSettingsAutomation<TSpec extends Core.SpecType> = CheckSettings
|
|
|
92
92
|
};
|
|
93
93
|
export declare class CheckSettingsBaseFluent<TRegion = never> {
|
|
94
94
|
protected _settings: CheckSettingsBase<TRegion>;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
protected parent?: this;
|
|
96
|
+
protected childs: this[];
|
|
97
|
+
constructor(settings?: CheckSettingsBase<TRegion> | CheckSettingsBaseFluent<TRegion>, parent?: CheckSettingsBaseFluent<TRegion>);
|
|
98
|
+
region(region: Region | LegacyRegion | TRegion): typeof this;
|
|
99
|
+
name(name: string): typeof this;
|
|
98
100
|
withName(name: string): this;
|
|
99
|
-
ignoreRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
|
|
100
|
-
ignoreRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
101
|
+
ignoreRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
102
|
+
ignoreRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
101
103
|
/** @deprecated */
|
|
102
104
|
ignore(region: Region | LegacyRegion | TRegion): this;
|
|
103
105
|
/** @deprecated */
|
|
104
|
-
ignores(...regions: (Region | LegacyRegion | TRegion)[]): this;
|
|
105
|
-
layoutRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
|
|
106
|
-
layoutRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
107
|
-
strictRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
|
|
108
|
-
strictRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
109
|
-
contentRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): this;
|
|
110
|
-
contentRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
106
|
+
ignores(...regions: (Region | LegacyRegion | TRegion)[]): typeof this;
|
|
107
|
+
layoutRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
108
|
+
layoutRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
109
|
+
strictRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
110
|
+
strictRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
111
|
+
contentRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
112
|
+
contentRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
111
113
|
floatingRegion(region: CodedFloatingRegion<TRegion>): this;
|
|
112
114
|
floatingRegion(region: LegacyCodedFloatingRegion<TRegion>): this;
|
|
113
115
|
floatingRegion(region: Region | LegacyRegion | TRegion, maxUpOffset?: number, maxDownOffset?: number, maxLeftOffset?: number, maxRightOffset?: number): this;
|
|
@@ -125,36 +127,39 @@ export declare class CheckSettingsBaseFluent<TRegion = never> {
|
|
|
125
127
|
accessibilityRegion(region: Region | LegacyRegion | TRegion, type?: AccessibilityRegionType): this;
|
|
126
128
|
accessibilityRegions(...regions: (CodedAccessibilityRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
127
129
|
accessibilityRegions(type: AccessibilityRegionType, ...regions: (Region | LegacyRegion | TRegion)[]): this;
|
|
128
|
-
matchLevel(matchLevel: MatchLevel): this;
|
|
129
|
-
layout(): this;
|
|
130
|
-
exact(): this;
|
|
131
|
-
strict(): this;
|
|
132
|
-
ignoreColors(): this;
|
|
130
|
+
matchLevel(matchLevel: MatchLevel): typeof this;
|
|
131
|
+
layout(): typeof this;
|
|
132
|
+
exact(): typeof this;
|
|
133
|
+
strict(): typeof this;
|
|
134
|
+
ignoreColors(): typeof this;
|
|
133
135
|
/** @deprecated */
|
|
134
|
-
content(): this;
|
|
135
|
-
enablePatterns(enablePatterns?: boolean): this;
|
|
136
|
-
ignoreDisplacements(ignoreDisplacements?: boolean): this;
|
|
137
|
-
ignoreCaret(ignoreCaret?: boolean): this;
|
|
138
|
-
useDom(useDom?: boolean): this;
|
|
139
|
-
sendDom(sendDom?: boolean): this;
|
|
140
|
-
pageId(pageId: string): this;
|
|
141
|
-
variationGroupId(variationGroupId: string): this;
|
|
136
|
+
content(): typeof this;
|
|
137
|
+
enablePatterns(enablePatterns?: boolean): typeof this;
|
|
138
|
+
ignoreDisplacements(ignoreDisplacements?: boolean): typeof this;
|
|
139
|
+
ignoreCaret(ignoreCaret?: boolean): typeof this;
|
|
140
|
+
useDom(useDom?: boolean): typeof this;
|
|
141
|
+
sendDom(sendDom?: boolean): typeof this;
|
|
142
|
+
pageId(pageId: string): typeof this;
|
|
143
|
+
variationGroupId(variationGroupId: string): typeof this;
|
|
142
144
|
/** @internal */
|
|
143
145
|
toObject(): CheckSettingsBase<TRegion>;
|
|
144
146
|
/** @internal */
|
|
145
147
|
toString(): string;
|
|
148
|
+
/** @internal */
|
|
149
|
+
protected assumesMutability(): true | undefined;
|
|
150
|
+
protected static makeMutableTreeProxy<K, T extends CheckSettingsBaseFluent<K>>(self: T, ctor: new (...args: any[]) => T): T;
|
|
146
151
|
}
|
|
147
152
|
export declare class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
|
|
148
153
|
protected _target: Image;
|
|
149
|
-
constructor(settings?: CheckSettingsImage | CheckSettingsImageFluent, target?: Image);
|
|
150
|
-
image(image: Buffer | URL | string): this;
|
|
151
|
-
buffer(imageBuffer: Buffer): this;
|
|
152
|
-
base64(imageBase64: Buffer): this;
|
|
153
|
-
path(imagePath: string): this;
|
|
154
|
-
url(imageUrl: URL | string): this;
|
|
155
|
-
name(name: string): this;
|
|
156
|
-
withDom(dom: string): this;
|
|
157
|
-
withLocation(locationInViewport: Location): this;
|
|
154
|
+
constructor(settings?: CheckSettingsImage | CheckSettingsImageFluent, target?: Image, parent?: CheckSettingsImageFluent);
|
|
155
|
+
image(image: Buffer | URL | string): typeof this;
|
|
156
|
+
buffer(imageBuffer: Buffer): typeof this;
|
|
157
|
+
base64(imageBase64: Buffer): typeof this;
|
|
158
|
+
path(imagePath: string): typeof this;
|
|
159
|
+
url(imageUrl: URL | string): typeof this;
|
|
160
|
+
name(name: string): typeof this;
|
|
161
|
+
withDom(dom: string): typeof this;
|
|
162
|
+
withLocation(locationInViewport: Location): typeof this;
|
|
158
163
|
/** @internal */
|
|
159
164
|
toJSON(): {
|
|
160
165
|
target: Image;
|
|
@@ -170,24 +175,24 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
|
|
|
170
175
|
protected _isFrameReference(value: any): value is FrameReference<TSpec>;
|
|
171
176
|
constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>);
|
|
172
177
|
/** @internal */
|
|
173
|
-
constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>);
|
|
178
|
+
constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>, parent?: CheckSettingsAutomationFluent<TSpec>);
|
|
174
179
|
region(region: RegionReference<TSpec>): this;
|
|
175
|
-
shadow(selector: SelectorReference<TSpec>): this;
|
|
180
|
+
shadow(selector: SelectorReference<TSpec>): typeof this;
|
|
176
181
|
frame(context: ContextReference<TSpec>): this;
|
|
177
182
|
frame(frame: FrameReference<TSpec>, scrollRootElement?: ElementReference<TSpec>): this;
|
|
178
|
-
webview(webview?: string | boolean): this;
|
|
179
|
-
scrollRootElement(scrollRootElement: ElementReference<TSpec>): this;
|
|
180
|
-
fully(fully?: boolean): this;
|
|
183
|
+
webview(webview?: string | boolean): typeof this;
|
|
184
|
+
scrollRootElement(scrollRootElement: ElementReference<TSpec>): typeof this;
|
|
185
|
+
fully(fully?: boolean): typeof this;
|
|
181
186
|
/** @deprecated */
|
|
182
187
|
stitchContent(stitchContent?: boolean): this;
|
|
183
|
-
disableBrowserFetching(disableBrowserFetching: boolean): this;
|
|
188
|
+
disableBrowserFetching(disableBrowserFetching: boolean): typeof this;
|
|
184
189
|
layoutBreakpoints(breakpoints?: boolean | number[], settings?: {
|
|
185
190
|
reload?: boolean;
|
|
186
|
-
}): this;
|
|
187
|
-
hook(name: string, script: string): this;
|
|
188
|
-
beforeRenderScreenshotHook(script: string): this;
|
|
191
|
+
}): typeof this;
|
|
192
|
+
hook(name: string, script: string): typeof this;
|
|
193
|
+
beforeRenderScreenshotHook(script: string): typeof this;
|
|
189
194
|
/** @deprecated */
|
|
190
|
-
webHook(script: string): this;
|
|
195
|
+
webHook(script: string): typeof this;
|
|
191
196
|
ufgOption(key: string, value: any): this;
|
|
192
197
|
ufgOptions(options: {
|
|
193
198
|
[key: string]: any;
|
|
@@ -205,10 +210,10 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
|
|
|
205
210
|
[key: string]: any;
|
|
206
211
|
}): this;
|
|
207
212
|
useSystemScreenshot(useSystemScreenshot?: boolean): this;
|
|
208
|
-
timeout(timeout: number): this;
|
|
209
|
-
waitBeforeCapture(waitBeforeCapture: number): this;
|
|
210
|
-
lazyLoad(options?: LazyLoadOptions | boolean): this;
|
|
211
|
-
densityMetrics(options: DensityMetrics): this;
|
|
213
|
+
timeout(timeout: number): typeof this;
|
|
214
|
+
waitBeforeCapture(waitBeforeCapture: number): typeof this;
|
|
215
|
+
lazyLoad(options?: LazyLoadOptions | boolean): typeof this;
|
|
216
|
+
densityMetrics(options: DensityMetrics): typeof this;
|
|
212
217
|
/** @internal */
|
|
213
218
|
toJSON(): {
|
|
214
219
|
target: undefined;
|