@applitools/eyes-cypress 3.29.0 → 3.29.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 +6 -0
- package/README.md +32 -16
- package/package.json +3 -2
- package/types/expose.d.ts +542 -0
- package/types/index.d.ts +51 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -31,19 +31,8 @@ The above command will add the necessary imports to your cypress `pluginsFile` a
|
|
|
31
31
|
|
|
32
32
|
Eyes-Cypress acts as a [Cypress plugin](https://docs.cypress.io/guides/tooling/plugins-guide.html), so it should be configured as such.
|
|
33
33
|
Unfortunately there's no easy way to do this automatically, so you need to manually:
|
|
34
|
-
#### Cypress version < 10:
|
|
35
|
-
Add the following code to your `pluginsFile`:
|
|
36
|
-
|
|
37
|
-
**Important**: add this code **after** the definition of `module.exports`:
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
require('@applitools/eyes-cypress')(module)
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Normally, this is `cypress/plugins/index.js`. You can read more about it in Cypress' docs [here](https://docs.cypress.io/guides/references/configuration.html#Folders-Files).
|
|
44
|
-
<br>
|
|
45
|
-
|
|
46
|
-
#### Cypress version >= 10:
|
|
35
|
+
#### Cypress version >= 10:
|
|
47
36
|
|
|
48
37
|
Add the following code to your:
|
|
49
38
|
|
|
@@ -60,6 +49,19 @@ module.exports = eyesPlugin(defineConfig({
|
|
|
60
49
|
}
|
|
61
50
|
}))
|
|
62
51
|
```
|
|
52
|
+
<br>
|
|
53
|
+
|
|
54
|
+
#### Cypress version < 10:
|
|
55
|
+
Add the following code to your `pluginsFile`:
|
|
56
|
+
|
|
57
|
+
**Important**: add this code **after** the definition of `module.exports`:
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
require('@applitools/eyes-cypress')(module)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Normally, this is `cypress/plugins/index.js`. You can read more about it in Cypress' docs [here](https://docs.cypress.io/guides/references/configuration.html#Folders-Files).
|
|
64
|
+
<br>
|
|
63
65
|
|
|
64
66
|
##### `cypress.config.ts`
|
|
65
67
|
|
|
@@ -90,6 +92,20 @@ Normally, this is `cypress/support/index.js` for cypress version < 10 and `cypre
|
|
|
90
92
|
|
|
91
93
|
##### 3. (Optional) TypeScript configuration
|
|
92
94
|
|
|
95
|
+
For `typescript` use you must add the following code to your `tsconfig.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
...
|
|
100
|
+
"compilerOptions": {
|
|
101
|
+
...
|
|
102
|
+
"types": ["@applitools/eyes-cypress", "cypress", "node"]
|
|
103
|
+
"moduleResolution": "node" // or "node16"
|
|
104
|
+
...
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
93
109
|
Eyes-Cypress ships with official type declarations for TypeScript. This allows you to add eyes commands to your TypeScript tests.
|
|
94
110
|
|
|
95
111
|
Add this file to your project with either:
|
|
@@ -100,10 +116,10 @@ Add this file to your project with either:
|
|
|
100
116
|
...
|
|
101
117
|
}
|
|
102
118
|
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
119
|
+
2. Copying the file to to your [cypress/support/](https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests.html#Folder-Structure) dir:
|
|
120
|
+
```
|
|
121
|
+
cp node_modules/@applitools/eyes-cypress/index.d.ts ./cypress/support/
|
|
122
|
+
```
|
|
107
123
|
### Applitools API key
|
|
108
124
|
|
|
109
125
|
In order to authenticate via the Applitools server, you need to supply the Eyes-Cypress SDK with the API key you got from Applitools. Read more about how to obtain the API key [here](https://applitools.com/docs/topics/overview/obtain-api-key.html).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-cypress",
|
|
3
|
-
"version": "3.29.
|
|
3
|
+
"version": "3.29.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git://github.com/applitools/eyes.sdk.javascript1.git",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"bin",
|
|
23
23
|
"index.js",
|
|
24
24
|
"commands.js",
|
|
25
|
-
"index.d.ts"
|
|
25
|
+
"index.d.ts",
|
|
26
|
+
"types"
|
|
26
27
|
],
|
|
27
28
|
"scripts": {
|
|
28
29
|
"lint": "eslint \"**/*.{js,ts}\"",
|
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
export type EyesSelector<TSelector = never> = string | TSelector | { selector: string | TSelector; type?: string; shadow?: EyesSelector<TSelector>; frame?: EyesSelector<TSelector>; };
|
|
2
|
+
export enum TestResultsStatus {
|
|
3
|
+
Passed = 'Passed',
|
|
4
|
+
Unresolved = 'Unresolved',
|
|
5
|
+
Failed = 'Failed'
|
|
6
|
+
}
|
|
7
|
+
export type CypressCheckSettings = {
|
|
8
|
+
name?: string;
|
|
9
|
+
region?: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
15
|
+
matchLevel?: "None" | "Layout1" | "Layout" | "Layout2" | "Content" | "IgnoreColors" | "Strict" | "Exact";
|
|
16
|
+
useDom?: boolean;
|
|
17
|
+
sendDom?: boolean;
|
|
18
|
+
enablePatterns?: boolean;
|
|
19
|
+
ignoreDisplacements?: boolean;
|
|
20
|
+
ignoreMismatch?: boolean;
|
|
21
|
+
ignoreCaret?: boolean;
|
|
22
|
+
ignoreRegions?: Array<({
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
width: number;
|
|
31
|
+
height: number;
|
|
32
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
33
|
+
layoutRegions?: Array<({
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
width: number;
|
|
42
|
+
height: number;
|
|
43
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
44
|
+
strictRegions?: Array<({
|
|
45
|
+
x: number;
|
|
46
|
+
y: number;
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
55
|
+
contentRegions?: Array<({
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
61
|
+
x: number;
|
|
62
|
+
y: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
66
|
+
floatingRegions?: Array<({
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | {
|
|
72
|
+
region: {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
78
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
79
|
+
regionId?: string;
|
|
80
|
+
offset?: { top?: number; bottom?: number; left?: number; right?: number; };
|
|
81
|
+
} | {
|
|
82
|
+
region: {
|
|
83
|
+
x: number;
|
|
84
|
+
y: number;
|
|
85
|
+
width: number;
|
|
86
|
+
height: number;
|
|
87
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
88
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
89
|
+
regionId?: string;
|
|
90
|
+
maxUpOffset?: number;
|
|
91
|
+
maxDownOffset?: number;
|
|
92
|
+
maxLeftOffset?: number;
|
|
93
|
+
maxRightOffset?: number;
|
|
94
|
+
}>;
|
|
95
|
+
accessibilityRegions?: Array<({
|
|
96
|
+
x: number;
|
|
97
|
+
y: number;
|
|
98
|
+
width: number;
|
|
99
|
+
height: number;
|
|
100
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | {
|
|
101
|
+
region: {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
width: number;
|
|
105
|
+
height: number;
|
|
106
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
107
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
108
|
+
regionId?: string;
|
|
109
|
+
type?: "IgnoreContrast" | "RegularText" | "LargeText" | "BoldText" | "GraphicalObject";
|
|
110
|
+
}>;
|
|
111
|
+
pageId?: string;
|
|
112
|
+
variationGroupId?: string;
|
|
113
|
+
frames?: Array<{ frame: number | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); scrollRootElement?: (HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }); } | (number | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })))>;
|
|
114
|
+
webview?: string | boolean;
|
|
115
|
+
scrollRootElement?: (HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; });
|
|
116
|
+
fully?: boolean;
|
|
117
|
+
disableBrowserFetching?: boolean;
|
|
118
|
+
layoutBreakpoints?: boolean | Array<number>;
|
|
119
|
+
visualGridOptions?: { [key: string]: any; };
|
|
120
|
+
nmgOptions?: { [key: string]: any; };
|
|
121
|
+
hooks?: { beforeCaptureScreenshot: string; };
|
|
122
|
+
renderId?: string;
|
|
123
|
+
timeout?: number;
|
|
124
|
+
waitBeforeCapture?: number;
|
|
125
|
+
lazyLoad?: boolean | { scrollLength?: number; waitingTime?: number; maxAmountToScroll?: number; };
|
|
126
|
+
tag?: string;
|
|
127
|
+
target?: "window" | "region";
|
|
128
|
+
selector?: "string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; };
|
|
129
|
+
element?: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; };
|
|
130
|
+
ignore?: { left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
131
|
+
x: number;
|
|
132
|
+
y: number;
|
|
133
|
+
width: number;
|
|
134
|
+
height: number;
|
|
135
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
136
|
+
x: number;
|
|
137
|
+
y: number;
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; } | Array<{ left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
141
|
+
x: number;
|
|
142
|
+
y: number;
|
|
143
|
+
width: number;
|
|
144
|
+
height: number;
|
|
145
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
146
|
+
x: number;
|
|
147
|
+
y: number;
|
|
148
|
+
width: number;
|
|
149
|
+
height: number;
|
|
150
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
151
|
+
layout?: { left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
152
|
+
x: number;
|
|
153
|
+
y: number;
|
|
154
|
+
width: number;
|
|
155
|
+
height: number;
|
|
156
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
157
|
+
x: number;
|
|
158
|
+
y: number;
|
|
159
|
+
width: number;
|
|
160
|
+
height: number;
|
|
161
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; } | Array<{ left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
162
|
+
x: number;
|
|
163
|
+
y: number;
|
|
164
|
+
width: number;
|
|
165
|
+
height: number;
|
|
166
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
167
|
+
x: number;
|
|
168
|
+
y: number;
|
|
169
|
+
width: number;
|
|
170
|
+
height: number;
|
|
171
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
172
|
+
content?: { left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
173
|
+
x: number;
|
|
174
|
+
y: number;
|
|
175
|
+
width: number;
|
|
176
|
+
height: number;
|
|
177
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
178
|
+
x: number;
|
|
179
|
+
y: number;
|
|
180
|
+
width: number;
|
|
181
|
+
height: number;
|
|
182
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; } | Array<{ left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
183
|
+
x: number;
|
|
184
|
+
y: number;
|
|
185
|
+
width: number;
|
|
186
|
+
height: number;
|
|
187
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
188
|
+
x: number;
|
|
189
|
+
y: number;
|
|
190
|
+
width: number;
|
|
191
|
+
height: number;
|
|
192
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
193
|
+
strict?: { left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
194
|
+
x: number;
|
|
195
|
+
y: number;
|
|
196
|
+
width: number;
|
|
197
|
+
height: number;
|
|
198
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
199
|
+
x: number;
|
|
200
|
+
y: number;
|
|
201
|
+
width: number;
|
|
202
|
+
height: number;
|
|
203
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; } | Array<{ left: number; top: number; width: number; height: number; } | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; } | ({
|
|
204
|
+
x: number;
|
|
205
|
+
y: number;
|
|
206
|
+
width: number;
|
|
207
|
+
height: number;
|
|
208
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | { region: {
|
|
209
|
+
x: number;
|
|
210
|
+
y: number;
|
|
211
|
+
width: number;
|
|
212
|
+
height: number;
|
|
213
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; })); padding?: number | { top: number; bottom: number; left: number; right: number; }; regionId?: string; }>;
|
|
214
|
+
floating?: ({
|
|
215
|
+
x: number;
|
|
216
|
+
y: number;
|
|
217
|
+
width: number;
|
|
218
|
+
height: number;
|
|
219
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | {
|
|
220
|
+
region: {
|
|
221
|
+
x: number;
|
|
222
|
+
y: number;
|
|
223
|
+
width: number;
|
|
224
|
+
height: number;
|
|
225
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
226
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
227
|
+
regionId?: string;
|
|
228
|
+
offset?: { top?: number; bottom?: number; left?: number; right?: number; };
|
|
229
|
+
} | {
|
|
230
|
+
region: {
|
|
231
|
+
x: number;
|
|
232
|
+
y: number;
|
|
233
|
+
width: number;
|
|
234
|
+
height: number;
|
|
235
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
236
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
237
|
+
regionId?: string;
|
|
238
|
+
maxUpOffset?: number;
|
|
239
|
+
maxDownOffset?: number;
|
|
240
|
+
maxLeftOffset?: number;
|
|
241
|
+
maxRightOffset?: number;
|
|
242
|
+
} | (({ left: number; top: number; width: number; height: number; } | ("string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }) | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; }) & { maxUpOffset?: number; maxDownOffset?: number; maxLeftOffset?: number; maxRightOffset?: number; }) | Array<({
|
|
243
|
+
x: number;
|
|
244
|
+
y: number;
|
|
245
|
+
width: number;
|
|
246
|
+
height: number;
|
|
247
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | {
|
|
248
|
+
region: {
|
|
249
|
+
x: number;
|
|
250
|
+
y: number;
|
|
251
|
+
width: number;
|
|
252
|
+
height: number;
|
|
253
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
254
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
255
|
+
regionId?: string;
|
|
256
|
+
offset?: { top?: number; bottom?: number; left?: number; right?: number; };
|
|
257
|
+
} | {
|
|
258
|
+
region: {
|
|
259
|
+
x: number;
|
|
260
|
+
y: number;
|
|
261
|
+
width: number;
|
|
262
|
+
height: number;
|
|
263
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
264
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
265
|
+
regionId?: string;
|
|
266
|
+
maxUpOffset?: number;
|
|
267
|
+
maxDownOffset?: number;
|
|
268
|
+
maxLeftOffset?: number;
|
|
269
|
+
maxRightOffset?: number;
|
|
270
|
+
} | (({ left: number; top: number; width: number; height: number; } | ("string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }) | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; }) & { maxUpOffset?: number; maxDownOffset?: number; maxLeftOffset?: number; maxRightOffset?: number; })>;
|
|
271
|
+
accessibility?: ({
|
|
272
|
+
x: number;
|
|
273
|
+
y: number;
|
|
274
|
+
width: number;
|
|
275
|
+
height: number;
|
|
276
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | {
|
|
277
|
+
region: {
|
|
278
|
+
x: number;
|
|
279
|
+
y: number;
|
|
280
|
+
width: number;
|
|
281
|
+
height: number;
|
|
282
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
283
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
284
|
+
regionId?: string;
|
|
285
|
+
type?: "IgnoreContrast" | "RegularText" | "LargeText" | "BoldText" | "GraphicalObject";
|
|
286
|
+
} | (({ left: number; top: number; width: number; height: number; } | ("string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }) | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; }) & { accessibilityType?: "IgnoreContrast" | "RegularText" | "LargeText" | "BoldText" | "GraphicalObject"; }) | Array<({
|
|
287
|
+
x: number;
|
|
288
|
+
y: number;
|
|
289
|
+
width: number;
|
|
290
|
+
height: number;
|
|
291
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }))) | {
|
|
292
|
+
region: {
|
|
293
|
+
x: number;
|
|
294
|
+
y: number;
|
|
295
|
+
width: number;
|
|
296
|
+
height: number;
|
|
297
|
+
} | ((HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | (string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; } | { selector: string | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }; type?: string; shadow?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; frame?: EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>; }));
|
|
298
|
+
padding?: number | { top: number; bottom: number; left: number; right: number; };
|
|
299
|
+
regionId?: string;
|
|
300
|
+
type?: "IgnoreContrast" | "RegularText" | "LargeText" | "BoldText" | "GraphicalObject";
|
|
301
|
+
} | (({ left: number; top: number; width: number; height: number; } | ("string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }) | { element: HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }; regionId?: string; padding?: any; }) & { accessibilityType?: "IgnoreContrast" | "RegularText" | "LargeText" | "BoldText" | "GraphicalObject"; })>;
|
|
302
|
+
scriptHooks?: { beforeCaptureScreenshot: string; };
|
|
303
|
+
};
|
|
304
|
+
export type CypressEyesConfig = {
|
|
305
|
+
agentId?: string;
|
|
306
|
+
apiKey?: string;
|
|
307
|
+
serverUrl?: string;
|
|
308
|
+
proxy?: { url: string; username?: string; password?: string; isHttpOnly?: boolean; };
|
|
309
|
+
autProxy?: {
|
|
310
|
+
url: string;
|
|
311
|
+
username?: string;
|
|
312
|
+
password?: string;
|
|
313
|
+
isHttpOnly?: boolean;
|
|
314
|
+
mode?: "Allow" | "Block";
|
|
315
|
+
domains?: Array<string>;
|
|
316
|
+
};
|
|
317
|
+
isDisabled?: boolean;
|
|
318
|
+
appName?: string;
|
|
319
|
+
testName?: string;
|
|
320
|
+
displayName?: string;
|
|
321
|
+
viewportSize?: { width: number; height: number; };
|
|
322
|
+
sessionType?: "SEQUENTIAL" | "PROGRESSION";
|
|
323
|
+
properties?: Array<{ name: string; value: string; }>;
|
|
324
|
+
batch?: {
|
|
325
|
+
id?: string;
|
|
326
|
+
name?: string;
|
|
327
|
+
sequenceName?: string;
|
|
328
|
+
startedAt?: string | Date;
|
|
329
|
+
notifyOnCompletion?: boolean;
|
|
330
|
+
properties?: Array<{ name: string; value: string; }>;
|
|
331
|
+
};
|
|
332
|
+
defaultMatchSettings?: {
|
|
333
|
+
exact?: { minDiffIntensity: number; minDiffWidth: number; minDiffHeight: number; matchThreshold: number; };
|
|
334
|
+
matchLevel?: "None" | "Layout1" | "Layout" | "Layout2" | "Content" | "IgnoreColors" | "Strict" | "Exact";
|
|
335
|
+
ignoreCaret?: boolean;
|
|
336
|
+
useDom?: boolean;
|
|
337
|
+
enablePatterns?: boolean;
|
|
338
|
+
ignoreDisplacements?: boolean;
|
|
339
|
+
ignoreRegions?: Array<{
|
|
340
|
+
x: number;
|
|
341
|
+
y: number;
|
|
342
|
+
width: number;
|
|
343
|
+
height: number;
|
|
344
|
+
}>;
|
|
345
|
+
layoutRegions?: Array<{
|
|
346
|
+
x: number;
|
|
347
|
+
y: number;
|
|
348
|
+
width: number;
|
|
349
|
+
height: number;
|
|
350
|
+
}>;
|
|
351
|
+
strictRegions?: Array<{
|
|
352
|
+
x: number;
|
|
353
|
+
y: number;
|
|
354
|
+
width: number;
|
|
355
|
+
height: number;
|
|
356
|
+
}>;
|
|
357
|
+
contentRegions?: Array<{
|
|
358
|
+
x: number;
|
|
359
|
+
y: number;
|
|
360
|
+
width: number;
|
|
361
|
+
height: number;
|
|
362
|
+
}>;
|
|
363
|
+
floatingRegions?: Array<{
|
|
364
|
+
x: number;
|
|
365
|
+
y: number;
|
|
366
|
+
width: number;
|
|
367
|
+
height: number;
|
|
368
|
+
} | {
|
|
369
|
+
region: {
|
|
370
|
+
x: number;
|
|
371
|
+
y: number;
|
|
372
|
+
width: number;
|
|
373
|
+
height: number;
|
|
374
|
+
};
|
|
375
|
+
maxUpOffset?: number;
|
|
376
|
+
maxDownOffset?: number;
|
|
377
|
+
maxLeftOffset?: number;
|
|
378
|
+
maxRightOffset?: number;
|
|
379
|
+
}>;
|
|
380
|
+
accessibilityRegions?: Array<{
|
|
381
|
+
x: number;
|
|
382
|
+
y: number;
|
|
383
|
+
width: number;
|
|
384
|
+
height: number;
|
|
385
|
+
} | { region: {
|
|
386
|
+
x: number;
|
|
387
|
+
y: number;
|
|
388
|
+
width: number;
|
|
389
|
+
height: number;
|
|
390
|
+
}; type?: "IgnoreContrast" | "RegularText" | "LargeText" | "BoldText" | "GraphicalObject"; }>;
|
|
391
|
+
accessibilitySettings?: { level?: "AA" | "AAA"; guidelinesVersion?: "WCAG_2_0" | "WCAG_2_1"; };
|
|
392
|
+
};
|
|
393
|
+
hostApp?: string;
|
|
394
|
+
hostOS?: string;
|
|
395
|
+
hostAppInfo?: string;
|
|
396
|
+
hostOSInfo?: string;
|
|
397
|
+
deviceInfo?: string;
|
|
398
|
+
baselineEnvName?: string;
|
|
399
|
+
environmentName?: string;
|
|
400
|
+
branchName?: string;
|
|
401
|
+
parentBranchName?: string;
|
|
402
|
+
baselineBranchName?: string;
|
|
403
|
+
compareWithParentBranch?: boolean;
|
|
404
|
+
ignoreBaseline?: boolean;
|
|
405
|
+
ignoreGitMergeBase?: boolean;
|
|
406
|
+
saveFailedTests?: boolean;
|
|
407
|
+
saveNewTests?: boolean;
|
|
408
|
+
saveDiffs?: boolean;
|
|
409
|
+
sendDom?: boolean;
|
|
410
|
+
matchTimeout?: number;
|
|
411
|
+
forceFullPageScreenshot?: boolean;
|
|
412
|
+
waitBeforeScreenshots?: number;
|
|
413
|
+
stitchMode?: "Scroll" | "CSS";
|
|
414
|
+
hideScrollbars?: boolean;
|
|
415
|
+
hideCaret?: boolean;
|
|
416
|
+
stitchOverlap?: number;
|
|
417
|
+
scrollRootElement?: (HTMLElement | { [n: number]: HTMLElement; [Symbol.iterator](): Iterator<HTMLElement, any, undefined>; }) | EyesSelector<"string" | { selector: string; type?: "css" | "xpath"; nodeType?: "element" | "shadow-root"; }>;
|
|
418
|
+
cut?: { top: number; right: number; bottom: number; left: number; } | { x: number; y: number; width: number; height: number; };
|
|
419
|
+
rotation?: 0 | 270 | -270 | 180 | -180 | 90 | -90;
|
|
420
|
+
scaleRatio?: number;
|
|
421
|
+
waitBeforeCapture?: number;
|
|
422
|
+
browsersInfo?: Array<{ name?: "chrome" | "firefox" | "edge" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; }>;
|
|
423
|
+
visualGridOptions?: Record<string, any>;
|
|
424
|
+
layoutBreakpoints?: boolean | Array<number>;
|
|
425
|
+
disableBrowserFetching?: boolean;
|
|
426
|
+
browser?: { name?: "chrome" | "firefox" | "edge" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { deviceName: string; screenOrientation?: "landscape" | "portrait"; name?: string; } | Array<{ name?: "chrome" | "firefox" | "edge" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { deviceName: string; screenOrientation?: "landscape" | "portrait"; name?: string; }>;
|
|
427
|
+
batchId?: string;
|
|
428
|
+
batchName?: string;
|
|
429
|
+
batchSequence?: string;
|
|
430
|
+
notifyOnCompletion?: boolean;
|
|
431
|
+
envName?: string;
|
|
432
|
+
accessibilitySettings?: { level?: "AA" | "AAA"; guidelinesVersion?: "WCAG_2_0" | "WCAG_2_1"; };
|
|
433
|
+
};
|
|
434
|
+
export type CypressTestResultsSummary = { getAllResults(): Array<{ getTestResults(): {
|
|
435
|
+
getId(): string;
|
|
436
|
+
getName(): string;
|
|
437
|
+
getSecretToken(): string;
|
|
438
|
+
getStatus(): TestResultsStatus;
|
|
439
|
+
getAppName(): string;
|
|
440
|
+
getBatchName(): string;
|
|
441
|
+
getBatchId(): string;
|
|
442
|
+
getBranchName(): string;
|
|
443
|
+
getHostOS(): string;
|
|
444
|
+
getHostApp(): string;
|
|
445
|
+
getHostDisplaySize(): { getWidth(): number; setWidth(width: number): void; getHeight(): number; setHeight(height: number): void; };
|
|
446
|
+
getAccessibilityStatus(): { readonly status: "Passed" | "Failed"; readonly level: "AA" | "AAA"; readonly version: "WCAG_2_0" | "WCAG_2_1"; };
|
|
447
|
+
getStartedAt(): Date;
|
|
448
|
+
getDuration(): number;
|
|
449
|
+
getIsNew(): boolean;
|
|
450
|
+
getIsDifferent(): boolean;
|
|
451
|
+
getIsAborted(): boolean;
|
|
452
|
+
getAppUrls(): { getBatch(): string; getSession(): string; };
|
|
453
|
+
getApiUrls(): { getBatch(): string; getSession(): string; };
|
|
454
|
+
getStepsInfo(): Array<{
|
|
455
|
+
getName(): string;
|
|
456
|
+
getIsDifferent(): boolean;
|
|
457
|
+
getHasBaselineImage(): boolean;
|
|
458
|
+
getHasCurrentImage(): boolean;
|
|
459
|
+
getAppUrls(): { getStep(): string; getStepEditor(): string; };
|
|
460
|
+
getApiUrls(): {
|
|
461
|
+
getBaselineImage(): string;
|
|
462
|
+
getCurrentImage(): string;
|
|
463
|
+
getCheckpointImage(): string;
|
|
464
|
+
getCheckpointImageThumbnail(): string;
|
|
465
|
+
getDiffImage(): string;
|
|
466
|
+
};
|
|
467
|
+
getRenderId(): Array<string>;
|
|
468
|
+
}>;
|
|
469
|
+
getSteps(): number;
|
|
470
|
+
getMatches(): number;
|
|
471
|
+
getMismatches(): number;
|
|
472
|
+
getMissing(): number;
|
|
473
|
+
getExactMatches(): number;
|
|
474
|
+
getStrictMatches(): number;
|
|
475
|
+
getContentMatches(): number;
|
|
476
|
+
getLayoutMatches(): number;
|
|
477
|
+
getNoneMatches(): number;
|
|
478
|
+
getUrl(): string;
|
|
479
|
+
isPassed(): boolean;
|
|
480
|
+
delete(): Promise<void>;
|
|
481
|
+
}; getException(): Error; getBrowserInfo(): { name?: "chrome" | "firefox" | "edge" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; }; } | { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; }; }>; [Symbol.iterator](): Iterator<{ getTestResults(): {
|
|
482
|
+
getId(): string;
|
|
483
|
+
getName(): string;
|
|
484
|
+
getSecretToken(): string;
|
|
485
|
+
getStatus(): TestResultsStatus;
|
|
486
|
+
getAppName(): string;
|
|
487
|
+
getBatchName(): string;
|
|
488
|
+
getBatchId(): string;
|
|
489
|
+
getBranchName(): string;
|
|
490
|
+
getHostOS(): string;
|
|
491
|
+
getHostApp(): string;
|
|
492
|
+
getHostDisplaySize(): { getWidth(): number; setWidth(width: number): void; getHeight(): number; setHeight(height: number): void; };
|
|
493
|
+
getAccessibilityStatus(): { readonly status: "Passed" | "Failed"; readonly level: "AA" | "AAA"; readonly version: "WCAG_2_0" | "WCAG_2_1"; };
|
|
494
|
+
getStartedAt(): Date;
|
|
495
|
+
getDuration(): number;
|
|
496
|
+
getIsNew(): boolean;
|
|
497
|
+
getIsDifferent(): boolean;
|
|
498
|
+
getIsAborted(): boolean;
|
|
499
|
+
getAppUrls(): { getBatch(): string; getSession(): string; };
|
|
500
|
+
getApiUrls(): { getBatch(): string; getSession(): string; };
|
|
501
|
+
getStepsInfo(): Array<{
|
|
502
|
+
getName(): string;
|
|
503
|
+
getIsDifferent(): boolean;
|
|
504
|
+
getHasBaselineImage(): boolean;
|
|
505
|
+
getHasCurrentImage(): boolean;
|
|
506
|
+
getAppUrls(): { getStep(): string; getStepEditor(): string; };
|
|
507
|
+
getApiUrls(): {
|
|
508
|
+
getBaselineImage(): string;
|
|
509
|
+
getCurrentImage(): string;
|
|
510
|
+
getCheckpointImage(): string;
|
|
511
|
+
getCheckpointImageThumbnail(): string;
|
|
512
|
+
getDiffImage(): string;
|
|
513
|
+
};
|
|
514
|
+
getRenderId(): Array<string>;
|
|
515
|
+
}>;
|
|
516
|
+
getSteps(): number;
|
|
517
|
+
getMatches(): number;
|
|
518
|
+
getMismatches(): number;
|
|
519
|
+
getMissing(): number;
|
|
520
|
+
getExactMatches(): number;
|
|
521
|
+
getStrictMatches(): number;
|
|
522
|
+
getContentMatches(): number;
|
|
523
|
+
getLayoutMatches(): number;
|
|
524
|
+
getNoneMatches(): number;
|
|
525
|
+
getUrl(): string;
|
|
526
|
+
isPassed(): boolean;
|
|
527
|
+
delete(): Promise<void>;
|
|
528
|
+
}; getException(): Error; getBrowserInfo(): { name?: "chrome" | "firefox" | "edge" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; }; } | { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Huawei Mate 50 Pro" | "Huawei Matepad 11"; screenOrientation?: "landscape" | "portrait"; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 14 Pro Max" | "iPhone 14" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad Pro (11-inch) (4th generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; } | { androidDeviceInfo: { deviceName: "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5" | "Sony Xperia 10 II" | "Pixel 6" | "Galaxy S20 Plus" | "Galaxy S21" | "Galaxy S21 Plus" | "Galaxy S21 Ultra" | "Galaxy S22 Plus" | "Galaxy Tab S8" | "Xiaomi Redmi Note 10 JE" | "Xiaomi Redmi Note 11" | "Xiaomi Redmi Note 11 Pro" | "Sony Xperia 1 II" | "Sony Xperia Ace II" | "Huawei P30 Lite"; version?: "latest" | "latest-1"; screenOrientation?: "landscape" | "portrait"; }; }; }, any, undefined>; };
|
|
529
|
+
export type EyesPluginConfig = {
|
|
530
|
+
tapDirPath: string;
|
|
531
|
+
tapFileName: string;
|
|
532
|
+
eyesIsDisabled: boolean;
|
|
533
|
+
eyesBrowser: any;
|
|
534
|
+
eyesLayoutBreakpoints: any;
|
|
535
|
+
eyesFailCypressOnDiff: boolean;
|
|
536
|
+
eyesDisableBrowserFetching: boolean;
|
|
537
|
+
eyesTestConcurrency: number;
|
|
538
|
+
eyesWaitBeforeCapture: number;
|
|
539
|
+
eyesPort?: number;
|
|
540
|
+
};
|
|
541
|
+
declare const _default: (pluginInitArgs: Cypress.ConfigOptions | NodeJS.Module) => Cypress.ConfigOptions | NodeJS.Module | (() => any);
|
|
542
|
+
export default _default;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
import {type CypressCheckSettings, type CypressEyesConfig, type CypressTestResultsSummary} from './expose'
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
6
|
+
namespace Cypress {
|
|
7
|
+
interface Chainable {
|
|
8
|
+
/**
|
|
9
|
+
* Create an Applitools test.
|
|
10
|
+
* This will start a session with the Applitools server.
|
|
11
|
+
* @example
|
|
12
|
+
* cy.eyesOpen({ appName: 'My App' })
|
|
13
|
+
*/
|
|
14
|
+
eyesOpen(config?: CypressEyesConfig): null
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Generate a screenshot of the current page and add it to the Applitools Test.
|
|
18
|
+
* @example
|
|
19
|
+
* cy.eyesCheckWindow()
|
|
20
|
+
*
|
|
21
|
+
* OR
|
|
22
|
+
*
|
|
23
|
+
* cy.eyesCheckWindow({
|
|
24
|
+
* target: 'region',
|
|
25
|
+
* selector: '.my-element'
|
|
26
|
+
* });
|
|
27
|
+
*/
|
|
28
|
+
eyesCheckWindow(...args: [tag?: string] | [settings?: CypressCheckSettings]): null
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Close the applitools test and check that all screenshots are valid.
|
|
32
|
+
* @example cy.eyesClose()
|
|
33
|
+
*/
|
|
34
|
+
eyesClose(): null
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Returns an object with the applitools test results from a given test / test file. This should be called after close.
|
|
38
|
+
* @example
|
|
39
|
+
* after(() => {
|
|
40
|
+
* cy.eyesGetAllTestResults().then(summary => {
|
|
41
|
+
* console.log(summary)
|
|
42
|
+
* })
|
|
43
|
+
* })
|
|
44
|
+
*/
|
|
45
|
+
eyesGetAllTestResults(): Chainable<CypressTestResultsSummary>
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
import exposeDefault from './expose'
|
|
51
|
+
export default exposeDefault
|