-
-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathbase.interfaces.ts
More file actions
216 lines (205 loc) · 5.12 KB
/
base.interfaces.ts
File metadata and controls
216 lines (205 loc) · 5.12 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
export interface Folders {
/** The actual folder where the current screenshots need to be saved */
actualFolder: string;
/** The baseline folder where the baseline screenshots can be found */
baselineFolder: string;
/** The diff folder where the differences are saved */
diffFolder: string;
}
export interface FolderPaths {
/** The actual folder path where the current screenshots need to be saved */
actualFolderPath: string;
/** The baseline folder path where the baseline screenshots can be found */
baselineFolderPath: string;
/** The diff folder path where the differences are saved */
diffFolderPath: string;
}
export interface FilePaths {
/** The actual file path where the current screenshots need to be saved */
actualFilePath: string;
/** The baseline file path where the baseline screenshots can be found */
baselineFilePath: string;
/** The diff file path where the difference is saved */
diffFilePath: string;
}
export interface BaseWebScreenshotOptions {
/**
* Disable the blinking cursor
* @default false
*/
disableBlinkingCursor?: boolean;
/**
* Disable all CSS animations
* @default false
*/
disableCSSAnimation?: boolean;
/**
* Make all text transparent to focus on layout
* @default false
*/
enableLayoutTesting?: boolean;
/**
* Use legacy screenshot method instead of BiDi protocol
* @default false
*/
enableLegacyScreenshotMethod?: boolean;
/**
* Hide all scrollbars
* @default true
*/
hideScrollBars?: boolean;
/**
* Padding in device pixels added to each side of ignore regions (makes each region 2× this value wider and higher).
* Helps avoid 1px boundary differences on high-DPR / BiDi. Set to 0 to disable.
* Applies to screen, element, and full-page web methods.
* @default 1
*/
ignoreRegionPadding?: number;
/**
* Elements to hide before taking screenshot
* @default []
*/
hideElements?: HTMLElement[];
/**
* Elements to remove before taking screenshot
* @default []
*/
removeElements?: HTMLElement[];
/**
* Wait for fonts to be loaded
* @default true
*/
waitForFontsLoaded?: boolean;
}
export interface BaseMobileWebScreenshotOptions {
/**
* Padding for the address bar shadow
* @default 6
*/
addressBarShadowPadding?: number;
/**
* Padding for the tool bar shadow
* @default 6
*/
toolBarShadowPadding?: number;
}
export interface BaseImageCompareOptions {
/**
* Compare images and discard alpha
* @default false
*/
ignoreAlpha?: boolean;
/**
* Compare images and discard anti aliasing
* @default false
*/
ignoreAntialiasing?: boolean;
/**
* Compare images in black and white mode
* @default false
*/
ignoreColors?: boolean;
/**
* Compare with reduced color sensitivity
* @default false
*/
ignoreLess?: boolean;
/**
* Compare with maximum sensitivity
* @default false
*/
ignoreNothing?: boolean;
/**
* Return raw mismatch percentage without rounding
* @default false
*/
rawMisMatchPercentage?: boolean;
/**
* Return all comparison data
* @default false
*/
returnAllCompareData?: boolean;
/**
* Save images only above this mismatch tolerance
* @default 0
*/
saveAboveTolerance?: number;
/**
* Scale images to same size before comparison
* @default false
*/
scaleImagesToSameSize?: boolean;
}
export interface BaseMobileBlockOutOptions {
/**
* Block out the side bar
* @default false
*/
blockOutSideBar?: boolean;
/**
* Block out the status bar
* @default false
*/
blockOutStatusBar?: boolean;
/**
* Block out the tool bar
* @default false
*/
blockOutToolBar?: boolean;
}
export interface BaseDeviceInfo {
/**
* The name of the browser
* @default ''
*/
browserName: string;
/**
* The name of the device
* @default ''
*/
deviceName: string;
/**
* The device pixel ratio
* @default 1
*/
devicePixelRatio: number;
/**
* Whether the device is Android
* @default false
*/
isAndroid: boolean;
/**
* Whether the device is iOS
* @default false
*/
isIOS: boolean;
/**
* Whether the device is mobile
* @default false
*/
isMobile: boolean;
}
export interface BaseCoordinates {
/** The x-coordinate */
x: number;
/** The y-coordinate */
y: number;
}
export interface BaseDimensions {
/** The width */
width: number;
/** The height */
height: number;
}
/** Base rectangle interface combining coordinates and dimensions */
export interface BaseRectangle extends BaseCoordinates, BaseDimensions {}
export interface BaseBoundingBox {
/** The bottom coordinate */
bottom: number;
/** The right coordinate */
right: number;
/** The left coordinate */
left: number;
/** The top coordinate */
top: number;
}