@applitools/eyes 1.26.3 → 1.27.0
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 +48 -0
- package/dist/input/CheckSettings.js +2 -2
- package/dist/input/Configuration.js +664 -613
- package/package.json +2 -2
- package/types/input/Configuration.d.ts +311 -278
|
@@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.ConfigurationData = void 0;
|
|
27
27
|
const StitchMode_1 = require("../enums/StitchMode");
|
|
28
|
+
const MatchLevel_1 = require("../enums/MatchLevel");
|
|
28
29
|
const BrowserType_1 = require("../enums/BrowserType");
|
|
29
30
|
const IosDeviceName_1 = require("../enums/IosDeviceName");
|
|
30
31
|
const ScreenOrientation_1 = require("../enums/ScreenOrientation");
|
|
@@ -62,136 +63,19 @@ class ConfigurationData {
|
|
|
62
63
|
this[key] = value;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return this._config.debugScreenshots;
|
|
68
|
-
}
|
|
69
|
-
/** @undocumented */
|
|
70
|
-
set debugScreenshots(debugScreenshots) {
|
|
71
|
-
this._config.debugScreenshots = debugScreenshots;
|
|
72
|
-
}
|
|
73
|
-
/** @undocumented */
|
|
74
|
-
getSaveDebugScreenshots() {
|
|
75
|
-
var _a, _b;
|
|
76
|
-
return (_b = (_a = this.debugScreenshots) === null || _a === void 0 ? void 0 : _a.save) !== null && _b !== void 0 ? _b : false;
|
|
77
|
-
}
|
|
78
|
-
/** @undocumented */
|
|
79
|
-
setSaveDebugScreenshots(save) {
|
|
80
|
-
this.debugScreenshots = { ...this.debugScreenshots, save };
|
|
81
|
-
return this;
|
|
82
|
-
}
|
|
83
|
-
/** @undocumented */
|
|
84
|
-
getDebugScreenshotsPath() {
|
|
85
|
-
return this.debugScreenshots.path;
|
|
86
|
-
}
|
|
87
|
-
/** @undocumented */
|
|
88
|
-
setDebugScreenshotsPath(path) {
|
|
89
|
-
this.debugScreenshots = { ...this.debugScreenshots, path };
|
|
90
|
-
return this;
|
|
91
|
-
}
|
|
92
|
-
/** @undocumented */
|
|
93
|
-
getDebugScreenshotsPrefix() {
|
|
94
|
-
return this.debugScreenshots.prefix;
|
|
95
|
-
}
|
|
96
|
-
/** @undocumented */
|
|
97
|
-
setDebugScreenshotsPrefix(prefix) {
|
|
98
|
-
this.debugScreenshots = { ...this.debugScreenshots, prefix };
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
|
-
get appName() {
|
|
102
|
-
return this._config.appName;
|
|
103
|
-
}
|
|
104
|
-
set appName(appName) {
|
|
105
|
-
utils.guard.isString(appName, { name: 'appName', strict: false });
|
|
106
|
-
this._config.appName = appName;
|
|
107
|
-
}
|
|
108
|
-
getAppName() {
|
|
109
|
-
return this.appName;
|
|
110
|
-
}
|
|
111
|
-
setAppName(appName) {
|
|
112
|
-
this.appName = appName;
|
|
113
|
-
return this;
|
|
114
|
-
}
|
|
115
|
-
get testName() {
|
|
116
|
-
return this._config.testName;
|
|
117
|
-
}
|
|
118
|
-
set testName(testName) {
|
|
119
|
-
utils.guard.isString(testName, { name: 'testName', strict: false });
|
|
120
|
-
this._config.testName = testName;
|
|
121
|
-
}
|
|
122
|
-
getTestName() {
|
|
123
|
-
return this.testName;
|
|
124
|
-
}
|
|
125
|
-
setTestName(testName) {
|
|
126
|
-
this.testName = testName;
|
|
127
|
-
return this;
|
|
128
|
-
}
|
|
129
|
-
get displayName() {
|
|
130
|
-
return this._config.displayName;
|
|
131
|
-
}
|
|
132
|
-
set displayName(displayName) {
|
|
133
|
-
utils.guard.isString(displayName, { name: 'displayName', strict: false });
|
|
134
|
-
this._config.displayName = displayName;
|
|
135
|
-
}
|
|
136
|
-
getDisplayName() {
|
|
137
|
-
return this.displayName;
|
|
138
|
-
}
|
|
139
|
-
setDisplayName(displayName) {
|
|
140
|
-
this.displayName = displayName;
|
|
141
|
-
return this;
|
|
142
|
-
}
|
|
143
|
-
get isDisabled() {
|
|
144
|
-
return this._config.isDisabled;
|
|
145
|
-
}
|
|
146
|
-
set isDisabled(isDisabled) {
|
|
147
|
-
utils.guard.isBoolean(isDisabled, { name: 'isDisabled', strict: false });
|
|
148
|
-
this._config.isDisabled = isDisabled;
|
|
149
|
-
}
|
|
150
|
-
getIsDisabled() {
|
|
151
|
-
return this.isDisabled;
|
|
152
|
-
}
|
|
153
|
-
setIsDisabled(isDisabled) {
|
|
154
|
-
this.isDisabled = isDisabled;
|
|
155
|
-
return this;
|
|
156
|
-
}
|
|
157
|
-
get matchTimeout() {
|
|
158
|
-
return this._config.matchTimeout;
|
|
159
|
-
}
|
|
160
|
-
set matchTimeout(matchTimeout) {
|
|
161
|
-
utils.guard.isInteger(matchTimeout, { name: 'matchTimeout' });
|
|
162
|
-
this._config.matchTimeout = matchTimeout;
|
|
163
|
-
}
|
|
164
|
-
getMatchTimeout() {
|
|
165
|
-
return this.matchTimeout;
|
|
166
|
-
}
|
|
167
|
-
setMatchTimeout(matchTimeout) {
|
|
168
|
-
this.matchTimeout = matchTimeout;
|
|
169
|
-
return this;
|
|
170
|
-
}
|
|
171
|
-
get sessionType() {
|
|
172
|
-
return this._config.sessionType;
|
|
173
|
-
}
|
|
174
|
-
set sessionType(sessionType) {
|
|
175
|
-
this._config.sessionType = sessionType;
|
|
176
|
-
}
|
|
177
|
-
getSessionType() {
|
|
178
|
-
return this.sessionType;
|
|
179
|
-
}
|
|
180
|
-
setSessionType(sessionType) {
|
|
181
|
-
this.sessionType = sessionType;
|
|
182
|
-
return this;
|
|
183
|
-
}
|
|
184
|
-
get viewportSize() {
|
|
185
|
-
return this._config.viewportSize;
|
|
66
|
+
get accessibilityValidation() {
|
|
67
|
+
return this.defaultMatchSettings.accessibilitySettings;
|
|
186
68
|
}
|
|
187
|
-
set
|
|
188
|
-
this.
|
|
69
|
+
set accessibilityValidation(accessibilityValidation) {
|
|
70
|
+
if (!this.defaultMatchSettings)
|
|
71
|
+
this.defaultMatchSettings = {};
|
|
72
|
+
this.defaultMatchSettings.accessibilitySettings = accessibilityValidation;
|
|
189
73
|
}
|
|
190
|
-
|
|
191
|
-
return this.
|
|
74
|
+
getAccessibilityValidation() {
|
|
75
|
+
return this.accessibilityValidation;
|
|
192
76
|
}
|
|
193
|
-
|
|
194
|
-
this.
|
|
77
|
+
setAccessibilityValidation(accessibilityValidation) {
|
|
78
|
+
this.accessibilityValidation = accessibilityValidation;
|
|
195
79
|
return this;
|
|
196
80
|
}
|
|
197
81
|
get agentId() {
|
|
@@ -223,40 +107,18 @@ class ConfigurationData {
|
|
|
223
107
|
this.apiKey = apiKey;
|
|
224
108
|
return this;
|
|
225
109
|
}
|
|
226
|
-
get
|
|
227
|
-
return this._config.
|
|
228
|
-
}
|
|
229
|
-
set serverUrl(serverUrl) {
|
|
230
|
-
utils.guard.isString(serverUrl, { name: 'serverUrl', strict: false });
|
|
231
|
-
this._config.serverUrl = serverUrl;
|
|
232
|
-
}
|
|
233
|
-
getServerUrl() {
|
|
234
|
-
var _a;
|
|
235
|
-
return (_a = this.serverUrl) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('SERVER_URL');
|
|
236
|
-
}
|
|
237
|
-
setServerUrl(serverUrl) {
|
|
238
|
-
this.serverUrl = serverUrl;
|
|
239
|
-
return this;
|
|
240
|
-
}
|
|
241
|
-
get proxy() {
|
|
242
|
-
return this._config.proxy;
|
|
110
|
+
get appName() {
|
|
111
|
+
return this._config.appName;
|
|
243
112
|
}
|
|
244
|
-
set
|
|
245
|
-
|
|
113
|
+
set appName(appName) {
|
|
114
|
+
utils.guard.isString(appName, { name: 'appName', strict: false });
|
|
115
|
+
this._config.appName = appName;
|
|
246
116
|
}
|
|
247
|
-
|
|
248
|
-
return
|
|
117
|
+
getAppName() {
|
|
118
|
+
return this.appName;
|
|
249
119
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
this.proxy = undefined;
|
|
253
|
-
}
|
|
254
|
-
else if (utils.types.isString(proxyOrUrlOrIsEnabled)) {
|
|
255
|
-
this.proxy = { url: proxyOrUrlOrIsEnabled, username, password };
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
this.proxy = proxyOrUrlOrIsEnabled;
|
|
259
|
-
}
|
|
120
|
+
setAppName(appName) {
|
|
121
|
+
this.appName = appName;
|
|
260
122
|
return this;
|
|
261
123
|
}
|
|
262
124
|
get autProxy() {
|
|
@@ -272,40 +134,33 @@ class ConfigurationData {
|
|
|
272
134
|
this.autProxy = autProxy;
|
|
273
135
|
return this;
|
|
274
136
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
return this._config.connectionTimeout;
|
|
137
|
+
get baselineBranchName() {
|
|
138
|
+
return this._config.baselineBranchName;
|
|
278
139
|
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
this._config.connectionTimeout = connectionTimeout;
|
|
140
|
+
set baselineBranchName(baselineBranchName) {
|
|
141
|
+
utils.guard.isString(baselineBranchName, { name: 'baselineBranchName' });
|
|
142
|
+
this._config.baselineBranchName = baselineBranchName;
|
|
283
143
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
return this.
|
|
144
|
+
getBaselineBranchName() {
|
|
145
|
+
var _a;
|
|
146
|
+
return (_a = this.baselineBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BASELINE_BRANCH_NAME');
|
|
287
147
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
this.connectionTimeout = connectionTimeout;
|
|
148
|
+
setBaselineBranchName(baselineBranchName) {
|
|
149
|
+
this.baselineBranchName = baselineBranchName;
|
|
291
150
|
return this;
|
|
292
151
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
return this._config.removeSession;
|
|
152
|
+
get baselineEnvName() {
|
|
153
|
+
return this._config.baselineEnvName;
|
|
296
154
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
this._config.removeSession = removeSession;
|
|
155
|
+
set baselineEnvName(baselineEnvName) {
|
|
156
|
+
utils.guard.isString(baselineEnvName, { name: 'baselineEnvName', strict: false });
|
|
157
|
+
this._config.baselineEnvName = baselineEnvName ? baselineEnvName.trim() : undefined;
|
|
301
158
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
return this.removeSession;
|
|
159
|
+
getBaselineEnvName() {
|
|
160
|
+
return this.baselineEnvName;
|
|
305
161
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
this.removeSession = removeSession;
|
|
162
|
+
setBaselineEnvName(baselineEnvName) {
|
|
163
|
+
this.baselineEnvName = baselineEnvName;
|
|
309
164
|
return this;
|
|
310
165
|
}
|
|
311
166
|
get batch() {
|
|
@@ -321,215 +176,361 @@ class ConfigurationData {
|
|
|
321
176
|
this.batch = batch;
|
|
322
177
|
return this;
|
|
323
178
|
}
|
|
324
|
-
get
|
|
325
|
-
return this._config.
|
|
179
|
+
get branchName() {
|
|
180
|
+
return this._config.branchName;
|
|
326
181
|
}
|
|
327
|
-
set
|
|
328
|
-
utils.guard.
|
|
329
|
-
this._config.
|
|
182
|
+
set branchName(branchName) {
|
|
183
|
+
utils.guard.isString(branchName, { name: 'branchName' });
|
|
184
|
+
this._config.branchName = branchName;
|
|
330
185
|
}
|
|
331
|
-
|
|
332
|
-
var _a
|
|
333
|
-
return (
|
|
186
|
+
getBranchName() {
|
|
187
|
+
var _a;
|
|
188
|
+
return (_a = this.branchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BRANCH');
|
|
334
189
|
}
|
|
335
|
-
|
|
336
|
-
this.
|
|
190
|
+
setBranchName(branchName) {
|
|
191
|
+
this.branchName = branchName;
|
|
337
192
|
return this;
|
|
338
193
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
if (!this.properties)
|
|
342
|
-
this.properties = [];
|
|
343
|
-
this.properties.push(property);
|
|
344
|
-
return this;
|
|
194
|
+
get browsersInfo() {
|
|
195
|
+
return this._config.browsersInfo;
|
|
345
196
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
197
|
+
set browsersInfo(browsersInfo) {
|
|
198
|
+
utils.guard.isArray(browsersInfo, { name: 'browsersInfo' });
|
|
199
|
+
this._config.browsersInfo = browsersInfo;
|
|
349
200
|
}
|
|
350
|
-
|
|
351
|
-
return this.
|
|
201
|
+
getBrowsersInfo() {
|
|
202
|
+
return this.browsersInfo;
|
|
352
203
|
}
|
|
353
|
-
|
|
354
|
-
utils.
|
|
355
|
-
this
|
|
204
|
+
setBrowsersInfo(browsersInfo) {
|
|
205
|
+
this.browsersInfo = browsersInfo.map(browserInfo => utils.types.has(browserInfo, 'deviceName') ? { chromeEmulationInfo: browserInfo } : browserInfo);
|
|
206
|
+
return this;
|
|
356
207
|
}
|
|
357
|
-
|
|
358
|
-
|
|
208
|
+
addBrowsers(...browsersInfo) {
|
|
209
|
+
for (const [index, browserInfo] of browsersInfo.entries()) {
|
|
210
|
+
utils.guard.isObject(browserInfo, { name: `addBrowsers( arg${index} )` });
|
|
211
|
+
}
|
|
212
|
+
if (!this.browsersInfo)
|
|
213
|
+
this.browsersInfo = [];
|
|
214
|
+
this.browsersInfo.push(...browsersInfo.map(browserInfo => utils.types.has(browserInfo, 'deviceName') ? { chromeEmulationInfo: browserInfo } : browserInfo));
|
|
215
|
+
return this;
|
|
359
216
|
}
|
|
360
|
-
|
|
361
|
-
|
|
217
|
+
addBrowser(browserInfoOrWidth, height, name = BrowserType_1.BrowserTypeEnum.CHROME) {
|
|
218
|
+
if (utils.types.isObject(browserInfoOrWidth))
|
|
219
|
+
return this.addBrowsers(browserInfoOrWidth);
|
|
220
|
+
else
|
|
221
|
+
return this.addBrowsers({ width: browserInfoOrWidth, height: height, name });
|
|
222
|
+
}
|
|
223
|
+
addDeviceEmulation(deviceName, screenOrientation = ScreenOrientation_1.ScreenOrientationEnum.PORTRAIT) {
|
|
224
|
+
if (!this.browsersInfo)
|
|
225
|
+
this.browsersInfo = [];
|
|
226
|
+
this.browsersInfo.push({ chromeEmulationInfo: { deviceName, screenOrientation } });
|
|
362
227
|
return this;
|
|
363
228
|
}
|
|
364
|
-
|
|
365
|
-
|
|
229
|
+
addMobileDevice(deviceName, screenOrientation, version) {
|
|
230
|
+
if (!this.browsersInfo)
|
|
231
|
+
this.browsersInfo = [];
|
|
232
|
+
if (utils.types.isEnumValue(deviceName, IosDeviceName_1.IosDeviceNameEnum)) {
|
|
233
|
+
this.browsersInfo.push({
|
|
234
|
+
iosDeviceInfo: {
|
|
235
|
+
deviceName: deviceName,
|
|
236
|
+
screenOrientation,
|
|
237
|
+
iosVersion: version,
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
this.browsersInfo.push({
|
|
243
|
+
androidDeviceInfo: {
|
|
244
|
+
deviceName: deviceName,
|
|
245
|
+
screenOrientation,
|
|
246
|
+
version: version,
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return this;
|
|
366
251
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
252
|
+
addMultiDeviceTarget(deviceName) {
|
|
253
|
+
if (!this.browsersInfo)
|
|
254
|
+
this.browsersInfo = [];
|
|
255
|
+
this.browsersInfo.push({ iosDeviceInfo: { deviceName } });
|
|
256
|
+
return this;
|
|
370
257
|
}
|
|
371
|
-
|
|
372
|
-
return this.
|
|
258
|
+
get captureStatusBar() {
|
|
259
|
+
return this._config.captureStatusBar;
|
|
373
260
|
}
|
|
374
|
-
|
|
375
|
-
this.
|
|
261
|
+
set captureStatusBar(captureStatusBar) {
|
|
262
|
+
this._config.captureStatusBar = captureStatusBar;
|
|
263
|
+
}
|
|
264
|
+
getCaptureStatusBar() {
|
|
265
|
+
return this.disableNMLUrlCache;
|
|
266
|
+
}
|
|
267
|
+
setCaptureStatusBar(captureStatusBar) {
|
|
268
|
+
this.captureStatusBar = captureStatusBar;
|
|
376
269
|
return this;
|
|
377
270
|
}
|
|
378
|
-
get
|
|
379
|
-
return this._config.
|
|
271
|
+
get compareWithParentBranch() {
|
|
272
|
+
return this._config.compareWithParentBranch;
|
|
380
273
|
}
|
|
381
|
-
set
|
|
382
|
-
utils.guard.
|
|
383
|
-
this._config.
|
|
274
|
+
set compareWithParentBranch(compareWithParentBranch) {
|
|
275
|
+
utils.guard.isBoolean(compareWithParentBranch, { name: 'compareWithParentBranch' });
|
|
276
|
+
this._config.compareWithParentBranch = compareWithParentBranch;
|
|
384
277
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
return (_a = this.branchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BRANCH');
|
|
278
|
+
getCompareWithParentBranch() {
|
|
279
|
+
return this.compareWithParentBranch;
|
|
388
280
|
}
|
|
389
|
-
|
|
390
|
-
this.
|
|
281
|
+
setCompareWithParentBranch(compareWithParentBranch) {
|
|
282
|
+
this.compareWithParentBranch = compareWithParentBranch;
|
|
391
283
|
return this;
|
|
392
284
|
}
|
|
393
|
-
|
|
394
|
-
|
|
285
|
+
/** @undocumented */
|
|
286
|
+
get concurrentSessions() {
|
|
287
|
+
return this._config.concurrentSessions;
|
|
395
288
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
this._config.
|
|
289
|
+
/** @undocumented */
|
|
290
|
+
set concurrentSessions(concurrentSessions) {
|
|
291
|
+
this._config.concurrentSessions = concurrentSessions;
|
|
399
292
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
return
|
|
293
|
+
/** @undocumented */
|
|
294
|
+
getConcurrentSessions() {
|
|
295
|
+
return this.concurrentSessions;
|
|
403
296
|
}
|
|
404
|
-
|
|
405
|
-
|
|
297
|
+
/** @undocumented */
|
|
298
|
+
setConcurrentSessions(concurrentSessions) {
|
|
299
|
+
this.concurrentSessions = concurrentSessions;
|
|
406
300
|
return this;
|
|
407
301
|
}
|
|
408
|
-
|
|
409
|
-
|
|
302
|
+
/** @undocumented */
|
|
303
|
+
get connectionTimeout() {
|
|
304
|
+
return this._config.connectionTimeout;
|
|
410
305
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
306
|
+
/** @undocumented */
|
|
307
|
+
set connectionTimeout(connectionTimeout) {
|
|
308
|
+
utils.guard.isInteger(connectionTimeout, { name: 'connectionTimeout', gte: 0 });
|
|
309
|
+
this._config.connectionTimeout = connectionTimeout;
|
|
414
310
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
return
|
|
311
|
+
/** @undocumented */
|
|
312
|
+
getConnectionTimeout() {
|
|
313
|
+
return this.connectionTimeout;
|
|
418
314
|
}
|
|
419
|
-
|
|
420
|
-
|
|
315
|
+
/** @undocumented */
|
|
316
|
+
setConnectionTimeout(connectionTimeout) {
|
|
317
|
+
this.connectionTimeout = connectionTimeout;
|
|
421
318
|
return this;
|
|
422
319
|
}
|
|
423
|
-
get
|
|
424
|
-
return this._config.
|
|
320
|
+
get cut() {
|
|
321
|
+
return this._config.cut;
|
|
425
322
|
}
|
|
426
|
-
set
|
|
427
|
-
|
|
428
|
-
this._config.gitMergeBaseTimestamp = gitMergeBaseTimestamp;
|
|
323
|
+
set cut(cut) {
|
|
324
|
+
this._config.cut = cut;
|
|
429
325
|
}
|
|
430
|
-
|
|
431
|
-
return this.
|
|
326
|
+
getCut() {
|
|
327
|
+
return this._config.cut;
|
|
432
328
|
}
|
|
433
|
-
|
|
434
|
-
this.
|
|
329
|
+
setCut(cut) {
|
|
330
|
+
this.cut = cut;
|
|
435
331
|
return this;
|
|
436
332
|
}
|
|
437
|
-
|
|
438
|
-
|
|
333
|
+
/** @undocumented */
|
|
334
|
+
get debugScreenshots() {
|
|
335
|
+
return this._config.debugScreenshots;
|
|
439
336
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
this._config.
|
|
337
|
+
/** @undocumented */
|
|
338
|
+
set debugScreenshots(debugScreenshots) {
|
|
339
|
+
this._config.debugScreenshots = debugScreenshots;
|
|
443
340
|
}
|
|
444
|
-
|
|
445
|
-
|
|
341
|
+
/** @undocumented */
|
|
342
|
+
getSaveDebugScreenshots() {
|
|
343
|
+
var _a, _b;
|
|
344
|
+
return (_b = (_a = this.debugScreenshots) === null || _a === void 0 ? void 0 : _a.save) !== null && _b !== void 0 ? _b : false;
|
|
446
345
|
}
|
|
447
|
-
|
|
448
|
-
|
|
346
|
+
/** @undocumented */
|
|
347
|
+
setSaveDebugScreenshots(save) {
|
|
348
|
+
this.debugScreenshots = { ...this.debugScreenshots, save };
|
|
449
349
|
return this;
|
|
450
350
|
}
|
|
451
|
-
|
|
452
|
-
|
|
351
|
+
/** @undocumented */
|
|
352
|
+
getDebugScreenshotsPath() {
|
|
353
|
+
return this.debugScreenshots.path;
|
|
453
354
|
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
this.
|
|
355
|
+
/** @undocumented */
|
|
356
|
+
setDebugScreenshotsPath(path) {
|
|
357
|
+
this.debugScreenshots = { ...this.debugScreenshots, path };
|
|
358
|
+
return this;
|
|
457
359
|
}
|
|
458
|
-
|
|
459
|
-
|
|
360
|
+
/** @undocumented */
|
|
361
|
+
getDebugScreenshotsPrefix() {
|
|
362
|
+
return this.debugScreenshots.prefix;
|
|
460
363
|
}
|
|
461
|
-
|
|
462
|
-
|
|
364
|
+
/** @undocumented */
|
|
365
|
+
setDebugScreenshotsPrefix(prefix) {
|
|
366
|
+
this.debugScreenshots = { ...this.debugScreenshots, prefix };
|
|
463
367
|
return this;
|
|
464
368
|
}
|
|
465
|
-
get
|
|
466
|
-
return this._config.
|
|
369
|
+
get defaultMatchSettings() {
|
|
370
|
+
return this._config.defaultMatchSettings;
|
|
467
371
|
}
|
|
468
|
-
set
|
|
469
|
-
utils.guard.
|
|
470
|
-
this._config.
|
|
372
|
+
set defaultMatchSettings(defaultMatchSettings) {
|
|
373
|
+
utils.guard.notNull(defaultMatchSettings, { name: 'defaultMatchSettings' });
|
|
374
|
+
this._config.defaultMatchSettings = defaultMatchSettings;
|
|
471
375
|
}
|
|
472
|
-
|
|
473
|
-
return this.
|
|
376
|
+
getDefaultMatchSettings() {
|
|
377
|
+
return new ImageMatchSettings_1.ImageMatchSettingsData(this.defaultMatchSettings);
|
|
474
378
|
}
|
|
475
|
-
|
|
476
|
-
this.
|
|
379
|
+
setDefaultMatchSettings(defaultMatchSettings) {
|
|
380
|
+
this.defaultMatchSettings = defaultMatchSettings;
|
|
477
381
|
return this;
|
|
478
382
|
}
|
|
479
|
-
get
|
|
480
|
-
return this._config.
|
|
383
|
+
get deviceInfo() {
|
|
384
|
+
return this._config.deviceInfo;
|
|
481
385
|
}
|
|
482
|
-
set
|
|
483
|
-
|
|
484
|
-
this._config.saveFailedTests = saveFailedTests;
|
|
386
|
+
set deviceInfo(deviceInfo) {
|
|
387
|
+
this._config.deviceInfo = deviceInfo ? deviceInfo.trim() : undefined;
|
|
485
388
|
}
|
|
486
|
-
|
|
487
|
-
return this.
|
|
389
|
+
getDeviceInfo() {
|
|
390
|
+
return this.deviceInfo;
|
|
488
391
|
}
|
|
489
|
-
|
|
490
|
-
this.
|
|
392
|
+
setDeviceInfo(deviceInfo) {
|
|
393
|
+
this.deviceInfo = deviceInfo;
|
|
491
394
|
return this;
|
|
492
395
|
}
|
|
493
|
-
get
|
|
494
|
-
return this._config.
|
|
396
|
+
get disableBrowserFetching() {
|
|
397
|
+
return this._config.disableBrowserFetching;
|
|
495
398
|
}
|
|
496
|
-
set
|
|
497
|
-
|
|
498
|
-
this._config.saveNewTests = saveNewTests;
|
|
399
|
+
set disableBrowserFetching(disableBrowserFetching) {
|
|
400
|
+
this._config.disableBrowserFetching = disableBrowserFetching;
|
|
499
401
|
}
|
|
500
|
-
|
|
501
|
-
return this.
|
|
402
|
+
getDisableBrowserFetching() {
|
|
403
|
+
return this.disableBrowserFetching;
|
|
502
404
|
}
|
|
503
|
-
|
|
504
|
-
this.
|
|
405
|
+
setDisableBrowserFetching(disableBrowserFetching) {
|
|
406
|
+
this.disableBrowserFetching = disableBrowserFetching;
|
|
505
407
|
return this;
|
|
506
408
|
}
|
|
507
|
-
get
|
|
508
|
-
return this._config.
|
|
409
|
+
get disableNMLUrlCache() {
|
|
410
|
+
return this._config.disableNMLUrlCache;
|
|
509
411
|
}
|
|
510
|
-
set
|
|
511
|
-
|
|
512
|
-
this._config.saveDiffs = saveDiffs;
|
|
412
|
+
set disableNMLUrlCache(disableNMLUrlCache) {
|
|
413
|
+
this._config.disableNMLUrlCache = disableNMLUrlCache;
|
|
513
414
|
}
|
|
514
|
-
|
|
515
|
-
return this.
|
|
415
|
+
getDisableNMLUrlCache() {
|
|
416
|
+
return this.disableNMLUrlCache;
|
|
516
417
|
}
|
|
517
|
-
|
|
518
|
-
this.
|
|
418
|
+
setDisableNMLUrlCache(disableNMLUrlCache) {
|
|
419
|
+
this.disableNMLUrlCache = disableNMLUrlCache;
|
|
519
420
|
return this;
|
|
520
421
|
}
|
|
521
|
-
get
|
|
522
|
-
return this._config.
|
|
422
|
+
get displayName() {
|
|
423
|
+
return this._config.displayName;
|
|
523
424
|
}
|
|
524
|
-
set
|
|
525
|
-
utils.guard.
|
|
526
|
-
this._config.
|
|
425
|
+
set displayName(displayName) {
|
|
426
|
+
utils.guard.isString(displayName, { name: 'displayName', strict: false });
|
|
427
|
+
this._config.displayName = displayName;
|
|
527
428
|
}
|
|
528
|
-
|
|
529
|
-
return this.
|
|
429
|
+
getDisplayName() {
|
|
430
|
+
return this.displayName;
|
|
530
431
|
}
|
|
531
|
-
|
|
532
|
-
this.
|
|
432
|
+
setDisplayName(displayName) {
|
|
433
|
+
this.displayName = displayName;
|
|
434
|
+
return this;
|
|
435
|
+
}
|
|
436
|
+
/** @undocumented */
|
|
437
|
+
get dontCloseBatches() {
|
|
438
|
+
return this._config.dontCloseBatches;
|
|
439
|
+
}
|
|
440
|
+
/** @undocumented */
|
|
441
|
+
set dontCloseBatches(dontCloseBatches) {
|
|
442
|
+
this._config.dontCloseBatches = dontCloseBatches;
|
|
443
|
+
}
|
|
444
|
+
/** @undocumented */
|
|
445
|
+
getDontCloseBatches() {
|
|
446
|
+
var _a;
|
|
447
|
+
return (_a = this.dontCloseBatches) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean');
|
|
448
|
+
}
|
|
449
|
+
/** @undocumented */
|
|
450
|
+
setDontCloseBatches(dontCloseBatches) {
|
|
451
|
+
this.dontCloseBatches = dontCloseBatches;
|
|
452
|
+
return this;
|
|
453
|
+
}
|
|
454
|
+
get enablePatterns() {
|
|
455
|
+
return this.defaultMatchSettings.enablePatterns;
|
|
456
|
+
}
|
|
457
|
+
set enablePatterns(enablePatterns) {
|
|
458
|
+
if (!this.defaultMatchSettings)
|
|
459
|
+
this.defaultMatchSettings = {};
|
|
460
|
+
this.defaultMatchSettings.enablePatterns = enablePatterns;
|
|
461
|
+
}
|
|
462
|
+
getEnablePatterns() {
|
|
463
|
+
return this.defaultMatchSettings.enablePatterns;
|
|
464
|
+
}
|
|
465
|
+
setEnablePatterns(enablePatterns) {
|
|
466
|
+
this.enablePatterns = enablePatterns;
|
|
467
|
+
return this;
|
|
468
|
+
}
|
|
469
|
+
get environmentName() {
|
|
470
|
+
return this._config.environmentName;
|
|
471
|
+
}
|
|
472
|
+
set environmentName(environmentName) {
|
|
473
|
+
utils.guard.isString(environmentName, { name: 'environmentName', strict: false });
|
|
474
|
+
this._config.environmentName = environmentName ? environmentName.trim() : undefined;
|
|
475
|
+
}
|
|
476
|
+
getEnvironmentName() {
|
|
477
|
+
return this.environmentName;
|
|
478
|
+
}
|
|
479
|
+
setEnvironmentName(environmentName) {
|
|
480
|
+
this.environmentName = environmentName;
|
|
481
|
+
return this;
|
|
482
|
+
}
|
|
483
|
+
get forceFullPageScreenshot() {
|
|
484
|
+
return this._config.forceFullPageScreenshot;
|
|
485
|
+
}
|
|
486
|
+
set forceFullPageScreenshot(forceFullPageScreenshot) {
|
|
487
|
+
this._config.forceFullPageScreenshot = forceFullPageScreenshot;
|
|
488
|
+
}
|
|
489
|
+
getForceFullPageScreenshot() {
|
|
490
|
+
return this.forceFullPageScreenshot;
|
|
491
|
+
}
|
|
492
|
+
setForceFullPageScreenshot(forceFullPageScreenshot) {
|
|
493
|
+
this.forceFullPageScreenshot = forceFullPageScreenshot;
|
|
494
|
+
return this;
|
|
495
|
+
}
|
|
496
|
+
get gitMergeBaseTimestamp() {
|
|
497
|
+
return this._config.gitMergeBaseTimestamp;
|
|
498
|
+
}
|
|
499
|
+
set gitMergeBaseTimestamp(gitMergeBaseTimestamp) {
|
|
500
|
+
utils.guard.isString(gitMergeBaseTimestamp, { name: 'gitMergeBaseTimestamp' });
|
|
501
|
+
this._config.gitMergeBaseTimestamp = gitMergeBaseTimestamp;
|
|
502
|
+
}
|
|
503
|
+
getGitMergeBaseTimestamp() {
|
|
504
|
+
return this.gitMergeBaseTimestamp;
|
|
505
|
+
}
|
|
506
|
+
setGitMergeBaseTimestamp(gitMergeBaseTimestamp) {
|
|
507
|
+
this.gitMergeBaseTimestamp = gitMergeBaseTimestamp;
|
|
508
|
+
return this;
|
|
509
|
+
}
|
|
510
|
+
get hideCaret() {
|
|
511
|
+
return this._config.hideCaret;
|
|
512
|
+
}
|
|
513
|
+
set hideCaret(hideCaret) {
|
|
514
|
+
this._config.hideCaret = hideCaret;
|
|
515
|
+
}
|
|
516
|
+
getHideCaret() {
|
|
517
|
+
return this.hideCaret;
|
|
518
|
+
}
|
|
519
|
+
setHideCaret(hideCaret) {
|
|
520
|
+
this.hideCaret = hideCaret;
|
|
521
|
+
return this;
|
|
522
|
+
}
|
|
523
|
+
get hideScrollbars() {
|
|
524
|
+
return this._config.hideScrollbars;
|
|
525
|
+
}
|
|
526
|
+
set hideScrollbars(hideScrollbars) {
|
|
527
|
+
this._config.hideScrollbars = hideScrollbars;
|
|
528
|
+
}
|
|
529
|
+
getHideScrollbars() {
|
|
530
|
+
return this.hideScrollbars;
|
|
531
|
+
}
|
|
532
|
+
setHideScrollbars(hideScrollbars) {
|
|
533
|
+
this.hideScrollbars = hideScrollbars;
|
|
533
534
|
return this;
|
|
534
535
|
}
|
|
535
536
|
get hostApp() {
|
|
@@ -545,6 +546,19 @@ class ConfigurationData {
|
|
|
545
546
|
this.hostApp = hostApp;
|
|
546
547
|
return this;
|
|
547
548
|
}
|
|
549
|
+
get hostAppInfo() {
|
|
550
|
+
return this._config.hostAppInfo;
|
|
551
|
+
}
|
|
552
|
+
set hostAppInfo(hostAppInfo) {
|
|
553
|
+
this._config.hostAppInfo = hostAppInfo ? hostAppInfo.trim() : undefined;
|
|
554
|
+
}
|
|
555
|
+
getHostAppInfo() {
|
|
556
|
+
return this.hostAppInfo;
|
|
557
|
+
}
|
|
558
|
+
setHostAppInfo(hostAppInfo) {
|
|
559
|
+
this.hostAppInfo = hostAppInfo;
|
|
560
|
+
return this;
|
|
561
|
+
}
|
|
548
562
|
get hostOS() {
|
|
549
563
|
return this._config.hostOS;
|
|
550
564
|
}
|
|
@@ -554,211 +568,304 @@ class ConfigurationData {
|
|
|
554
568
|
getHostOS() {
|
|
555
569
|
return this.hostOS;
|
|
556
570
|
}
|
|
557
|
-
setHostOS(hostOS) {
|
|
558
|
-
this.hostOS = hostOS;
|
|
571
|
+
setHostOS(hostOS) {
|
|
572
|
+
this.hostOS = hostOS;
|
|
573
|
+
return this;
|
|
574
|
+
}
|
|
575
|
+
get hostOSInfo() {
|
|
576
|
+
return this._config.hostOSInfo;
|
|
577
|
+
}
|
|
578
|
+
set hostOSInfo(hostOSInfo) {
|
|
579
|
+
this._config.hostOSInfo = hostOSInfo ? hostOSInfo.trim() : undefined;
|
|
580
|
+
}
|
|
581
|
+
getHostOSInfo() {
|
|
582
|
+
return this.hostOSInfo;
|
|
583
|
+
}
|
|
584
|
+
setHostOSInfo(hostOSInfo) {
|
|
585
|
+
this.hostOSInfo = hostOSInfo;
|
|
586
|
+
return this;
|
|
587
|
+
}
|
|
588
|
+
get ignoreBaseline() {
|
|
589
|
+
return this._config.ignoreBaseline;
|
|
590
|
+
}
|
|
591
|
+
set ignoreBaseline(ignoreBaseline) {
|
|
592
|
+
utils.guard.isBoolean(ignoreBaseline, { name: 'ignoreBaseline' });
|
|
593
|
+
this._config.ignoreBaseline = ignoreBaseline;
|
|
594
|
+
}
|
|
595
|
+
getIgnoreBaseline() {
|
|
596
|
+
return this.ignoreBaseline;
|
|
597
|
+
}
|
|
598
|
+
setIgnoreBaseline(ignoreBaseline) {
|
|
599
|
+
this.ignoreBaseline = ignoreBaseline;
|
|
600
|
+
return this;
|
|
601
|
+
}
|
|
602
|
+
get ignoreCaret() {
|
|
603
|
+
return this.defaultMatchSettings.ignoreCaret;
|
|
604
|
+
}
|
|
605
|
+
set ignoreCaret(ignoreCaret) {
|
|
606
|
+
if (!this.defaultMatchSettings)
|
|
607
|
+
this.defaultMatchSettings = {};
|
|
608
|
+
this.defaultMatchSettings.ignoreCaret = ignoreCaret;
|
|
609
|
+
}
|
|
610
|
+
getIgnoreCaret() {
|
|
611
|
+
return this.defaultMatchSettings.ignoreCaret;
|
|
612
|
+
}
|
|
613
|
+
setIgnoreCaret(ignoreCaret) {
|
|
614
|
+
this.ignoreCaret = ignoreCaret;
|
|
615
|
+
return this;
|
|
616
|
+
}
|
|
617
|
+
get ignoreDisplacements() {
|
|
618
|
+
return this.defaultMatchSettings.ignoreDisplacements;
|
|
619
|
+
}
|
|
620
|
+
set ignoreDisplacements(ignoreDisplacements) {
|
|
621
|
+
if (!this.defaultMatchSettings)
|
|
622
|
+
this.defaultMatchSettings = {};
|
|
623
|
+
this.defaultMatchSettings.ignoreDisplacements = ignoreDisplacements;
|
|
624
|
+
}
|
|
625
|
+
getIgnoreDisplacements() {
|
|
626
|
+
return this.ignoreDisplacements;
|
|
627
|
+
}
|
|
628
|
+
setIgnoreDisplacements(ignoreDisplacements) {
|
|
629
|
+
this.ignoreDisplacements = ignoreDisplacements;
|
|
630
|
+
return this;
|
|
631
|
+
}
|
|
632
|
+
get ignoreGitMergeBase() {
|
|
633
|
+
return this._config.ignoreGitMergeBase;
|
|
634
|
+
}
|
|
635
|
+
set ignoreGitMergeBase(ignoreGitMergeBase) {
|
|
636
|
+
utils.guard.isBoolean(ignoreGitMergeBase, { name: 'ignoreGitMergeBase' });
|
|
637
|
+
this._config.ignoreGitMergeBase = ignoreGitMergeBase;
|
|
638
|
+
}
|
|
639
|
+
getIgnoreGitMergeBase() {
|
|
640
|
+
return this.ignoreGitMergeBase;
|
|
641
|
+
}
|
|
642
|
+
setIgnoreGitMergeBase(ignoreGitMergeBase) {
|
|
643
|
+
this.ignoreGitMergeBase = ignoreGitMergeBase;
|
|
644
|
+
return this;
|
|
645
|
+
}
|
|
646
|
+
get isDisabled() {
|
|
647
|
+
return this._config.isDisabled;
|
|
648
|
+
}
|
|
649
|
+
set isDisabled(isDisabled) {
|
|
650
|
+
utils.guard.isBoolean(isDisabled, { name: 'isDisabled', strict: false });
|
|
651
|
+
this._config.isDisabled = isDisabled;
|
|
652
|
+
}
|
|
653
|
+
getIsDisabled() {
|
|
654
|
+
return this.isDisabled;
|
|
655
|
+
}
|
|
656
|
+
setIsDisabled(isDisabled) {
|
|
657
|
+
this.isDisabled = isDisabled;
|
|
559
658
|
return this;
|
|
560
659
|
}
|
|
561
|
-
get
|
|
562
|
-
return this._config.
|
|
660
|
+
get layoutBreakpoints() {
|
|
661
|
+
return this._config.layoutBreakpoints;
|
|
563
662
|
}
|
|
564
|
-
set
|
|
565
|
-
|
|
663
|
+
set layoutBreakpoints(layoutBreakpoints) {
|
|
664
|
+
utils.guard.notNull(layoutBreakpoints, { name: 'layoutBreakpoints' });
|
|
665
|
+
if (utils.types.isArray(layoutBreakpoints)) {
|
|
666
|
+
this._config.layoutBreakpoints = layoutBreakpoints.length > 0 ? layoutBreakpoints : false;
|
|
667
|
+
}
|
|
668
|
+
else {
|
|
669
|
+
this._config.layoutBreakpoints = layoutBreakpoints;
|
|
670
|
+
}
|
|
566
671
|
}
|
|
567
|
-
|
|
568
|
-
return this.
|
|
672
|
+
getLayoutBreakpoints() {
|
|
673
|
+
return this.layoutBreakpoints;
|
|
569
674
|
}
|
|
570
|
-
|
|
571
|
-
this.
|
|
675
|
+
setLayoutBreakpoints(layoutBreakpoints) {
|
|
676
|
+
this.layoutBreakpoints = layoutBreakpoints;
|
|
572
677
|
return this;
|
|
573
678
|
}
|
|
574
|
-
get
|
|
575
|
-
return this.
|
|
679
|
+
get matchLevel() {
|
|
680
|
+
return this.defaultMatchSettings.matchLevel;
|
|
576
681
|
}
|
|
577
|
-
set
|
|
578
|
-
|
|
682
|
+
set matchLevel(matchLevel) {
|
|
683
|
+
utils.guard.isEnumValue(matchLevel, MatchLevel_1.MatchLevelEnum, { name: 'matchLevel' });
|
|
684
|
+
if (!this.defaultMatchSettings)
|
|
685
|
+
this.defaultMatchSettings = {};
|
|
686
|
+
this.defaultMatchSettings.matchLevel = matchLevel;
|
|
579
687
|
}
|
|
580
|
-
|
|
581
|
-
return this.
|
|
688
|
+
getMatchLevel() {
|
|
689
|
+
return this.matchLevel;
|
|
582
690
|
}
|
|
583
|
-
|
|
584
|
-
this.
|
|
691
|
+
setMatchLevel(matchLevel) {
|
|
692
|
+
this.matchLevel = matchLevel;
|
|
585
693
|
return this;
|
|
586
694
|
}
|
|
587
|
-
get
|
|
588
|
-
return this._config.
|
|
695
|
+
get matchTimeout() {
|
|
696
|
+
return this._config.matchTimeout;
|
|
589
697
|
}
|
|
590
|
-
set
|
|
591
|
-
|
|
698
|
+
set matchTimeout(matchTimeout) {
|
|
699
|
+
utils.guard.isInteger(matchTimeout, { name: 'matchTimeout' });
|
|
700
|
+
this._config.matchTimeout = matchTimeout;
|
|
592
701
|
}
|
|
593
|
-
|
|
594
|
-
return this.
|
|
702
|
+
getMatchTimeout() {
|
|
703
|
+
return this.matchTimeout;
|
|
595
704
|
}
|
|
596
|
-
|
|
597
|
-
this.
|
|
705
|
+
setMatchTimeout(matchTimeout) {
|
|
706
|
+
this.matchTimeout = matchTimeout;
|
|
598
707
|
return this;
|
|
599
708
|
}
|
|
600
|
-
get
|
|
601
|
-
return this._config.
|
|
709
|
+
get mobileOptions() {
|
|
710
|
+
return this._config.mobileOptions;
|
|
602
711
|
}
|
|
603
|
-
set
|
|
604
|
-
|
|
605
|
-
this._config.defaultMatchSettings = defaultMatchSettings;
|
|
712
|
+
set mobileOptions(mobileOptions) {
|
|
713
|
+
this._config.mobileOptions = mobileOptions;
|
|
606
714
|
}
|
|
607
|
-
|
|
608
|
-
return
|
|
715
|
+
getMobileOptions() {
|
|
716
|
+
return this.mobileOptions;
|
|
609
717
|
}
|
|
610
|
-
|
|
611
|
-
this.
|
|
718
|
+
setMobileOptions(mobileOptions) {
|
|
719
|
+
this.mobileOptions = mobileOptions;
|
|
612
720
|
return this;
|
|
613
721
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
return (_a = this.defaultMatchSettings) === null || _a === void 0 ? void 0 : _a.matchLevel;
|
|
722
|
+
get parentBranchName() {
|
|
723
|
+
return this._config.parentBranchName;
|
|
617
724
|
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
this.defaultMatchSettings.matchLevel = matchLevel;
|
|
622
|
-
return this;
|
|
725
|
+
set parentBranchName(parentBranchName) {
|
|
726
|
+
utils.guard.isString(parentBranchName, { name: 'parentBranchName' });
|
|
727
|
+
this._config.parentBranchName = parentBranchName;
|
|
623
728
|
}
|
|
624
|
-
|
|
625
|
-
|
|
729
|
+
getParentBranchName() {
|
|
730
|
+
var _a;
|
|
731
|
+
return (_a = this.parentBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('PARENT_BRANCH');
|
|
626
732
|
}
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
this.defaultMatchSettings = {};
|
|
630
|
-
this.defaultMatchSettings.accessibilitySettings = accessibilityValidation;
|
|
733
|
+
setParentBranchName(parentBranchName) {
|
|
734
|
+
this.parentBranchName = parentBranchName;
|
|
631
735
|
return this;
|
|
632
736
|
}
|
|
633
|
-
|
|
634
|
-
return this.
|
|
737
|
+
get properties() {
|
|
738
|
+
return this._config.properties;
|
|
635
739
|
}
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
this.defaultMatchSettings.useDom = useDom;
|
|
640
|
-
return this;
|
|
740
|
+
set properties(properties) {
|
|
741
|
+
utils.guard.isArray(properties, { name: 'properties' });
|
|
742
|
+
this._config.properties = properties;
|
|
641
743
|
}
|
|
642
|
-
|
|
643
|
-
|
|
744
|
+
getProperties() {
|
|
745
|
+
var _a, _b;
|
|
746
|
+
return (_b = (_a = this.properties) === null || _a === void 0 ? void 0 : _a.map(property => new PropertyData_1.PropertyDataData(property))) !== null && _b !== void 0 ? _b : [];
|
|
644
747
|
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
this.defaultMatchSettings = {};
|
|
648
|
-
this.defaultMatchSettings.enablePatterns = enablePatterns;
|
|
748
|
+
setProperties(properties) {
|
|
749
|
+
this.properties = properties;
|
|
649
750
|
return this;
|
|
650
751
|
}
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
this.defaultMatchSettings = {};
|
|
657
|
-
this.defaultMatchSettings.ignoreDisplacements = ignoreDisplacements;
|
|
752
|
+
addProperty(propOrName, value) {
|
|
753
|
+
const property = utils.types.isString(propOrName) ? { name: propOrName, value: value } : propOrName;
|
|
754
|
+
if (!this.properties)
|
|
755
|
+
this.properties = [];
|
|
756
|
+
this.properties.push(property);
|
|
658
757
|
return this;
|
|
659
758
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
}
|
|
663
|
-
setIgnoreCaret(ignoreCaret) {
|
|
664
|
-
if (!this.defaultMatchSettings)
|
|
665
|
-
this.defaultMatchSettings = {};
|
|
666
|
-
this.defaultMatchSettings.ignoreCaret = ignoreCaret;
|
|
759
|
+
clearProperties() {
|
|
760
|
+
this.properties = [];
|
|
667
761
|
return this;
|
|
668
762
|
}
|
|
669
|
-
get
|
|
670
|
-
return this._config.
|
|
763
|
+
get proxy() {
|
|
764
|
+
return this._config.proxy;
|
|
671
765
|
}
|
|
672
|
-
set
|
|
673
|
-
this._config.
|
|
766
|
+
set proxy(proxy) {
|
|
767
|
+
this._config.proxy = proxy;
|
|
674
768
|
}
|
|
675
|
-
|
|
676
|
-
return this.
|
|
769
|
+
getProxy() {
|
|
770
|
+
return new ProxySettings_1.ProxySettingsData(this.proxy);
|
|
677
771
|
}
|
|
678
|
-
|
|
679
|
-
|
|
772
|
+
setProxy(proxyOrUrlOrIsEnabled, username, password) {
|
|
773
|
+
if (proxyOrUrlOrIsEnabled === false) {
|
|
774
|
+
this.proxy = undefined;
|
|
775
|
+
}
|
|
776
|
+
else if (utils.types.isString(proxyOrUrlOrIsEnabled)) {
|
|
777
|
+
this.proxy = { url: proxyOrUrlOrIsEnabled, username, password };
|
|
778
|
+
}
|
|
779
|
+
else {
|
|
780
|
+
this.proxy = proxyOrUrlOrIsEnabled;
|
|
781
|
+
}
|
|
680
782
|
return this;
|
|
681
783
|
}
|
|
682
|
-
|
|
683
|
-
|
|
784
|
+
/** @undocumented */
|
|
785
|
+
get removeSession() {
|
|
786
|
+
return this._config.removeSession;
|
|
684
787
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
788
|
+
/** @undocumented */
|
|
789
|
+
set removeSession(removeSession) {
|
|
790
|
+
utils.guard.isBoolean(removeSession, { name: 'removeSession' });
|
|
791
|
+
this._config.removeSession = removeSession;
|
|
688
792
|
}
|
|
689
|
-
|
|
690
|
-
|
|
793
|
+
/** @undocumented */
|
|
794
|
+
getRemoveSession() {
|
|
795
|
+
return this.removeSession;
|
|
691
796
|
}
|
|
692
|
-
|
|
693
|
-
|
|
797
|
+
/** @undocumented */
|
|
798
|
+
setRemoveSession(removeSession) {
|
|
799
|
+
this.removeSession = removeSession;
|
|
694
800
|
return this;
|
|
695
801
|
}
|
|
696
|
-
get
|
|
697
|
-
return this._config.
|
|
802
|
+
get rotation() {
|
|
803
|
+
return this._config.rotation;
|
|
698
804
|
}
|
|
699
|
-
set
|
|
700
|
-
|
|
701
|
-
this._config.waitBeforeCapture = waitBeforeCapture;
|
|
805
|
+
set rotation(rotation) {
|
|
806
|
+
this._config.rotation = rotation;
|
|
702
807
|
}
|
|
703
|
-
|
|
704
|
-
return this.
|
|
808
|
+
getRotation() {
|
|
809
|
+
return new ImageRotation_1.ImageRotationData(this.rotation);
|
|
705
810
|
}
|
|
706
|
-
|
|
707
|
-
this.
|
|
811
|
+
setRotation(rotation) {
|
|
812
|
+
this.rotation = utils.types.isNumber(rotation) ? rotation : rotation.rotation;
|
|
708
813
|
return this;
|
|
709
814
|
}
|
|
710
|
-
get
|
|
711
|
-
return this._config.
|
|
815
|
+
get saveDiffs() {
|
|
816
|
+
return this._config.saveDiffs;
|
|
712
817
|
}
|
|
713
|
-
set
|
|
714
|
-
utils.guard.
|
|
715
|
-
this._config.
|
|
818
|
+
set saveDiffs(saveDiffs) {
|
|
819
|
+
utils.guard.isBoolean(saveDiffs, { name: 'saveDiffs' });
|
|
820
|
+
this._config.saveDiffs = saveDiffs;
|
|
716
821
|
}
|
|
717
|
-
|
|
718
|
-
return this.
|
|
822
|
+
getSaveDiffs() {
|
|
823
|
+
return this.saveDiffs;
|
|
719
824
|
}
|
|
720
|
-
|
|
721
|
-
this.
|
|
825
|
+
setSaveDiffs(saveDiffs) {
|
|
826
|
+
this.saveDiffs = saveDiffs;
|
|
722
827
|
return this;
|
|
723
828
|
}
|
|
724
|
-
get
|
|
725
|
-
return this._config.
|
|
829
|
+
get saveFailedTests() {
|
|
830
|
+
return this._config.saveFailedTests;
|
|
726
831
|
}
|
|
727
|
-
set
|
|
728
|
-
|
|
832
|
+
set saveFailedTests(saveFailedTests) {
|
|
833
|
+
utils.guard.isBoolean(saveFailedTests, { name: 'saveFailedTests' });
|
|
834
|
+
this._config.saveFailedTests = saveFailedTests;
|
|
729
835
|
}
|
|
730
|
-
|
|
731
|
-
return this.
|
|
836
|
+
getSaveFailedTests() {
|
|
837
|
+
return this.saveFailedTests;
|
|
732
838
|
}
|
|
733
|
-
|
|
734
|
-
this.
|
|
839
|
+
setSaveFailedTests(saveFailedTests) {
|
|
840
|
+
this.saveFailedTests = saveFailedTests;
|
|
735
841
|
return this;
|
|
736
842
|
}
|
|
737
|
-
get
|
|
738
|
-
return this._config.
|
|
843
|
+
get saveNewTests() {
|
|
844
|
+
return this._config.saveNewTests;
|
|
739
845
|
}
|
|
740
|
-
set
|
|
741
|
-
|
|
846
|
+
set saveNewTests(saveNewTests) {
|
|
847
|
+
utils.guard.isBoolean(saveNewTests, { name: 'saveNewTests' });
|
|
848
|
+
this._config.saveNewTests = saveNewTests;
|
|
742
849
|
}
|
|
743
|
-
|
|
744
|
-
return this.
|
|
850
|
+
getSaveNewTests() {
|
|
851
|
+
return this.saveNewTests;
|
|
745
852
|
}
|
|
746
|
-
|
|
747
|
-
this.
|
|
853
|
+
setSaveNewTests(saveNewTests) {
|
|
854
|
+
this.saveNewTests = saveNewTests;
|
|
748
855
|
return this;
|
|
749
856
|
}
|
|
750
|
-
get
|
|
751
|
-
return this._config.
|
|
857
|
+
get scaleRatio() {
|
|
858
|
+
return this._config.scaleRatio;
|
|
752
859
|
}
|
|
753
|
-
set
|
|
754
|
-
utils.guard.
|
|
755
|
-
this._config.
|
|
860
|
+
set scaleRatio(scaleRatio) {
|
|
861
|
+
utils.guard.isNumber(scaleRatio, { name: 'scaleRatio', strict: false });
|
|
862
|
+
this._config.scaleRatio = scaleRatio;
|
|
756
863
|
}
|
|
757
|
-
|
|
758
|
-
return this.
|
|
864
|
+
getScaleRatio() {
|
|
865
|
+
return this.scaleRatio;
|
|
759
866
|
}
|
|
760
|
-
|
|
761
|
-
this.
|
|
867
|
+
setScaleRatio(scaleRatio) {
|
|
868
|
+
this.scaleRatio = scaleRatio;
|
|
762
869
|
return this;
|
|
763
870
|
}
|
|
764
871
|
get scrollRootElement() {
|
|
@@ -779,125 +886,116 @@ class ConfigurationData {
|
|
|
779
886
|
this.scrollRootElement = scrollRootElement;
|
|
780
887
|
return this;
|
|
781
888
|
}
|
|
782
|
-
get
|
|
783
|
-
return this._config.
|
|
889
|
+
get sendDom() {
|
|
890
|
+
return this._config.sendDom;
|
|
784
891
|
}
|
|
785
|
-
set
|
|
786
|
-
|
|
892
|
+
set sendDom(sendDom) {
|
|
893
|
+
utils.guard.isBoolean(sendDom, { name: 'sendDom' });
|
|
894
|
+
this._config.sendDom = sendDom;
|
|
787
895
|
}
|
|
788
|
-
|
|
789
|
-
return this.
|
|
896
|
+
getSendDom() {
|
|
897
|
+
return this.sendDom;
|
|
790
898
|
}
|
|
791
|
-
|
|
792
|
-
this.
|
|
899
|
+
setSendDom(sendDom) {
|
|
900
|
+
this.sendDom = sendDom;
|
|
793
901
|
return this;
|
|
794
902
|
}
|
|
795
|
-
get
|
|
796
|
-
return this._config.
|
|
903
|
+
get serverUrl() {
|
|
904
|
+
return this._config.serverUrl;
|
|
797
905
|
}
|
|
798
|
-
set
|
|
799
|
-
|
|
906
|
+
set serverUrl(serverUrl) {
|
|
907
|
+
utils.guard.isString(serverUrl, { name: 'serverUrl', strict: false });
|
|
908
|
+
this._config.serverUrl = serverUrl;
|
|
800
909
|
}
|
|
801
|
-
|
|
802
|
-
|
|
910
|
+
getServerUrl() {
|
|
911
|
+
var _a;
|
|
912
|
+
return (_a = this.serverUrl) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('SERVER_URL');
|
|
803
913
|
}
|
|
804
|
-
|
|
805
|
-
this.
|
|
914
|
+
setServerUrl(serverUrl) {
|
|
915
|
+
this.serverUrl = serverUrl;
|
|
806
916
|
return this;
|
|
807
917
|
}
|
|
808
|
-
get
|
|
809
|
-
return this._config.
|
|
918
|
+
get sessionType() {
|
|
919
|
+
return this._config.sessionType;
|
|
810
920
|
}
|
|
811
|
-
set
|
|
812
|
-
|
|
813
|
-
this._config.scaleRatio = scaleRatio;
|
|
921
|
+
set sessionType(sessionType) {
|
|
922
|
+
this._config.sessionType = sessionType;
|
|
814
923
|
}
|
|
815
|
-
|
|
816
|
-
return this.
|
|
924
|
+
getSessionType() {
|
|
925
|
+
return this.sessionType;
|
|
817
926
|
}
|
|
818
|
-
|
|
819
|
-
this.
|
|
927
|
+
setSessionType(sessionType) {
|
|
928
|
+
this.sessionType = sessionType;
|
|
820
929
|
return this;
|
|
821
930
|
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
return this._config.concurrentSessions;
|
|
931
|
+
get stitchMode() {
|
|
932
|
+
return this._config.stitchMode;
|
|
825
933
|
}
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
this._config.
|
|
934
|
+
set stitchMode(stitchMode) {
|
|
935
|
+
utils.guard.isEnumValue(stitchMode, StitchMode_1.StitchModeEnum, { name: 'stitchMode' });
|
|
936
|
+
this._config.stitchMode = stitchMode;
|
|
829
937
|
}
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
return this.concurrentSessions;
|
|
938
|
+
getStitchMode() {
|
|
939
|
+
return this.stitchMode;
|
|
833
940
|
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
this.concurrentSessions = concurrentSessions;
|
|
941
|
+
setStitchMode(stitchMode) {
|
|
942
|
+
this.stitchMode = stitchMode;
|
|
837
943
|
return this;
|
|
838
944
|
}
|
|
839
|
-
get
|
|
840
|
-
return this._config.
|
|
945
|
+
get stitchOverlap() {
|
|
946
|
+
return this._config.stitchOverlap;
|
|
841
947
|
}
|
|
842
|
-
set
|
|
843
|
-
utils.guard.
|
|
844
|
-
this._config.
|
|
948
|
+
set stitchOverlap(stitchOverlap) {
|
|
949
|
+
utils.guard.isInteger(stitchOverlap, { name: 'stitchOverlap', strict: false });
|
|
950
|
+
this._config.stitchOverlap = stitchOverlap;
|
|
845
951
|
}
|
|
846
|
-
|
|
847
|
-
return this.
|
|
952
|
+
getStitchOverlap() {
|
|
953
|
+
return this.stitchOverlap;
|
|
848
954
|
}
|
|
849
|
-
|
|
850
|
-
this.
|
|
955
|
+
setStitchOverlap(stitchOverlap) {
|
|
956
|
+
this.stitchOverlap = stitchOverlap;
|
|
851
957
|
return this;
|
|
852
958
|
}
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
utils.guard.isObject(browserInfo, { name: `addBrowsers( arg${index} )` });
|
|
856
|
-
}
|
|
857
|
-
if (!this.browsersInfo)
|
|
858
|
-
this.browsersInfo = [];
|
|
859
|
-
this.browsersInfo.push(...browsersInfo.map(browserInfo => utils.types.has(browserInfo, 'deviceName') ? { chromeEmulationInfo: browserInfo } : browserInfo));
|
|
860
|
-
return this;
|
|
959
|
+
get testName() {
|
|
960
|
+
return this._config.testName;
|
|
861
961
|
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
else
|
|
866
|
-
return this.addBrowsers({ width: browserInfoOrWidth, height: height, name });
|
|
962
|
+
set testName(testName) {
|
|
963
|
+
utils.guard.isString(testName, { name: 'testName', strict: false });
|
|
964
|
+
this._config.testName = testName;
|
|
867
965
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
966
|
+
getTestName() {
|
|
967
|
+
return this.testName;
|
|
968
|
+
}
|
|
969
|
+
setTestName(testName) {
|
|
970
|
+
this.testName = testName;
|
|
872
971
|
return this;
|
|
873
972
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
this.browsersInfo.push({
|
|
888
|
-
androidDeviceInfo: {
|
|
889
|
-
deviceName: deviceName,
|
|
890
|
-
screenOrientation,
|
|
891
|
-
version: version,
|
|
892
|
-
},
|
|
893
|
-
});
|
|
894
|
-
}
|
|
973
|
+
get useDom() {
|
|
974
|
+
return this.defaultMatchSettings.useDom;
|
|
975
|
+
}
|
|
976
|
+
set useDom(useDom) {
|
|
977
|
+
if (!this.defaultMatchSettings)
|
|
978
|
+
this.defaultMatchSettings = {};
|
|
979
|
+
this.defaultMatchSettings.useDom = useDom;
|
|
980
|
+
}
|
|
981
|
+
getUseDom() {
|
|
982
|
+
return this.useDom;
|
|
983
|
+
}
|
|
984
|
+
setUseDom(useDom) {
|
|
985
|
+
this.useDom = useDom;
|
|
895
986
|
return this;
|
|
896
987
|
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
988
|
+
get viewportSize() {
|
|
989
|
+
return this._config.viewportSize;
|
|
990
|
+
}
|
|
991
|
+
set viewportSize(viewportSize) {
|
|
992
|
+
this._config.viewportSize = viewportSize;
|
|
993
|
+
}
|
|
994
|
+
getViewportSize() {
|
|
995
|
+
return this.viewportSize && new RectangleSize_1.RectangleSizeData(this.viewportSize);
|
|
996
|
+
}
|
|
997
|
+
setViewportSize(viewportSize) {
|
|
998
|
+
this.viewportSize = viewportSize;
|
|
901
999
|
return this;
|
|
902
1000
|
}
|
|
903
1001
|
get visualGridOptions() {
|
|
@@ -919,80 +1017,32 @@ class ConfigurationData {
|
|
|
919
1017
|
this.visualGridOptions[key] = value;
|
|
920
1018
|
return this;
|
|
921
1019
|
}
|
|
922
|
-
get
|
|
923
|
-
return this._config.
|
|
924
|
-
}
|
|
925
|
-
set layoutBreakpoints(layoutBreakpoints) {
|
|
926
|
-
utils.guard.notNull(layoutBreakpoints, { name: 'layoutBreakpoints' });
|
|
927
|
-
if (utils.types.isArray(layoutBreakpoints)) {
|
|
928
|
-
this._config.layoutBreakpoints = layoutBreakpoints.length > 0 ? layoutBreakpoints : false;
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
this._config.layoutBreakpoints = layoutBreakpoints;
|
|
932
|
-
}
|
|
933
|
-
}
|
|
934
|
-
getLayoutBreakpoints() {
|
|
935
|
-
return this.layoutBreakpoints;
|
|
936
|
-
}
|
|
937
|
-
setLayoutBreakpoints(layoutBreakpoints) {
|
|
938
|
-
this.layoutBreakpoints = layoutBreakpoints;
|
|
939
|
-
return this;
|
|
940
|
-
}
|
|
941
|
-
get disableBrowserFetching() {
|
|
942
|
-
return this._config.disableBrowserFetching;
|
|
943
|
-
}
|
|
944
|
-
set disableBrowserFetching(disableBrowserFetching) {
|
|
945
|
-
this._config.disableBrowserFetching = disableBrowserFetching;
|
|
946
|
-
}
|
|
947
|
-
getDisableBrowserFetching() {
|
|
948
|
-
return this.disableBrowserFetching;
|
|
949
|
-
}
|
|
950
|
-
setDisableBrowserFetching(disableBrowserFetching) {
|
|
951
|
-
this.disableBrowserFetching = disableBrowserFetching;
|
|
952
|
-
return this;
|
|
953
|
-
}
|
|
954
|
-
/** @undocumented */
|
|
955
|
-
get dontCloseBatches() {
|
|
956
|
-
return this._config.dontCloseBatches;
|
|
957
|
-
}
|
|
958
|
-
/** @undocumented */
|
|
959
|
-
set dontCloseBatches(dontCloseBatches) {
|
|
960
|
-
this._config.dontCloseBatches = dontCloseBatches;
|
|
961
|
-
}
|
|
962
|
-
/** @undocumented */
|
|
963
|
-
getDontCloseBatches() {
|
|
964
|
-
var _a;
|
|
965
|
-
return (_a = this.dontCloseBatches) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean');
|
|
966
|
-
}
|
|
967
|
-
/** @undocumented */
|
|
968
|
-
setDontCloseBatches(dontCloseBatches) {
|
|
969
|
-
this.dontCloseBatches = dontCloseBatches;
|
|
970
|
-
return this;
|
|
971
|
-
}
|
|
972
|
-
get disableNMLUrlCache() {
|
|
973
|
-
return this._config.disableNMLUrlCache;
|
|
1020
|
+
get waitBeforeCapture() {
|
|
1021
|
+
return this._config.waitBeforeCapture;
|
|
974
1022
|
}
|
|
975
|
-
set
|
|
976
|
-
|
|
1023
|
+
set waitBeforeCapture(waitBeforeCapture) {
|
|
1024
|
+
utils.guard.isInteger(waitBeforeCapture, { name: 'waitBeforeCapture', gt: 0 });
|
|
1025
|
+
this._config.waitBeforeCapture = waitBeforeCapture;
|
|
977
1026
|
}
|
|
978
|
-
|
|
979
|
-
return this.
|
|
1027
|
+
getWaitBeforeCapture() {
|
|
1028
|
+
return this.waitBeforeCapture;
|
|
980
1029
|
}
|
|
981
|
-
|
|
982
|
-
this.
|
|
1030
|
+
setWaitBeforeCapture(waitBeforeCapture) {
|
|
1031
|
+
this.waitBeforeCapture = waitBeforeCapture;
|
|
983
1032
|
return this;
|
|
984
1033
|
}
|
|
985
|
-
get
|
|
986
|
-
return this._config.
|
|
1034
|
+
get waitBeforeScreenshots() {
|
|
1035
|
+
return this._config.waitBeforeScreenshots;
|
|
987
1036
|
}
|
|
988
|
-
set
|
|
989
|
-
|
|
1037
|
+
set waitBeforeScreenshots(waitBeforeScreenshots) {
|
|
1038
|
+
utils.guard.isInteger(waitBeforeScreenshots, { name: 'waitBeforeScreenshots', gt: 0 });
|
|
1039
|
+
this._config.waitBeforeScreenshots = waitBeforeScreenshots;
|
|
990
1040
|
}
|
|
991
|
-
|
|
992
|
-
return this.
|
|
1041
|
+
getWaitBeforeScreenshots() {
|
|
1042
|
+
return this.waitBeforeScreenshots;
|
|
993
1043
|
}
|
|
994
|
-
|
|
995
|
-
this.
|
|
1044
|
+
setWaitBeforeScreenshots(waitBeforeScreenshots) {
|
|
1045
|
+
this.waitBeforeScreenshots = waitBeforeScreenshots;
|
|
996
1046
|
return this;
|
|
997
1047
|
}
|
|
998
1048
|
/** @internal */
|
|
@@ -1055,6 +1105,7 @@ class ConfigurationData {
|
|
|
1055
1105
|
? this.debugScreenshots
|
|
1056
1106
|
: undefined,
|
|
1057
1107
|
captureStatusBar: this.captureStatusBar,
|
|
1108
|
+
mobileOptions: this.mobileOptions,
|
|
1058
1109
|
}),
|
|
1059
1110
|
check: utils.general.removeUndefinedProps({
|
|
1060
1111
|
environments: (_b = this.browsersInfo) === null || _b === void 0 ? void 0 : _b.map(browserInfo => {
|