@applitools/eyes-browser 1.5.15 → 1.5.16
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 +81 -0
- package/dist/index.js +674 -176
- package/package.json +2 -2
- package/types/enums/AndroidMultiDeviceTarget.d.ts +9 -0
- package/types/enums/IosDeviceName.d.ts +11 -2
- package/types/enums/IosMultiDeviceTarget.d.ts +42 -39
- package/types/index.d.ts +5 -1
- package/types/input/AndroidDeviceTarget.d.ts +35 -0
- package/types/input/Configuration.d.ts +39 -2
- package/types/input/IosDeviceTarget.d.ts +35 -0
- package/types/input/RenderInfo.d.ts +11 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-browser",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.16",
|
|
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.36.
|
|
51
|
+
"@applitools/eyes": "1.36.16"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^12.20.55",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AndroidDeviceTarget } from '../input/AndroidDeviceTarget';
|
|
2
|
+
export declare const AndroidMultiDeviceTarget: {
|
|
3
|
+
readonly Galaxy_S25: AndroidDeviceTarget;
|
|
4
|
+
readonly Galaxy_S25_Ultra: AndroidDeviceTarget;
|
|
5
|
+
readonly Pixel_9: AndroidDeviceTarget;
|
|
6
|
+
};
|
|
7
|
+
export type AndroidDeviceTargetKeys = keyof typeof AndroidMultiDeviceTarget;
|
|
8
|
+
export type AndroidDeviceTargetValues = AndroidDeviceTarget;
|
|
9
|
+
export type AndroidDeviceTargetNames = 'Galaxy S25' | 'Galaxy S25 Ultra' | 'Pixel 9';
|
|
@@ -4,12 +4,17 @@ export declare enum IosDeviceNameEnum {
|
|
|
4
4
|
iPad_10 = "iPad (10th generation)",
|
|
5
5
|
iPad_mini_6 = "iPad mini (6th generation)",
|
|
6
6
|
iPad_Air_4 = "iPad Air (4th generation)",
|
|
7
|
+
iPad_Air_11_inch_M3 = "iPad Air 11-inch (M3)",
|
|
8
|
+
iPad_Air_13_inch_M3 = "iPad Air 13-inch (M3)",
|
|
9
|
+
iPad_A16 = "iPad (A16)",
|
|
7
10
|
/** @deprecated use {@link iPad_Pro_12_9_inch_3 } instead */
|
|
8
11
|
iPad_Pro_3 = "iPad Pro (12.9-inch) (3rd generation)",
|
|
9
|
-
iPad_Pro_12_9_inch_3 = "iPad Pro (12.9-inch) (3rd generation)",
|
|
10
12
|
/** @deprecated use {@link iPad_Pro_11_inch_4 } instead */
|
|
11
13
|
iPad_Pro_4 = "iPad Pro (11-inch) (4th generation)",
|
|
12
14
|
iPad_Pro_11_inch_4 = "iPad Pro (11-inch) (4th generation)",
|
|
15
|
+
iPad_Pro_11_inch_M5 = "iPad Pro 11-inch (M5)",
|
|
16
|
+
iPad_Pro_13_inch_M5 = "iPad Pro 13-inch (M5)",
|
|
17
|
+
iPad_Pro_12_9_inch_3 = "iPad Pro (12.9-inch) (3rd generation)",
|
|
13
18
|
iPhone_SE_2 = "iPhone SE (2nd generation)",
|
|
14
19
|
iPhone_SE_3 = "iPhone SE (3rd generation)",
|
|
15
20
|
iPhone_XR = "iPhone XR",
|
|
@@ -38,6 +43,10 @@ export declare enum IosDeviceNameEnum {
|
|
|
38
43
|
iPhone_16 = "iPhone 16",
|
|
39
44
|
iPhone_16_Pro_Max = "iPhone 16 Pro Max",
|
|
40
45
|
iPhone_16_Pro = "iPhone 16 Pro",
|
|
41
|
-
iPhone_16_Plus = "iPhone 16 Plus"
|
|
46
|
+
iPhone_16_Plus = "iPhone 16 Plus",
|
|
47
|
+
iPhone_17 = "iPhone 17",
|
|
48
|
+
iPhone_17_Pro = "iPhone 17 Pro",
|
|
49
|
+
iPhone_17_Pro_Max = "iPhone 17 Pro Max",
|
|
50
|
+
iPhone_Air = "iPhone Air"
|
|
42
51
|
}
|
|
43
52
|
export type IosDeviceName = `${IosDeviceNameEnum}`;
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { IosDeviceTarget } from '../input/IosDeviceTarget';
|
|
2
|
+
export declare const IosMultiDeviceTarget: {
|
|
3
|
+
readonly iPhone_SE_1: IosDeviceTarget;
|
|
4
|
+
readonly iPhone_SE_2: IosDeviceTarget;
|
|
5
|
+
readonly iPhone_SE_3: IosDeviceTarget;
|
|
6
|
+
readonly iPhone_6: IosDeviceTarget;
|
|
7
|
+
readonly iPhone_6_Plus: IosDeviceTarget;
|
|
8
|
+
readonly iPhone_7: IosDeviceTarget;
|
|
9
|
+
readonly iPhone_7_Plus: IosDeviceTarget;
|
|
10
|
+
readonly iPhone_8: IosDeviceTarget;
|
|
11
|
+
readonly iPhone_8_Plus: IosDeviceTarget;
|
|
12
|
+
readonly iPhone_X: IosDeviceTarget;
|
|
13
|
+
readonly iPhone_XR: IosDeviceTarget;
|
|
14
|
+
readonly iPhone_Xs: IosDeviceTarget;
|
|
15
|
+
readonly iPhone_Xs_Max: IosDeviceTarget;
|
|
16
|
+
readonly iPhone_11: IosDeviceTarget;
|
|
17
|
+
readonly iPhone_11_Pro: IosDeviceTarget;
|
|
18
|
+
readonly iPhone_11_Pro_Max: IosDeviceTarget;
|
|
19
|
+
readonly iPhone_12: IosDeviceTarget;
|
|
20
|
+
readonly iPhone_12_mini: IosDeviceTarget;
|
|
21
|
+
readonly iPhone_12_Pro: IosDeviceTarget;
|
|
22
|
+
readonly iPhone_12_Pro_Max: IosDeviceTarget;
|
|
23
|
+
readonly iPhone_13: IosDeviceTarget;
|
|
24
|
+
readonly iPhone_13_mini: IosDeviceTarget;
|
|
25
|
+
readonly iPhone_13_Pro: IosDeviceTarget;
|
|
26
|
+
readonly iPhone_13_Pro_Max: IosDeviceTarget;
|
|
27
|
+
readonly iPhone_14: IosDeviceTarget;
|
|
28
|
+
readonly iPhone_14_Pro: IosDeviceTarget;
|
|
29
|
+
readonly iPhone_14_Plus: IosDeviceTarget;
|
|
30
|
+
readonly iPhone_14_Pro_Max: IosDeviceTarget;
|
|
31
|
+
readonly iPhone_15: IosDeviceTarget;
|
|
32
|
+
readonly iPhone_15_Pro: IosDeviceTarget;
|
|
33
|
+
readonly iPhone_15_Plus: IosDeviceTarget;
|
|
34
|
+
readonly iPhone_15_Pro_Max: IosDeviceTarget;
|
|
35
|
+
readonly iPhone_16: IosDeviceTarget;
|
|
36
|
+
readonly iPhone_16_Pro: IosDeviceTarget;
|
|
37
|
+
readonly iPhone_16_Plus: IosDeviceTarget;
|
|
38
|
+
readonly iPhone_16_Pro_Max: IosDeviceTarget;
|
|
39
|
+
};
|
|
40
|
+
export type IosDeviceTargetKeys = keyof typeof IosMultiDeviceTarget;
|
|
41
|
+
export type IosDeviceTargetValues = IosDeviceTarget;
|
|
42
|
+
export type IosDeviceTargetNames = 'iPhone SE (1st generation)' | 'iPhone SE (2nd generation)' | 'iPhone SE (3rd generation)' | 'iPhone 6' | 'iPhone 6 Plus' | 'iPhone 7' | 'iPhone 7 Plus' | 'iPhone 8' | 'iPhone 8 Plus' | 'iPhone X' | 'iPhone XR' | 'iPhone Xs' | 'iPhone Xs Max' | 'iPhone 11' | 'iPhone 11 Pro' | 'iPhone 11 Pro Max' | 'iPhone 12' | 'iPhone 12 mini' | 'iPhone 12 Pro' | 'iPhone 12 Pro Max' | 'iPhone 13' | 'iPhone 13 mini' | 'iPhone 13 Pro' | 'iPhone 13 Pro Max' | 'iPhone 14' | 'iPhone 14 Pro' | 'iPhone 14 Plus' | 'iPhone 14 Pro Max' | 'iPhone 15' | 'iPhone 15 Pro' | 'iPhone 15 Plus' | 'iPhone 15 Pro Max' | 'iPhone 16' | 'iPhone 16 Pro' | 'iPhone 16 Plus' | 'iPhone 16 Pro Max';
|
package/types/index.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ export { CorsIframeHandle as CorsIframeHandlePlain, CorsIframeHandleEnum as Cors
|
|
|
3
3
|
export { DeviceName as DeviceNamePlain, DeviceNameEnum as DeviceName } from './enums/DeviceName';
|
|
4
4
|
export { FailureReport as FailureReportPlain, FailureReportEnum as FailureReport } from './enums/FailureReport';
|
|
5
5
|
export { IosDeviceName as IosDeviceNamePlain, IosDeviceNameEnum as IosDeviceName } from './enums/IosDeviceName';
|
|
6
|
+
export { IosMultiDeviceTarget, IosDeviceTargetNames, IosDeviceTargetKeys, IosDeviceTargetValues, } from './enums/IosMultiDeviceTarget';
|
|
7
|
+
export { AndroidMultiDeviceTarget, AndroidDeviceTargetNames, AndroidDeviceTargetKeys, AndroidDeviceTargetValues, } from './enums/AndroidMultiDeviceTarget';
|
|
8
|
+
export { IosDeviceTarget } from './input/IosDeviceTarget';
|
|
9
|
+
export { AndroidDeviceTarget } from './input/AndroidDeviceTarget';
|
|
6
10
|
export { IosVersion as IosVersionPlain, IosVersionEnum as IosVersion } from './enums/IosVersion';
|
|
7
11
|
export { MatchLevel as MatchLevelPlain, MatchLevelEnum as MatchLevel } from './enums/MatchLevel';
|
|
8
12
|
export { ScreenOrientation as ScreenOrientationPlain, ScreenOrientationEnum as ScreenOrientation, } from './enums/ScreenOrientation';
|
|
@@ -37,7 +41,7 @@ export { PropertyData as PropertyDataPlain, PropertyDataData as PropertyData } f
|
|
|
37
41
|
export { ProxySettings as ProxySettingsPlain, ProxySettingsData as ProxySettings } from './input/ProxySettings';
|
|
38
42
|
export { RectangleSize as RectangleSizePlain, RectangleSizeData as RectangleSize } from './input/RectangleSize';
|
|
39
43
|
export { Region as RegionPlain, LegacyRegion as LegacyRegionPlain, RegionData as Region } from './input/Region';
|
|
40
|
-
export { DesktopBrowserInfo, ChromeEmulationInfo, IOSDeviceInfo, IOSMultiDeviceInfo } from './input/RenderInfo';
|
|
44
|
+
export { DesktopBrowserInfo, ChromeEmulationInfo, IOSDeviceInfo, IOSMultiDeviceInfo, AndroidMultiDeviceInfo, } from './input/RenderInfo';
|
|
41
45
|
export { RunnerOptions as RunnerOptionsPlain, RunnerOptionsFluent, RunnerOptionsFluentInit as RunnerOptions, } from './input/RunnerOptions';
|
|
42
46
|
export { VisualLocatorSettings } from './input/VisualLocatorSettings';
|
|
43
47
|
export { ApiUrls as ApiUrlsPlain, ApiUrlsData as ApiUrls } from './output/ApiUrls';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ScreenOrientationEnum as ScreenOrientation } from '../enums/ScreenOrientation';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an Android device target with optional orientation configuration.
|
|
4
|
+
* This class provides a fluent API for specifying device orientation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class AndroidDeviceTarget {
|
|
7
|
+
readonly deviceName: string;
|
|
8
|
+
private screenOrientation?;
|
|
9
|
+
constructor(deviceName: string);
|
|
10
|
+
/**
|
|
11
|
+
* Sets the device orientation to landscape.
|
|
12
|
+
* @returns this instance for method chaining
|
|
13
|
+
*/
|
|
14
|
+
landscape(): this;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the device orientation to portrait.
|
|
17
|
+
* @returns this instance for method chaining
|
|
18
|
+
*/
|
|
19
|
+
portrait(): this;
|
|
20
|
+
/**
|
|
21
|
+
* Gets the configured orientation for this device target.
|
|
22
|
+
* @returns the screen orientation, or undefined if not set
|
|
23
|
+
*/
|
|
24
|
+
getOrientation(): ScreenOrientation | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the device name.
|
|
27
|
+
* @returns the device name string
|
|
28
|
+
*/
|
|
29
|
+
getDeviceName(): string;
|
|
30
|
+
/**
|
|
31
|
+
* String representation of this device target.
|
|
32
|
+
* @returns the device name
|
|
33
|
+
*/
|
|
34
|
+
toString(): string;
|
|
35
|
+
}
|
|
@@ -5,7 +5,10 @@ import { StitchMode, StitchModeEnum } from '../enums/StitchMode';
|
|
|
5
5
|
import { MatchLevel, MatchLevelEnum } from '../enums/MatchLevel';
|
|
6
6
|
import { BrowserType } from '../enums/BrowserType';
|
|
7
7
|
import { DeviceName } from '../enums/DeviceName';
|
|
8
|
-
import {
|
|
8
|
+
import type { IosDeviceTargetNames } from '../enums/IosMultiDeviceTarget';
|
|
9
|
+
import type { AndroidDeviceTargetNames } from '../enums/AndroidMultiDeviceTarget';
|
|
10
|
+
import { IosDeviceTarget } from './IosDeviceTarget';
|
|
11
|
+
import { AndroidDeviceTarget } from './AndroidDeviceTarget';
|
|
9
12
|
import { ScreenOrientation } from '../enums/ScreenOrientation';
|
|
10
13
|
import { AccessibilitySettings } from './AccessibilitySettings';
|
|
11
14
|
import { RenderInfo, RenderInfoLegacy } from './RenderInfo';
|
|
@@ -19,6 +22,7 @@ import { BatchInfo, BatchInfoData } from './BatchInfo';
|
|
|
19
22
|
import { PropertyData, PropertyDataData } from './PropertyData';
|
|
20
23
|
import { ImageMatchSettings } from './ImageMatchSettings';
|
|
21
24
|
import { LatestCommitInfo } from './LatestCommitInfo';
|
|
25
|
+
type MultiDeviceTargetTypes = IosDeviceTargetNames | AndroidDeviceTargetNames | IosDeviceTarget | AndroidDeviceTarget;
|
|
22
26
|
export type Configuration<TSpec extends Core.SpecType = Core.SpecType> = {
|
|
23
27
|
accessibilityValidation?: AccessibilitySettings;
|
|
24
28
|
agentId?: string;
|
|
@@ -149,7 +153,39 @@ export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecTy
|
|
|
149
153
|
addBrowser(browserInfo: RenderInfoLegacy): this;
|
|
150
154
|
addBrowser(width: number, height: number, name?: BrowserType): this;
|
|
151
155
|
addDeviceEmulation(deviceName: DeviceName, screenOrientation?: ScreenOrientation): this;
|
|
152
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Add iOS and/or Android devices for multi-device testing.
|
|
158
|
+
*
|
|
159
|
+
* @param devices - Device targets. Supports three formats:
|
|
160
|
+
* - Plain strings: `'iPhone 13'`, `'Galaxy S25'`
|
|
161
|
+
* - Enum values: `IosMultiDeviceTarget.iPhone_13`, `AndroidMultiDeviceTarget.Galaxy_S25`
|
|
162
|
+
* - Fluent API: `IosMultiDeviceTarget.iPhone_13.landscape()`, `AndroidMultiDeviceTarget.Galaxy_S25.portrait()`
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* // Plain strings (backward compatible)
|
|
167
|
+
* config.addMultiDeviceTarget('iPhone 13', 'Galaxy S25')
|
|
168
|
+
*
|
|
169
|
+
* // Enum values
|
|
170
|
+
* config.addMultiDeviceTarget(IosMultiDeviceTarget.iPhone_13, AndroidMultiDeviceTargetEnum.Galaxy_S25)
|
|
171
|
+
*
|
|
172
|
+
* // Fluent API with orientation
|
|
173
|
+
* config.addMultiDeviceTarget(
|
|
174
|
+
* IosMultiDeviceTarget.iPhone_13.landscape(),
|
|
175
|
+
* AndroidMultiDeviceTarget.Galaxy_S25.portrait()
|
|
176
|
+
* )
|
|
177
|
+
*
|
|
178
|
+
* // Mix all three styles
|
|
179
|
+
* config.addMultiDeviceTarget(
|
|
180
|
+
* 'iPhone 14',
|
|
181
|
+
* IosMultiDeviceTarget.iPhone_15,
|
|
182
|
+
* IosMultiDeviceTarget.iPhone_16.landscape()
|
|
183
|
+
* )
|
|
184
|
+
* ```
|
|
185
|
+
*/
|
|
186
|
+
addMultiDeviceTarget(...devices: MultiDeviceTargetTypes[]): this;
|
|
187
|
+
private _isIosDevice;
|
|
188
|
+
private _isAndroidDevice;
|
|
153
189
|
get captureStatusBar(): boolean;
|
|
154
190
|
set captureStatusBar(captureStatusBar: boolean);
|
|
155
191
|
getCaptureStatusBar(): boolean;
|
|
@@ -435,3 +471,4 @@ export declare class ConfigurationData<TSpec extends Core.SpecType = Core.SpecTy
|
|
|
435
471
|
/** @internal */
|
|
436
472
|
toString(): string;
|
|
437
473
|
}
|
|
474
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ScreenOrientationEnum as ScreenOrientation } from '../enums/ScreenOrientation';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an iOS device target with optional orientation configuration.
|
|
4
|
+
* This class provides a fluent API for specifying device orientation.
|
|
5
|
+
*/
|
|
6
|
+
export declare class IosDeviceTarget {
|
|
7
|
+
readonly deviceName: string;
|
|
8
|
+
private screenOrientation?;
|
|
9
|
+
constructor(deviceName: string);
|
|
10
|
+
/**
|
|
11
|
+
* Sets the device orientation to landscape.
|
|
12
|
+
* @returns this instance for method chaining
|
|
13
|
+
*/
|
|
14
|
+
landscape(): this;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the device orientation to portrait.
|
|
17
|
+
* @returns this instance for method chaining
|
|
18
|
+
*/
|
|
19
|
+
portrait(): this;
|
|
20
|
+
/**
|
|
21
|
+
* Gets the configured orientation for this device target.
|
|
22
|
+
* @returns the screen orientation, or undefined if not set
|
|
23
|
+
*/
|
|
24
|
+
getOrientation(): ScreenOrientation | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the device name.
|
|
27
|
+
* @returns the device name string
|
|
28
|
+
*/
|
|
29
|
+
getDeviceName(): string;
|
|
30
|
+
/**
|
|
31
|
+
* String representation of this device target.
|
|
32
|
+
* @returns the device name
|
|
33
|
+
*/
|
|
34
|
+
toString(): string;
|
|
35
|
+
}
|
|
@@ -3,7 +3,8 @@ import { DeviceName } from '../enums/DeviceName';
|
|
|
3
3
|
import { IosDeviceName } from '../enums/IosDeviceName';
|
|
4
4
|
import { IosVersion } from '../enums/IosVersion';
|
|
5
5
|
import { ScreenOrientation } from '../enums/ScreenOrientation';
|
|
6
|
-
import {
|
|
6
|
+
import type { IosDeviceTargetNames } from '../enums/IosMultiDeviceTarget';
|
|
7
|
+
import type { AndroidDeviceTargetNames } from '../enums/AndroidMultiDeviceTarget';
|
|
7
8
|
type RenderInfoBase = {
|
|
8
9
|
/** @internal */
|
|
9
10
|
hostOS?: string;
|
|
@@ -39,9 +40,16 @@ export type IOSDeviceInfo = {
|
|
|
39
40
|
};
|
|
40
41
|
export type IOSMultiDeviceInfo = {
|
|
41
42
|
iosDeviceInfo: {
|
|
42
|
-
deviceName:
|
|
43
|
+
deviceName: IosDeviceTargetNames;
|
|
44
|
+
screenOrientation?: ScreenOrientation;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type AndroidMultiDeviceInfo = {
|
|
48
|
+
androidDeviceInfo: {
|
|
49
|
+
deviceName: AndroidDeviceTargetNames;
|
|
50
|
+
screenOrientation?: ScreenOrientation;
|
|
43
51
|
};
|
|
44
52
|
};
|
|
45
53
|
export type RenderInfoLegacy = RenderInfoBase & (DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | ChromeEmulationInfoLegacy);
|
|
46
|
-
export type RenderInfo = RenderInfoBase & (DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | IOSMultiDeviceInfo);
|
|
54
|
+
export type RenderInfo = RenderInfoBase & (DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | IOSMultiDeviceInfo | AndroidMultiDeviceInfo);
|
|
47
55
|
export {};
|