@applitools/eyes 1.33.4 → 1.34.0-debug-20250429-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/dist/input/CheckSettings.js +87 -48
- package/package.json +4 -3
- package/types/input/CheckSettings.d.ts +20 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,101 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.34.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.33.4...js/eyes@1.34.0) (2025-04-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* height layout breakpoints ([#2801](https://github.com/Applitools-Dev/sdk/issues/2801)) ([819e241](https://github.com/Applitools-Dev/sdk/commit/819e2418f1fd93220a07dfbcf1157ffcf4995dd7))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add checks for undefined regions in CheckSettings | AD-9042 ([#2868](https://github.com/Applitools-Dev/sdk/issues/2868)) ([0f7c991](https://github.com/Applitools-Dev/sdk/commit/0f7c9913d64e0535ba5ffe632923a3bf440be65f))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* @applitools/dom-snapshot bumped to 4.11.18
|
|
19
|
+
#### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* simplify sandbox creation and ensure cleanup after execution ([#2869](https://github.com/Applitools-Dev/sdk/issues/2869)) ([72c5e01](https://github.com/Applitools-Dev/sdk/commit/72c5e01307f6abd83fab365a7e235124caae0694))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* @applitools/snippets bumped to 2.6.5
|
|
26
|
+
#### Performance Improvements
|
|
27
|
+
|
|
28
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
29
|
+
* @applitools/driver bumped to 1.21.1
|
|
30
|
+
#### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* executePoll error logging FLD-2870 ([#2890](https://github.com/Applitools-Dev/sdk/issues/2890)) ([a8ff720](https://github.com/Applitools-Dev/sdk/commit/a8ff720efafacabe2023282748a6d8a0f1b3ff73))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
* @applitools/spec-driver-webdriver bumped to 1.2.2
|
|
37
|
+
#### Performance Improvements
|
|
38
|
+
|
|
39
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
* @applitools/spec-driver-selenium bumped to 1.5.98
|
|
44
|
+
#### Performance Improvements
|
|
45
|
+
|
|
46
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.27
|
|
51
|
+
#### Performance Improvements
|
|
52
|
+
|
|
53
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
* @applitools/screenshoter bumped to 3.11.1
|
|
58
|
+
#### Performance Improvements
|
|
59
|
+
|
|
60
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
* @applitools/nml-client bumped to 1.9.1
|
|
65
|
+
#### Performance Improvements
|
|
66
|
+
|
|
67
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
* @applitools/tunnel-client bumped to 1.6.5
|
|
72
|
+
#### Bug Fixes
|
|
73
|
+
|
|
74
|
+
* enhance error messages in tunnel client ([cab26e6](https://github.com/Applitools-Dev/sdk/commit/cab26e6e3d56fa3cbabaa1a9c68de13046b8f57e))
|
|
75
|
+
* @applitools/ufg-client bumped to 1.16.9
|
|
76
|
+
#### Bug Fixes
|
|
77
|
+
|
|
78
|
+
* basic auth protected resources | FLD-2761 | FMRI-120 ([#2444](https://github.com/Applitools-Dev/sdk/issues/2444)) ([b48cf49](https://github.com/Applitools-Dev/sdk/commit/b48cf49dec50bbf1ed2ba111608a48cf09962565))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
#### Performance Improvements
|
|
82
|
+
|
|
83
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
84
|
+
* @applitools/ec-client bumped to 1.10.9
|
|
85
|
+
#### Performance Improvements
|
|
86
|
+
|
|
87
|
+
* cachify http agent ([#2466](https://github.com/Applitools-Dev/sdk/issues/2466)) ([bc2f4a1](https://github.com/Applitools-Dev/sdk/commit/bc2f4a1fae3c379f061c9199edf4c5257769fb44))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
* @applitools/core bumped to 4.37.0
|
|
92
|
+
#### Features
|
|
93
|
+
|
|
94
|
+
* height layout breakpoints ([#2801](https://github.com/Applitools-Dev/sdk/issues/2801)) ([819e241](https://github.com/Applitools-Dev/sdk/commit/819e2418f1fd93220a07dfbcf1157ffcf4995dd7))
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
3
99
|
## [1.33.2](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.33.1...js/eyes@1.33.2) (2025-04-03)
|
|
4
100
|
|
|
5
101
|
|
|
@@ -54,9 +54,11 @@ class CheckSettingsBaseFluent {
|
|
|
54
54
|
return this.name(name);
|
|
55
55
|
}
|
|
56
56
|
ignoreRegion(region) {
|
|
57
|
-
if (
|
|
58
|
-
this._settings.ignoreRegions
|
|
59
|
-
|
|
57
|
+
if (region) {
|
|
58
|
+
if (!this._settings.ignoreRegions)
|
|
59
|
+
this._settings.ignoreRegions = [];
|
|
60
|
+
this._settings.ignoreRegions.push(region);
|
|
61
|
+
}
|
|
60
62
|
return this;
|
|
61
63
|
}
|
|
62
64
|
ignoreRegions(...regions) {
|
|
@@ -72,9 +74,11 @@ class CheckSettingsBaseFluent {
|
|
|
72
74
|
return this.ignoreRegions(...regions);
|
|
73
75
|
}
|
|
74
76
|
layoutRegion(region) {
|
|
75
|
-
if (
|
|
76
|
-
this._settings.layoutRegions
|
|
77
|
-
|
|
77
|
+
if (region) {
|
|
78
|
+
if (!this._settings.layoutRegions)
|
|
79
|
+
this._settings.layoutRegions = [];
|
|
80
|
+
this._settings.layoutRegions.push(region);
|
|
81
|
+
}
|
|
78
82
|
return this;
|
|
79
83
|
}
|
|
80
84
|
layoutRegions(...regions) {
|
|
@@ -82,9 +86,11 @@ class CheckSettingsBaseFluent {
|
|
|
82
86
|
return this;
|
|
83
87
|
}
|
|
84
88
|
strictRegion(region) {
|
|
85
|
-
if (
|
|
86
|
-
this._settings.strictRegions
|
|
87
|
-
|
|
89
|
+
if (region) {
|
|
90
|
+
if (!this._settings.strictRegions)
|
|
91
|
+
this._settings.strictRegions = [];
|
|
92
|
+
this._settings.strictRegions.push(region);
|
|
93
|
+
}
|
|
88
94
|
return this;
|
|
89
95
|
}
|
|
90
96
|
strictRegions(...regions) {
|
|
@@ -92,9 +98,11 @@ class CheckSettingsBaseFluent {
|
|
|
92
98
|
return this;
|
|
93
99
|
}
|
|
94
100
|
contentRegion(region) {
|
|
95
|
-
if (
|
|
96
|
-
this._settings.contentRegions
|
|
97
|
-
|
|
101
|
+
if (region) {
|
|
102
|
+
if (!this._settings.contentRegions)
|
|
103
|
+
this._settings.contentRegions = [];
|
|
104
|
+
this._settings.contentRegions.push(region);
|
|
105
|
+
}
|
|
98
106
|
return this;
|
|
99
107
|
}
|
|
100
108
|
contentRegions(...regions) {
|
|
@@ -102,23 +110,25 @@ class CheckSettingsBaseFluent {
|
|
|
102
110
|
return this;
|
|
103
111
|
}
|
|
104
112
|
floatingRegion(region, maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
if (region) {
|
|
114
|
+
let floatingRegion;
|
|
115
|
+
if (utils.types.has(region, 'region')) {
|
|
116
|
+
const { maxUpOffset, maxDownOffset, maxLeftOffset, maxRightOffset, ...rest } = region;
|
|
117
|
+
floatingRegion = {
|
|
118
|
+
offset: { top: maxUpOffset, bottom: maxDownOffset, left: maxLeftOffset, right: maxRightOffset },
|
|
119
|
+
...rest,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
floatingRegion = {
|
|
124
|
+
region,
|
|
125
|
+
offset: { top: maxUpOffset, bottom: maxDownOffset, left: maxLeftOffset, right: maxRightOffset },
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
if (!this._settings.floatingRegions)
|
|
129
|
+
this._settings.floatingRegions = [];
|
|
130
|
+
this._settings.floatingRegions.push(floatingRegion);
|
|
118
131
|
}
|
|
119
|
-
if (!this._settings.floatingRegions)
|
|
120
|
-
this._settings.floatingRegions = [];
|
|
121
|
-
this._settings.floatingRegions.push(floatingRegion);
|
|
122
132
|
return this;
|
|
123
133
|
}
|
|
124
134
|
floatingRegions(regionOrMaxOffset, ...regions) {
|
|
@@ -147,10 +157,12 @@ class CheckSettingsBaseFluent {
|
|
|
147
157
|
return this.floatingRegions(regionOrMaxOffset, ...regions);
|
|
148
158
|
}
|
|
149
159
|
accessibilityRegion(region, type) {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
this._settings.accessibilityRegions
|
|
153
|
-
|
|
160
|
+
if (region) {
|
|
161
|
+
const accessibilityRegion = utils.types.has(region, 'region') ? region : { region, type };
|
|
162
|
+
if (!this._settings.accessibilityRegions)
|
|
163
|
+
this._settings.accessibilityRegions = [];
|
|
164
|
+
this._settings.accessibilityRegions.push(accessibilityRegion);
|
|
165
|
+
}
|
|
154
166
|
return this;
|
|
155
167
|
}
|
|
156
168
|
accessibilityRegions(regionOrType, ...regions) {
|
|
@@ -170,10 +182,12 @@ class CheckSettingsBaseFluent {
|
|
|
170
182
|
return this;
|
|
171
183
|
}
|
|
172
184
|
dynamicRegion(region, type) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
this._settings.dynamicRegions
|
|
176
|
-
|
|
185
|
+
if (region) {
|
|
186
|
+
const dynamicRegion = utils.types.has(region, 'region') ? region : { region, type };
|
|
187
|
+
if (!this._settings.dynamicRegions)
|
|
188
|
+
this._settings.dynamicRegions = [];
|
|
189
|
+
this._settings.dynamicRegions.push(dynamicRegion);
|
|
190
|
+
}
|
|
177
191
|
return this;
|
|
178
192
|
}
|
|
179
193
|
dynamicRegions(regionOrTypes, ...regions) {
|
|
@@ -507,13 +521,22 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
|
|
|
507
521
|
this._settings.disableBrowserFetching = disableBrowserFetching;
|
|
508
522
|
return this;
|
|
509
523
|
}
|
|
510
|
-
layoutBreakpoints(breakpoints = true, settings) {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
:
|
|
515
|
-
|
|
516
|
-
|
|
524
|
+
layoutBreakpoints(breakpoints = true, heightBreakpointsOrSettings, settings) {
|
|
525
|
+
if (utils.types.isBoolean(heightBreakpointsOrSettings)) {
|
|
526
|
+
this._settings.layoutBreakpoints = {
|
|
527
|
+
breakpoints: breakpoints,
|
|
528
|
+
heightBreakpoints: heightBreakpointsOrSettings,
|
|
529
|
+
reload: settings === null || settings === void 0 ? void 0 : settings.reload,
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
else {
|
|
533
|
+
this._settings.layoutBreakpoints = {
|
|
534
|
+
breakpoints: utils.types.isArray(breakpoints)
|
|
535
|
+
? Array.from(new Set(breakpoints)).sort((a, b) => (a < b ? 1 : -1))
|
|
536
|
+
: breakpoints,
|
|
537
|
+
reload: heightBreakpointsOrSettings === null || heightBreakpointsOrSettings === void 0 ? void 0 : heightBreakpointsOrSettings.reload,
|
|
538
|
+
};
|
|
539
|
+
}
|
|
517
540
|
return this;
|
|
518
541
|
}
|
|
519
542
|
hook(name, script) {
|
|
@@ -578,8 +601,20 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
|
|
|
578
601
|
return this;
|
|
579
602
|
}
|
|
580
603
|
/** @internal */
|
|
604
|
+
toLayoutBreakpoints() {
|
|
605
|
+
var _a;
|
|
606
|
+
let layoutBreakpoints;
|
|
607
|
+
if (utils.types.has(this._settings.layoutBreakpoints, 'breakpoints')) {
|
|
608
|
+
layoutBreakpoints = this._settings.layoutBreakpoints;
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
layoutBreakpoints = { breakpoints: (_a = this._settings.layoutBreakpoints) !== null && _a !== void 0 ? _a : false };
|
|
612
|
+
}
|
|
613
|
+
return layoutBreakpoints;
|
|
614
|
+
}
|
|
615
|
+
/** @internal */
|
|
581
616
|
toJSON() {
|
|
582
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
617
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
583
618
|
return {
|
|
584
619
|
target: undefined,
|
|
585
620
|
settings: utils.general.removeUndefinedProps({
|
|
@@ -604,11 +639,9 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
|
|
|
604
639
|
dynamicRegions: (_g = this._settings.dynamicRegions) === null || _g === void 0 ? void 0 : _g.map(this.toCoreCodedRegion),
|
|
605
640
|
disableBrowserFetching: this._settings.disableBrowserFetching,
|
|
606
641
|
layoutBreakpoints: utils.types.isDefined(this._settings.layoutBreakpoints)
|
|
607
|
-
?
|
|
608
|
-
? this._settings.layoutBreakpoints
|
|
609
|
-
: { breakpoints: (_h = this._settings.layoutBreakpoints) !== null && _h !== void 0 ? _h : false }
|
|
642
|
+
? this.toLayoutBreakpoints()
|
|
610
643
|
: undefined,
|
|
611
|
-
ufgOptions: (
|
|
644
|
+
ufgOptions: (_h = this._settings.ufgOptions) !== null && _h !== void 0 ? _h : this._settings.visualGridOptions,
|
|
612
645
|
nmgOptions: this._settings.nmgOptions,
|
|
613
646
|
screenshotMode: this._settings.useSystemScreenshot ? 'default' : undefined,
|
|
614
647
|
hooks: this._settings.hooks,
|
|
@@ -648,6 +681,12 @@ exports.TargetAutomation = {
|
|
|
648
681
|
return new CheckSettingsAutomationFluent({}, this.spec);
|
|
649
682
|
},
|
|
650
683
|
region(region) {
|
|
684
|
+
if (!region) {
|
|
685
|
+
// eslint-disable-next-line no-console
|
|
686
|
+
console.warn('Target.region() called with no region. Will take a screenshot of the entire window instead.');
|
|
687
|
+
// eslint-disable-next-line no-console
|
|
688
|
+
console.trace();
|
|
689
|
+
}
|
|
651
690
|
return new CheckSettingsAutomationFluent({}, this.spec).region(region);
|
|
652
691
|
},
|
|
653
692
|
frame(contextOrFrame, scrollRootElement) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0-debug-20250429-2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"applitools",
|
|
6
6
|
"eyes",
|
|
@@ -46,10 +46,11 @@
|
|
|
46
46
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@applitools/core": "4.
|
|
49
|
+
"@applitools/core": "4.37.0-debug-20250429-2",
|
|
50
50
|
"@applitools/logger": "2.1.2",
|
|
51
51
|
"@applitools/utils": "1.8.0",
|
|
52
|
-
"chalk": "4.1.2"
|
|
52
|
+
"chalk": "4.1.2",
|
|
53
|
+
"yargs": "17.7.2"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
56
|
"@applitools/req": "^1.7.10",
|
|
@@ -74,16 +74,21 @@ export type CheckSettingsBase<TRegion = never> = {
|
|
|
74
74
|
stitchMode?: StitchMode;
|
|
75
75
|
};
|
|
76
76
|
export type CheckSettingsImage = CheckSettingsBase;
|
|
77
|
+
type LayoutBreakpoints = boolean | number[] | {
|
|
78
|
+
breakpoints: number[] | boolean;
|
|
79
|
+
reload?: boolean;
|
|
80
|
+
} | {
|
|
81
|
+
breakpoints: boolean;
|
|
82
|
+
heightBreakpoints: boolean;
|
|
83
|
+
reload?: boolean;
|
|
84
|
+
};
|
|
77
85
|
export type CheckSettingsAutomation<TSpec extends Core.SpecType> = CheckSettingsBase<RegionReference<TSpec>> & {
|
|
78
86
|
frames?: (ContextReference<TSpec> | FrameReference<TSpec>)[];
|
|
79
87
|
webview?: boolean | string;
|
|
80
88
|
scrollRootElement?: ElementReference<TSpec>;
|
|
81
89
|
fully?: boolean;
|
|
82
90
|
disableBrowserFetching?: boolean;
|
|
83
|
-
layoutBreakpoints?:
|
|
84
|
-
breakpoints: number[] | boolean;
|
|
85
|
-
reload?: boolean;
|
|
86
|
-
};
|
|
91
|
+
layoutBreakpoints?: LayoutBreakpoints;
|
|
87
92
|
/** @deprecated */
|
|
88
93
|
visualGridOptions?: {
|
|
89
94
|
[key: string]: any;
|
|
@@ -207,9 +212,12 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
|
|
|
207
212
|
/** @deprecated */
|
|
208
213
|
stitchContent(stitchContent?: boolean): this;
|
|
209
214
|
disableBrowserFetching(disableBrowserFetching: boolean): typeof this;
|
|
210
|
-
layoutBreakpoints(breakpoints
|
|
215
|
+
layoutBreakpoints(breakpoints: boolean, heightBreakpoints: boolean, settings?: {
|
|
216
|
+
reload?: boolean;
|
|
217
|
+
}): this;
|
|
218
|
+
layoutBreakpoints(breakpoints: boolean | number[], settings?: {
|
|
211
219
|
reload?: boolean;
|
|
212
|
-
}):
|
|
220
|
+
}): this;
|
|
213
221
|
hook(name: string, script: string): typeof this;
|
|
214
222
|
beforeRenderScreenshotHook(script: string): typeof this;
|
|
215
223
|
/** @deprecated */
|
|
@@ -237,6 +245,12 @@ export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType =
|
|
|
237
245
|
densityMetrics(options: DensityMetrics): typeof this;
|
|
238
246
|
stitchMode(stitchMode: StitchMode): typeof this;
|
|
239
247
|
/** @internal */
|
|
248
|
+
protected toLayoutBreakpoints(): {
|
|
249
|
+
breakpoints: number[] | boolean;
|
|
250
|
+
heightBreakpoints?: boolean;
|
|
251
|
+
reload?: boolean;
|
|
252
|
+
};
|
|
253
|
+
/** @internal */
|
|
240
254
|
toJSON(): {
|
|
241
255
|
target: undefined;
|
|
242
256
|
settings: Core.CheckSettings<TSpec, 'classic'> & Core.CheckSettings<TSpec, 'ufg'>;
|