@applitools/eyes 1.37.0 → 1.38.1
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 +67 -0
- package/dist/Eyes.js +5 -1
- package/dist/SettingsWithPage.js +2 -0
- package/dist/input/CheckSettings.js +18 -1
- package/package.json +6 -2
- package/types/Eyes.d.ts +3 -2
- package/types/SettingsWithPage.d.ts +1 -0
- package/types/input/CheckSettings.d.ts +34 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.38.1](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.38.0...js/eyes@1.38.1) (2026-01-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* @applitools/dom-snapshot bumped to 4.15.7
|
|
9
|
+
#### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* add fetchConcurrency to dom-snapshot | FLD-4062 ([#3486](https://github.com/Applitools-Dev/sdk/issues/3486)) ([f523791](https://github.com/Applitools-Dev/sdk/commit/f523791b9bc60029ec0b4b6914bc54e0110bd4a2))
|
|
12
|
+
* @applitools/ufg-client bumped to 1.19.0
|
|
13
|
+
#### Features
|
|
14
|
+
|
|
15
|
+
* add `fetchConcurrency` parameter to `makeAutonomousCore` FLD-4063 ([#3480](https://github.com/Applitools-Dev/sdk/issues/3480)) ([df0c60d](https://github.com/Applitools-Dev/sdk/commit/df0c60d5e74703550dba036299db7360065524f6))
|
|
16
|
+
* @applitools/core bumped to 4.56.0
|
|
17
|
+
#### Features
|
|
18
|
+
|
|
19
|
+
* add `fetchConcurrency` parameter to `makeAutonomousCore` FLD-4063 ([#3480](https://github.com/Applitools-Dev/sdk/issues/3480)) ([df0c60d](https://github.com/Applitools-Dev/sdk/commit/df0c60d5e74703550dba036299db7360065524f6))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
#### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* add fetchConcurrency to dom-snapshot | FLD-4062 ([#3486](https://github.com/Applitools-Dev/sdk/issues/3486)) ([f523791](https://github.com/Applitools-Dev/sdk/commit/f523791b9bc60029ec0b4b6914bc54e0110bd4a2))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [1.38.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.37.0...js/eyes@1.38.0) (2026-01-19)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Dependencies
|
|
38
|
+
|
|
39
|
+
* @applitools/dom-snapshot bumped to 4.15.6
|
|
40
|
+
|
|
41
|
+
* @applitools/driver bumped to 1.25.0
|
|
42
|
+
#### Features
|
|
43
|
+
|
|
44
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
45
|
+
* @applitools/spec-driver-webdriver bumped to 1.5.5
|
|
46
|
+
|
|
47
|
+
* @applitools/spec-driver-selenium bumped to 1.7.11
|
|
48
|
+
|
|
49
|
+
* @applitools/spec-driver-puppeteer bumped to 1.7.0
|
|
50
|
+
#### Features
|
|
51
|
+
|
|
52
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
* @applitools/screenshoter bumped to 3.12.12
|
|
57
|
+
|
|
58
|
+
* @applitools/nml-client bumped to 1.11.15
|
|
59
|
+
|
|
60
|
+
* @applitools/ec-client bumped to 1.12.17
|
|
61
|
+
|
|
62
|
+
* @applitools/core bumped to 4.55.0
|
|
63
|
+
#### Features
|
|
64
|
+
|
|
65
|
+
* multi-page support - FLD-3827 ([#3410](https://github.com/Applitools-Dev/sdk/issues/3410)) ([a55b982](https://github.com/Applitools-Dev/sdk/commit/a55b9827c2218c11da5ed61b38bf12a70ce4c8db))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
3
70
|
## [1.37.0](https://github.com/Applitools-Dev/sdk/compare/js/eyes@1.36.20...js/eyes@1.37.0) (2026-01-14)
|
|
4
71
|
|
|
5
72
|
|
package/dist/Eyes.js
CHANGED
|
@@ -291,7 +291,11 @@ class Eyes {
|
|
|
291
291
|
}
|
|
292
292
|
async checkRegion(imageOrRegion, regionOrName, nameOrTimeout, ignoreMismatch = false) {
|
|
293
293
|
return utils.types.has(imageOrRegion, ['x', 'y', 'width', 'height'])
|
|
294
|
-
? this.check({
|
|
294
|
+
? this.check({
|
|
295
|
+
region: imageOrRegion,
|
|
296
|
+
name: regionOrName,
|
|
297
|
+
timeout: nameOrTimeout,
|
|
298
|
+
})
|
|
295
299
|
: this.check({ image: imageOrRegion }, { region: regionOrName, name: nameOrTimeout, ignoreMismatch });
|
|
296
300
|
}
|
|
297
301
|
/** @deprecated */
|
|
@@ -458,6 +458,12 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
|
|
|
458
458
|
return self;
|
|
459
459
|
}
|
|
460
460
|
region(region) {
|
|
461
|
+
// Extract page if present (opt-in for multi-page contexts)
|
|
462
|
+
if (utils.types.isPlainObject(region) && utils.types.has(region, 'page')) {
|
|
463
|
+
const { page, ...regionWithoutPage } = region;
|
|
464
|
+
this._settings.page = page;
|
|
465
|
+
region = regionWithoutPage;
|
|
466
|
+
}
|
|
461
467
|
if (this._isSelectorReference(region) &&
|
|
462
468
|
this._isSelectorReference(this._settings.region) &&
|
|
463
469
|
utils.types.has(this._settings.region, 'selector')) {
|
|
@@ -489,9 +495,20 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
|
|
|
489
495
|
return this;
|
|
490
496
|
}
|
|
491
497
|
frame(contextOrFrame, scrollRootElement) {
|
|
498
|
+
// Extract page if present in object form
|
|
499
|
+
let page;
|
|
500
|
+
if (utils.types.isPlainObject(contextOrFrame) && utils.types.has(contextOrFrame, 'page')) {
|
|
501
|
+
page = contextOrFrame.page;
|
|
502
|
+
}
|
|
503
|
+
// Normalize to ContextReference
|
|
492
504
|
const context = this._isFrameReference(contextOrFrame) || this._isSelectorReference(contextOrFrame)
|
|
493
505
|
? { frame: contextOrFrame, scrollRootElement }
|
|
494
506
|
: contextOrFrame;
|
|
507
|
+
// Set page if provided (opt-in for multi-page contexts)
|
|
508
|
+
if (page) {
|
|
509
|
+
;
|
|
510
|
+
this._settings.page = page;
|
|
511
|
+
}
|
|
495
512
|
if (!this._settings.frames)
|
|
496
513
|
this._settings.frames = [];
|
|
497
514
|
this._settings.frames.push(context);
|
|
@@ -616,7 +633,7 @@ class CheckSettingsAutomationFluent extends CheckSettingsBaseFluent {
|
|
|
616
633
|
toJSON() {
|
|
617
634
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
618
635
|
return {
|
|
619
|
-
target:
|
|
636
|
+
target: this._settings.page,
|
|
620
637
|
settings: utils.general.removeUndefinedProps({
|
|
621
638
|
name: this._settings.name,
|
|
622
639
|
region: this._settings.region ? this.toCoreRegion(this._settings.region) : this._settings.region,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"applitools",
|
|
6
6
|
"eyes",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"types": "./types/index.d.ts",
|
|
31
31
|
"default": "./dist/index.js"
|
|
32
32
|
},
|
|
33
|
+
"./SettingsWithPage": {
|
|
34
|
+
"types": "./types/SettingsWithPage.d.ts",
|
|
35
|
+
"default": "./dist/SettingsWithPage.js"
|
|
36
|
+
},
|
|
33
37
|
"./dist/*": "./dist/*.js",
|
|
34
38
|
"./package.json": "./package.json"
|
|
35
39
|
},
|
|
@@ -46,7 +50,7 @@
|
|
|
46
50
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
47
51
|
},
|
|
48
52
|
"dependencies": {
|
|
49
|
-
"@applitools/core": "4.
|
|
53
|
+
"@applitools/core": "4.56.0",
|
|
50
54
|
"@applitools/logger": "2.2.7",
|
|
51
55
|
"@applitools/utils": "1.14.1",
|
|
52
56
|
"chalk": "4.1.2",
|
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';
|
|
@@ -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 {};
|