@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.
@@ -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
- /** @undocumented */
66
- get debugScreenshots() {
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 viewportSize(viewportSize) {
188
- this._config.viewportSize = viewportSize;
69
+ set accessibilityValidation(accessibilityValidation) {
70
+ if (!this.defaultMatchSettings)
71
+ this.defaultMatchSettings = {};
72
+ this.defaultMatchSettings.accessibilitySettings = accessibilityValidation;
189
73
  }
190
- getViewportSize() {
191
- return this.viewportSize && new RectangleSize_1.RectangleSizeData(this.viewportSize);
74
+ getAccessibilityValidation() {
75
+ return this.accessibilityValidation;
192
76
  }
193
- setViewportSize(viewportSize) {
194
- this.viewportSize = viewportSize;
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 serverUrl() {
227
- return this._config.serverUrl;
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 proxy(proxy) {
245
- this._config.proxy = proxy;
113
+ set appName(appName) {
114
+ utils.guard.isString(appName, { name: 'appName', strict: false });
115
+ this._config.appName = appName;
246
116
  }
247
- getProxy() {
248
- return new ProxySettings_1.ProxySettingsData(this.proxy);
117
+ getAppName() {
118
+ return this.appName;
249
119
  }
250
- setProxy(proxyOrUrlOrIsEnabled, username, password) {
251
- if (proxyOrUrlOrIsEnabled === false) {
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
- /** @undocumented */
276
- get connectionTimeout() {
277
- return this._config.connectionTimeout;
137
+ get baselineBranchName() {
138
+ return this._config.baselineBranchName;
278
139
  }
279
- /** @undocumented */
280
- set connectionTimeout(connectionTimeout) {
281
- utils.guard.isInteger(connectionTimeout, { name: 'connectionTimeout', gte: 0 });
282
- this._config.connectionTimeout = connectionTimeout;
140
+ set baselineBranchName(baselineBranchName) {
141
+ utils.guard.isString(baselineBranchName, { name: 'baselineBranchName' });
142
+ this._config.baselineBranchName = baselineBranchName;
283
143
  }
284
- /** @undocumented */
285
- getConnectionTimeout() {
286
- return this.connectionTimeout;
144
+ getBaselineBranchName() {
145
+ var _a;
146
+ return (_a = this.baselineBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BASELINE_BRANCH_NAME');
287
147
  }
288
- /** @undocumented */
289
- setConnectionTimeout(connectionTimeout) {
290
- this.connectionTimeout = connectionTimeout;
148
+ setBaselineBranchName(baselineBranchName) {
149
+ this.baselineBranchName = baselineBranchName;
291
150
  return this;
292
151
  }
293
- /** @undocumented */
294
- get removeSession() {
295
- return this._config.removeSession;
152
+ get baselineEnvName() {
153
+ return this._config.baselineEnvName;
296
154
  }
297
- /** @undocumented */
298
- set removeSession(removeSession) {
299
- utils.guard.isBoolean(removeSession, { name: 'removeSession' });
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
- /** @undocumented */
303
- getRemoveSession() {
304
- return this.removeSession;
159
+ getBaselineEnvName() {
160
+ return this.baselineEnvName;
305
161
  }
306
- /** @undocumented */
307
- setRemoveSession(removeSession) {
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 properties() {
325
- return this._config.properties;
179
+ get branchName() {
180
+ return this._config.branchName;
326
181
  }
327
- set properties(properties) {
328
- utils.guard.isArray(properties, { name: 'properties' });
329
- this._config.properties = properties;
182
+ set branchName(branchName) {
183
+ utils.guard.isString(branchName, { name: 'branchName' });
184
+ this._config.branchName = branchName;
330
185
  }
331
- getProperties() {
332
- var _a, _b;
333
- return (_b = (_a = this.properties) === null || _a === void 0 ? void 0 : _a.map(property => new PropertyData_1.PropertyDataData(property))) !== null && _b !== void 0 ? _b : [];
186
+ getBranchName() {
187
+ var _a;
188
+ return (_a = this.branchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BRANCH');
334
189
  }
335
- setProperties(properties) {
336
- this.properties = properties;
190
+ setBranchName(branchName) {
191
+ this.branchName = branchName;
337
192
  return this;
338
193
  }
339
- addProperty(propOrName, value) {
340
- const property = utils.types.isString(propOrName) ? { name: propOrName, value: value } : propOrName;
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
- clearProperties() {
347
- this.properties = [];
348
- return this;
197
+ set browsersInfo(browsersInfo) {
198
+ utils.guard.isArray(browsersInfo, { name: 'browsersInfo' });
199
+ this._config.browsersInfo = browsersInfo;
349
200
  }
350
- get baselineEnvName() {
351
- return this._config.baselineEnvName;
201
+ getBrowsersInfo() {
202
+ return this.browsersInfo;
352
203
  }
353
- set baselineEnvName(baselineEnvName) {
354
- utils.guard.isString(baselineEnvName, { name: 'baselineEnvName', strict: false });
355
- this._config.baselineEnvName = baselineEnvName ? baselineEnvName.trim() : undefined;
204
+ setBrowsersInfo(browsersInfo) {
205
+ this.browsersInfo = browsersInfo.map(browserInfo => utils.types.has(browserInfo, 'deviceName') ? { chromeEmulationInfo: browserInfo } : browserInfo);
206
+ return this;
356
207
  }
357
- getBaselineEnvName() {
358
- return this.baselineEnvName;
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
- setBaselineEnvName(baselineEnvName) {
361
- this.baselineEnvName = baselineEnvName;
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
- get environmentName() {
365
- return this._config.environmentName;
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
- set environmentName(environmentName) {
368
- utils.guard.isString(environmentName, { name: 'environmentName', strict: false });
369
- this._config.environmentName = environmentName ? environmentName.trim() : undefined;
252
+ addMultiDeviceTarget(deviceName) {
253
+ if (!this.browsersInfo)
254
+ this.browsersInfo = [];
255
+ this.browsersInfo.push({ iosDeviceInfo: { deviceName } });
256
+ return this;
370
257
  }
371
- getEnvironmentName() {
372
- return this.environmentName;
258
+ get captureStatusBar() {
259
+ return this._config.captureStatusBar;
373
260
  }
374
- setEnvironmentName(environmentName) {
375
- this.environmentName = environmentName;
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 branchName() {
379
- return this._config.branchName;
271
+ get compareWithParentBranch() {
272
+ return this._config.compareWithParentBranch;
380
273
  }
381
- set branchName(branchName) {
382
- utils.guard.isString(branchName, { name: 'branchName' });
383
- this._config.branchName = branchName;
274
+ set compareWithParentBranch(compareWithParentBranch) {
275
+ utils.guard.isBoolean(compareWithParentBranch, { name: 'compareWithParentBranch' });
276
+ this._config.compareWithParentBranch = compareWithParentBranch;
384
277
  }
385
- getBranchName() {
386
- var _a;
387
- return (_a = this.branchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BRANCH');
278
+ getCompareWithParentBranch() {
279
+ return this.compareWithParentBranch;
388
280
  }
389
- setBranchName(branchName) {
390
- this.branchName = branchName;
281
+ setCompareWithParentBranch(compareWithParentBranch) {
282
+ this.compareWithParentBranch = compareWithParentBranch;
391
283
  return this;
392
284
  }
393
- get parentBranchName() {
394
- return this._config.parentBranchName;
285
+ /** @undocumented */
286
+ get concurrentSessions() {
287
+ return this._config.concurrentSessions;
395
288
  }
396
- set parentBranchName(parentBranchName) {
397
- utils.guard.isString(parentBranchName, { name: 'parentBranchName' });
398
- this._config.parentBranchName = parentBranchName;
289
+ /** @undocumented */
290
+ set concurrentSessions(concurrentSessions) {
291
+ this._config.concurrentSessions = concurrentSessions;
399
292
  }
400
- getParentBranchName() {
401
- var _a;
402
- return (_a = this.parentBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('PARENT_BRANCH');
293
+ /** @undocumented */
294
+ getConcurrentSessions() {
295
+ return this.concurrentSessions;
403
296
  }
404
- setParentBranchName(parentBranchName) {
405
- this.parentBranchName = parentBranchName;
297
+ /** @undocumented */
298
+ setConcurrentSessions(concurrentSessions) {
299
+ this.concurrentSessions = concurrentSessions;
406
300
  return this;
407
301
  }
408
- get baselineBranchName() {
409
- return this._config.baselineBranchName;
302
+ /** @undocumented */
303
+ get connectionTimeout() {
304
+ return this._config.connectionTimeout;
410
305
  }
411
- set baselineBranchName(baselineBranchName) {
412
- utils.guard.isString(baselineBranchName, { name: 'baselineBranchName' });
413
- this._config.baselineBranchName = baselineBranchName;
306
+ /** @undocumented */
307
+ set connectionTimeout(connectionTimeout) {
308
+ utils.guard.isInteger(connectionTimeout, { name: 'connectionTimeout', gte: 0 });
309
+ this._config.connectionTimeout = connectionTimeout;
414
310
  }
415
- getBaselineBranchName() {
416
- var _a;
417
- return (_a = this.baselineBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('BASELINE_BRANCH_NAME');
311
+ /** @undocumented */
312
+ getConnectionTimeout() {
313
+ return this.connectionTimeout;
418
314
  }
419
- setBaselineBranchName(baselineBranchName) {
420
- this.baselineBranchName = baselineBranchName;
315
+ /** @undocumented */
316
+ setConnectionTimeout(connectionTimeout) {
317
+ this.connectionTimeout = connectionTimeout;
421
318
  return this;
422
319
  }
423
- get gitMergeBaseTimestamp() {
424
- return this._config.gitMergeBaseTimestamp;
320
+ get cut() {
321
+ return this._config.cut;
425
322
  }
426
- set gitMergeBaseTimestamp(gitMergeBaseTimestamp) {
427
- utils.guard.isString(gitMergeBaseTimestamp, { name: 'gitMergeBaseTimestamp' });
428
- this._config.gitMergeBaseTimestamp = gitMergeBaseTimestamp;
323
+ set cut(cut) {
324
+ this._config.cut = cut;
429
325
  }
430
- getGitMergeBaseTimestamp() {
431
- return this.gitMergeBaseTimestamp;
326
+ getCut() {
327
+ return this._config.cut;
432
328
  }
433
- setGitMergeBaseTimestamp(gitMergeBaseTimestamp) {
434
- this.gitMergeBaseTimestamp = gitMergeBaseTimestamp;
329
+ setCut(cut) {
330
+ this.cut = cut;
435
331
  return this;
436
332
  }
437
- get compareWithParentBranch() {
438
- return this._config.compareWithParentBranch;
333
+ /** @undocumented */
334
+ get debugScreenshots() {
335
+ return this._config.debugScreenshots;
439
336
  }
440
- set compareWithParentBranch(compareWithParentBranch) {
441
- utils.guard.isBoolean(compareWithParentBranch, { name: 'compareWithParentBranch' });
442
- this._config.compareWithParentBranch = compareWithParentBranch;
337
+ /** @undocumented */
338
+ set debugScreenshots(debugScreenshots) {
339
+ this._config.debugScreenshots = debugScreenshots;
443
340
  }
444
- getCompareWithParentBranch() {
445
- return this.compareWithParentBranch;
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
- setCompareWithParentBranch(compareWithParentBranch) {
448
- this.compareWithParentBranch = compareWithParentBranch;
346
+ /** @undocumented */
347
+ setSaveDebugScreenshots(save) {
348
+ this.debugScreenshots = { ...this.debugScreenshots, save };
449
349
  return this;
450
350
  }
451
- get ignoreGitMergeBase() {
452
- return this._config.ignoreGitMergeBase;
351
+ /** @undocumented */
352
+ getDebugScreenshotsPath() {
353
+ return this.debugScreenshots.path;
453
354
  }
454
- set ignoreGitMergeBase(ignoreGitMergeBase) {
455
- utils.guard.isBoolean(ignoreGitMergeBase, { name: 'ignoreGitMergeBase' });
456
- this._config.ignoreGitMergeBase = ignoreGitMergeBase;
355
+ /** @undocumented */
356
+ setDebugScreenshotsPath(path) {
357
+ this.debugScreenshots = { ...this.debugScreenshots, path };
358
+ return this;
457
359
  }
458
- getIgnoreGitMergeBase() {
459
- return this.ignoreGitMergeBase;
360
+ /** @undocumented */
361
+ getDebugScreenshotsPrefix() {
362
+ return this.debugScreenshots.prefix;
460
363
  }
461
- setIgnoreGitMergeBase(ignoreGitMergeBase) {
462
- this.ignoreGitMergeBase = ignoreGitMergeBase;
364
+ /** @undocumented */
365
+ setDebugScreenshotsPrefix(prefix) {
366
+ this.debugScreenshots = { ...this.debugScreenshots, prefix };
463
367
  return this;
464
368
  }
465
- get ignoreBaseline() {
466
- return this._config.ignoreBaseline;
369
+ get defaultMatchSettings() {
370
+ return this._config.defaultMatchSettings;
467
371
  }
468
- set ignoreBaseline(ignoreBaseline) {
469
- utils.guard.isBoolean(ignoreBaseline, { name: 'ignoreBaseline' });
470
- this._config.ignoreBaseline = ignoreBaseline;
372
+ set defaultMatchSettings(defaultMatchSettings) {
373
+ utils.guard.notNull(defaultMatchSettings, { name: 'defaultMatchSettings' });
374
+ this._config.defaultMatchSettings = defaultMatchSettings;
471
375
  }
472
- getIgnoreBaseline() {
473
- return this.ignoreBaseline;
376
+ getDefaultMatchSettings() {
377
+ return new ImageMatchSettings_1.ImageMatchSettingsData(this.defaultMatchSettings);
474
378
  }
475
- setIgnoreBaseline(ignoreBaseline) {
476
- this.ignoreBaseline = ignoreBaseline;
379
+ setDefaultMatchSettings(defaultMatchSettings) {
380
+ this.defaultMatchSettings = defaultMatchSettings;
477
381
  return this;
478
382
  }
479
- get saveFailedTests() {
480
- return this._config.saveFailedTests;
383
+ get deviceInfo() {
384
+ return this._config.deviceInfo;
481
385
  }
482
- set saveFailedTests(saveFailedTests) {
483
- utils.guard.isBoolean(saveFailedTests, { name: 'saveFailedTests' });
484
- this._config.saveFailedTests = saveFailedTests;
386
+ set deviceInfo(deviceInfo) {
387
+ this._config.deviceInfo = deviceInfo ? deviceInfo.trim() : undefined;
485
388
  }
486
- getSaveFailedTests() {
487
- return this.saveFailedTests;
389
+ getDeviceInfo() {
390
+ return this.deviceInfo;
488
391
  }
489
- setSaveFailedTests(saveFailedTests) {
490
- this.saveFailedTests = saveFailedTests;
392
+ setDeviceInfo(deviceInfo) {
393
+ this.deviceInfo = deviceInfo;
491
394
  return this;
492
395
  }
493
- get saveNewTests() {
494
- return this._config.saveNewTests;
396
+ get disableBrowserFetching() {
397
+ return this._config.disableBrowserFetching;
495
398
  }
496
- set saveNewTests(saveNewTests) {
497
- utils.guard.isBoolean(saveNewTests, { name: 'saveNewTests' });
498
- this._config.saveNewTests = saveNewTests;
399
+ set disableBrowserFetching(disableBrowserFetching) {
400
+ this._config.disableBrowserFetching = disableBrowserFetching;
499
401
  }
500
- getSaveNewTests() {
501
- return this.saveNewTests;
402
+ getDisableBrowserFetching() {
403
+ return this.disableBrowserFetching;
502
404
  }
503
- setSaveNewTests(saveNewTests) {
504
- this.saveNewTests = saveNewTests;
405
+ setDisableBrowserFetching(disableBrowserFetching) {
406
+ this.disableBrowserFetching = disableBrowserFetching;
505
407
  return this;
506
408
  }
507
- get saveDiffs() {
508
- return this._config.saveDiffs;
409
+ get disableNMLUrlCache() {
410
+ return this._config.disableNMLUrlCache;
509
411
  }
510
- set saveDiffs(saveDiffs) {
511
- utils.guard.isBoolean(saveDiffs, { name: 'saveDiffs' });
512
- this._config.saveDiffs = saveDiffs;
412
+ set disableNMLUrlCache(disableNMLUrlCache) {
413
+ this._config.disableNMLUrlCache = disableNMLUrlCache;
513
414
  }
514
- getSaveDiffs() {
515
- return this.saveDiffs;
415
+ getDisableNMLUrlCache() {
416
+ return this.disableNMLUrlCache;
516
417
  }
517
- setSaveDiffs(saveDiffs) {
518
- this.saveDiffs = saveDiffs;
418
+ setDisableNMLUrlCache(disableNMLUrlCache) {
419
+ this.disableNMLUrlCache = disableNMLUrlCache;
519
420
  return this;
520
421
  }
521
- get sendDom() {
522
- return this._config.sendDom;
422
+ get displayName() {
423
+ return this._config.displayName;
523
424
  }
524
- set sendDom(sendDom) {
525
- utils.guard.isBoolean(sendDom, { name: 'sendDom' });
526
- this._config.sendDom = sendDom;
425
+ set displayName(displayName) {
426
+ utils.guard.isString(displayName, { name: 'displayName', strict: false });
427
+ this._config.displayName = displayName;
527
428
  }
528
- getSendDom() {
529
- return this.sendDom;
429
+ getDisplayName() {
430
+ return this.displayName;
530
431
  }
531
- setSendDom(sendDom) {
532
- this.sendDom = sendDom;
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 hostAppInfo() {
562
- return this._config.hostAppInfo;
660
+ get layoutBreakpoints() {
661
+ return this._config.layoutBreakpoints;
563
662
  }
564
- set hostAppInfo(hostAppInfo) {
565
- this._config.hostAppInfo = hostAppInfo ? hostAppInfo.trim() : undefined;
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
- getHostAppInfo() {
568
- return this.hostAppInfo;
672
+ getLayoutBreakpoints() {
673
+ return this.layoutBreakpoints;
569
674
  }
570
- setHostAppInfo(hostAppInfo) {
571
- this.hostAppInfo = hostAppInfo;
675
+ setLayoutBreakpoints(layoutBreakpoints) {
676
+ this.layoutBreakpoints = layoutBreakpoints;
572
677
  return this;
573
678
  }
574
- get hostOSInfo() {
575
- return this._config.hostOSInfo;
679
+ get matchLevel() {
680
+ return this.defaultMatchSettings.matchLevel;
576
681
  }
577
- set hostOSInfo(hostOSInfo) {
578
- this._config.hostOSInfo = hostOSInfo ? hostOSInfo.trim() : undefined;
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
- getHostOSInfo() {
581
- return this.hostOSInfo;
688
+ getMatchLevel() {
689
+ return this.matchLevel;
582
690
  }
583
- setHostOSInfo(hostOSInfo) {
584
- this.hostOSInfo = hostOSInfo;
691
+ setMatchLevel(matchLevel) {
692
+ this.matchLevel = matchLevel;
585
693
  return this;
586
694
  }
587
- get deviceInfo() {
588
- return this._config.deviceInfo;
695
+ get matchTimeout() {
696
+ return this._config.matchTimeout;
589
697
  }
590
- set deviceInfo(deviceInfo) {
591
- this._config.deviceInfo = deviceInfo ? deviceInfo.trim() : undefined;
698
+ set matchTimeout(matchTimeout) {
699
+ utils.guard.isInteger(matchTimeout, { name: 'matchTimeout' });
700
+ this._config.matchTimeout = matchTimeout;
592
701
  }
593
- getDeviceInfo() {
594
- return this.deviceInfo;
702
+ getMatchTimeout() {
703
+ return this.matchTimeout;
595
704
  }
596
- setDeviceInfo(deviceInfo) {
597
- this.deviceInfo = deviceInfo;
705
+ setMatchTimeout(matchTimeout) {
706
+ this.matchTimeout = matchTimeout;
598
707
  return this;
599
708
  }
600
- get defaultMatchSettings() {
601
- return this._config.defaultMatchSettings;
709
+ get mobileOptions() {
710
+ return this._config.mobileOptions;
602
711
  }
603
- set defaultMatchSettings(defaultMatchSettings) {
604
- utils.guard.notNull(defaultMatchSettings, { name: 'defaultMatchSettings' });
605
- this._config.defaultMatchSettings = defaultMatchSettings;
712
+ set mobileOptions(mobileOptions) {
713
+ this._config.mobileOptions = mobileOptions;
606
714
  }
607
- getDefaultMatchSettings() {
608
- return new ImageMatchSettings_1.ImageMatchSettingsData(this.defaultMatchSettings);
715
+ getMobileOptions() {
716
+ return this.mobileOptions;
609
717
  }
610
- setDefaultMatchSettings(defaultMatchSettings) {
611
- this.defaultMatchSettings = defaultMatchSettings;
718
+ setMobileOptions(mobileOptions) {
719
+ this.mobileOptions = mobileOptions;
612
720
  return this;
613
721
  }
614
- getMatchLevel() {
615
- var _a;
616
- return (_a = this.defaultMatchSettings) === null || _a === void 0 ? void 0 : _a.matchLevel;
722
+ get parentBranchName() {
723
+ return this._config.parentBranchName;
617
724
  }
618
- setMatchLevel(matchLevel) {
619
- if (!this.defaultMatchSettings)
620
- this.defaultMatchSettings = {};
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
- getAccessibilityValidation() {
625
- return this.defaultMatchSettings.accessibilitySettings;
729
+ getParentBranchName() {
730
+ var _a;
731
+ return (_a = this.parentBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('PARENT_BRANCH');
626
732
  }
627
- setAccessibilityValidation(accessibilityValidation) {
628
- if (!this.defaultMatchSettings)
629
- this.defaultMatchSettings = {};
630
- this.defaultMatchSettings.accessibilitySettings = accessibilityValidation;
733
+ setParentBranchName(parentBranchName) {
734
+ this.parentBranchName = parentBranchName;
631
735
  return this;
632
736
  }
633
- getUseDom() {
634
- return this.defaultMatchSettings.useDom;
737
+ get properties() {
738
+ return this._config.properties;
635
739
  }
636
- setUseDom(useDom) {
637
- if (!this.defaultMatchSettings)
638
- this.defaultMatchSettings = {};
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
- getEnablePatterns() {
643
- return this.defaultMatchSettings.enablePatterns;
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
- setEnablePatterns(enablePatterns) {
646
- if (!this.defaultMatchSettings)
647
- this.defaultMatchSettings = {};
648
- this.defaultMatchSettings.enablePatterns = enablePatterns;
748
+ setProperties(properties) {
749
+ this.properties = properties;
649
750
  return this;
650
751
  }
651
- getIgnoreDisplacements() {
652
- return this.defaultMatchSettings.ignoreDisplacements;
653
- }
654
- setIgnoreDisplacements(ignoreDisplacements) {
655
- if (!this.defaultMatchSettings)
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
- getIgnoreCaret() {
661
- return this.defaultMatchSettings.ignoreCaret;
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 forceFullPageScreenshot() {
670
- return this._config.forceFullPageScreenshot;
763
+ get proxy() {
764
+ return this._config.proxy;
671
765
  }
672
- set forceFullPageScreenshot(forceFullPageScreenshot) {
673
- this._config.forceFullPageScreenshot = forceFullPageScreenshot;
766
+ set proxy(proxy) {
767
+ this._config.proxy = proxy;
674
768
  }
675
- getForceFullPageScreenshot() {
676
- return this.forceFullPageScreenshot;
769
+ getProxy() {
770
+ return new ProxySettings_1.ProxySettingsData(this.proxy);
677
771
  }
678
- setForceFullPageScreenshot(forceFullPageScreenshot) {
679
- this.forceFullPageScreenshot = forceFullPageScreenshot;
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
- get waitBeforeScreenshots() {
683
- return this._config.waitBeforeScreenshots;
784
+ /** @undocumented */
785
+ get removeSession() {
786
+ return this._config.removeSession;
684
787
  }
685
- set waitBeforeScreenshots(waitBeforeScreenshots) {
686
- utils.guard.isInteger(waitBeforeScreenshots, { name: 'waitBeforeScreenshots', gt: 0 });
687
- this._config.waitBeforeScreenshots = waitBeforeScreenshots;
788
+ /** @undocumented */
789
+ set removeSession(removeSession) {
790
+ utils.guard.isBoolean(removeSession, { name: 'removeSession' });
791
+ this._config.removeSession = removeSession;
688
792
  }
689
- getWaitBeforeScreenshots() {
690
- return this.waitBeforeScreenshots;
793
+ /** @undocumented */
794
+ getRemoveSession() {
795
+ return this.removeSession;
691
796
  }
692
- setWaitBeforeScreenshots(waitBeforeScreenshots) {
693
- this.waitBeforeScreenshots = waitBeforeScreenshots;
797
+ /** @undocumented */
798
+ setRemoveSession(removeSession) {
799
+ this.removeSession = removeSession;
694
800
  return this;
695
801
  }
696
- get waitBeforeCapture() {
697
- return this._config.waitBeforeCapture;
802
+ get rotation() {
803
+ return this._config.rotation;
698
804
  }
699
- set waitBeforeCapture(waitBeforeCapture) {
700
- utils.guard.isInteger(waitBeforeCapture, { name: 'waitBeforeCapture', gt: 0 });
701
- this._config.waitBeforeCapture = waitBeforeCapture;
805
+ set rotation(rotation) {
806
+ this._config.rotation = rotation;
702
807
  }
703
- getWaitBeforeCapture() {
704
- return this.waitBeforeCapture;
808
+ getRotation() {
809
+ return new ImageRotation_1.ImageRotationData(this.rotation);
705
810
  }
706
- setWaitBeforeCapture(waitBeforeCapture) {
707
- this.waitBeforeCapture = waitBeforeCapture;
811
+ setRotation(rotation) {
812
+ this.rotation = utils.types.isNumber(rotation) ? rotation : rotation.rotation;
708
813
  return this;
709
814
  }
710
- get stitchMode() {
711
- return this._config.stitchMode;
815
+ get saveDiffs() {
816
+ return this._config.saveDiffs;
712
817
  }
713
- set stitchMode(stitchMode) {
714
- utils.guard.isEnumValue(stitchMode, StitchMode_1.StitchModeEnum, { name: 'stitchMode' });
715
- this._config.stitchMode = stitchMode;
818
+ set saveDiffs(saveDiffs) {
819
+ utils.guard.isBoolean(saveDiffs, { name: 'saveDiffs' });
820
+ this._config.saveDiffs = saveDiffs;
716
821
  }
717
- getStitchMode() {
718
- return this.stitchMode;
822
+ getSaveDiffs() {
823
+ return this.saveDiffs;
719
824
  }
720
- setStitchMode(stitchMode) {
721
- this.stitchMode = stitchMode;
825
+ setSaveDiffs(saveDiffs) {
826
+ this.saveDiffs = saveDiffs;
722
827
  return this;
723
828
  }
724
- get hideScrollbars() {
725
- return this._config.hideScrollbars;
829
+ get saveFailedTests() {
830
+ return this._config.saveFailedTests;
726
831
  }
727
- set hideScrollbars(hideScrollbars) {
728
- this._config.hideScrollbars = hideScrollbars;
832
+ set saveFailedTests(saveFailedTests) {
833
+ utils.guard.isBoolean(saveFailedTests, { name: 'saveFailedTests' });
834
+ this._config.saveFailedTests = saveFailedTests;
729
835
  }
730
- getHideScrollbars() {
731
- return this.hideScrollbars;
836
+ getSaveFailedTests() {
837
+ return this.saveFailedTests;
732
838
  }
733
- setHideScrollbars(hideScrollbars) {
734
- this.hideScrollbars = hideScrollbars;
839
+ setSaveFailedTests(saveFailedTests) {
840
+ this.saveFailedTests = saveFailedTests;
735
841
  return this;
736
842
  }
737
- get hideCaret() {
738
- return this._config.hideCaret;
843
+ get saveNewTests() {
844
+ return this._config.saveNewTests;
739
845
  }
740
- set hideCaret(hideCaret) {
741
- this._config.hideCaret = hideCaret;
846
+ set saveNewTests(saveNewTests) {
847
+ utils.guard.isBoolean(saveNewTests, { name: 'saveNewTests' });
848
+ this._config.saveNewTests = saveNewTests;
742
849
  }
743
- getHideCaret() {
744
- return this.hideCaret;
850
+ getSaveNewTests() {
851
+ return this.saveNewTests;
745
852
  }
746
- setHideCaret(hideCaret) {
747
- this.hideCaret = hideCaret;
853
+ setSaveNewTests(saveNewTests) {
854
+ this.saveNewTests = saveNewTests;
748
855
  return this;
749
856
  }
750
- get stitchOverlap() {
751
- return this._config.stitchOverlap;
857
+ get scaleRatio() {
858
+ return this._config.scaleRatio;
752
859
  }
753
- set stitchOverlap(stitchOverlap) {
754
- utils.guard.isInteger(stitchOverlap, { name: 'stitchOverlap', strict: false });
755
- this._config.stitchOverlap = stitchOverlap;
860
+ set scaleRatio(scaleRatio) {
861
+ utils.guard.isNumber(scaleRatio, { name: 'scaleRatio', strict: false });
862
+ this._config.scaleRatio = scaleRatio;
756
863
  }
757
- getStitchOverlap() {
758
- return this.stitchOverlap;
864
+ getScaleRatio() {
865
+ return this.scaleRatio;
759
866
  }
760
- setStitchOverlap(stitchOverlap) {
761
- this.stitchOverlap = stitchOverlap;
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 cut() {
783
- return this._config.cut;
889
+ get sendDom() {
890
+ return this._config.sendDom;
784
891
  }
785
- set cut(cut) {
786
- this._config.cut = cut;
892
+ set sendDom(sendDom) {
893
+ utils.guard.isBoolean(sendDom, { name: 'sendDom' });
894
+ this._config.sendDom = sendDom;
787
895
  }
788
- getCut() {
789
- return this._config.cut;
896
+ getSendDom() {
897
+ return this.sendDom;
790
898
  }
791
- setCut(cut) {
792
- this.cut = cut;
899
+ setSendDom(sendDom) {
900
+ this.sendDom = sendDom;
793
901
  return this;
794
902
  }
795
- get rotation() {
796
- return this._config.rotation;
903
+ get serverUrl() {
904
+ return this._config.serverUrl;
797
905
  }
798
- set rotation(rotation) {
799
- this._config.rotation = rotation;
906
+ set serverUrl(serverUrl) {
907
+ utils.guard.isString(serverUrl, { name: 'serverUrl', strict: false });
908
+ this._config.serverUrl = serverUrl;
800
909
  }
801
- getRotation() {
802
- return new ImageRotation_1.ImageRotationData(this.rotation);
910
+ getServerUrl() {
911
+ var _a;
912
+ return (_a = this.serverUrl) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('SERVER_URL');
803
913
  }
804
- setRotation(rotation) {
805
- this.rotation = utils.types.isNumber(rotation) ? rotation : rotation.rotation;
914
+ setServerUrl(serverUrl) {
915
+ this.serverUrl = serverUrl;
806
916
  return this;
807
917
  }
808
- get scaleRatio() {
809
- return this._config.scaleRatio;
918
+ get sessionType() {
919
+ return this._config.sessionType;
810
920
  }
811
- set scaleRatio(scaleRatio) {
812
- utils.guard.isNumber(scaleRatio, { name: 'scaleRatio', strict: false });
813
- this._config.scaleRatio = scaleRatio;
921
+ set sessionType(sessionType) {
922
+ this._config.sessionType = sessionType;
814
923
  }
815
- getScaleRatio() {
816
- return this.scaleRatio;
924
+ getSessionType() {
925
+ return this.sessionType;
817
926
  }
818
- setScaleRatio(scaleRatio) {
819
- this.scaleRatio = scaleRatio;
927
+ setSessionType(sessionType) {
928
+ this.sessionType = sessionType;
820
929
  return this;
821
930
  }
822
- /** @undocumented */
823
- get concurrentSessions() {
824
- return this._config.concurrentSessions;
931
+ get stitchMode() {
932
+ return this._config.stitchMode;
825
933
  }
826
- /** @undocumented */
827
- set concurrentSessions(concurrentSessions) {
828
- this._config.concurrentSessions = concurrentSessions;
934
+ set stitchMode(stitchMode) {
935
+ utils.guard.isEnumValue(stitchMode, StitchMode_1.StitchModeEnum, { name: 'stitchMode' });
936
+ this._config.stitchMode = stitchMode;
829
937
  }
830
- /** @undocumented */
831
- getConcurrentSessions() {
832
- return this.concurrentSessions;
938
+ getStitchMode() {
939
+ return this.stitchMode;
833
940
  }
834
- /** @undocumented */
835
- setConcurrentSessions(concurrentSessions) {
836
- this.concurrentSessions = concurrentSessions;
941
+ setStitchMode(stitchMode) {
942
+ this.stitchMode = stitchMode;
837
943
  return this;
838
944
  }
839
- get browsersInfo() {
840
- return this._config.browsersInfo;
945
+ get stitchOverlap() {
946
+ return this._config.stitchOverlap;
841
947
  }
842
- set browsersInfo(browsersInfo) {
843
- utils.guard.isArray(browsersInfo, { name: 'browsersInfo' });
844
- this._config.browsersInfo = browsersInfo;
948
+ set stitchOverlap(stitchOverlap) {
949
+ utils.guard.isInteger(stitchOverlap, { name: 'stitchOverlap', strict: false });
950
+ this._config.stitchOverlap = stitchOverlap;
845
951
  }
846
- getBrowsersInfo() {
847
- return this.browsersInfo;
952
+ getStitchOverlap() {
953
+ return this.stitchOverlap;
848
954
  }
849
- setBrowsersInfo(browsersInfo) {
850
- this.browsersInfo = browsersInfo.map(browserInfo => utils.types.has(browserInfo, 'deviceName') ? { chromeEmulationInfo: browserInfo } : browserInfo);
955
+ setStitchOverlap(stitchOverlap) {
956
+ this.stitchOverlap = stitchOverlap;
851
957
  return this;
852
958
  }
853
- addBrowsers(...browsersInfo) {
854
- for (const [index, browserInfo] of browsersInfo.entries()) {
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
- addBrowser(browserInfoOrWidth, height, name = BrowserType_1.BrowserTypeEnum.CHROME) {
863
- if (utils.types.isObject(browserInfoOrWidth))
864
- return this.addBrowsers(browserInfoOrWidth);
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
- addDeviceEmulation(deviceName, screenOrientation = ScreenOrientation_1.ScreenOrientationEnum.PORTRAIT) {
869
- if (!this.browsersInfo)
870
- this.browsersInfo = [];
871
- this.browsersInfo.push({ chromeEmulationInfo: { deviceName, screenOrientation } });
966
+ getTestName() {
967
+ return this.testName;
968
+ }
969
+ setTestName(testName) {
970
+ this.testName = testName;
872
971
  return this;
873
972
  }
874
- addMobileDevice(deviceName, screenOrientation, version) {
875
- if (!this.browsersInfo)
876
- this.browsersInfo = [];
877
- if (utils.types.isEnumValue(deviceName, IosDeviceName_1.IosDeviceNameEnum)) {
878
- this.browsersInfo.push({
879
- iosDeviceInfo: {
880
- deviceName: deviceName,
881
- screenOrientation,
882
- iosVersion: version,
883
- },
884
- });
885
- }
886
- else {
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
- addMultiDeviceTarget(deviceName) {
898
- if (!this.browsersInfo)
899
- this.browsersInfo = [];
900
- this.browsersInfo.push({ iosDeviceInfo: { deviceName } });
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 layoutBreakpoints() {
923
- return this._config.layoutBreakpoints;
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 disableNMLUrlCache(disableNMLUrlCache) {
976
- this._config.disableNMLUrlCache = disableNMLUrlCache;
1023
+ set waitBeforeCapture(waitBeforeCapture) {
1024
+ utils.guard.isInteger(waitBeforeCapture, { name: 'waitBeforeCapture', gt: 0 });
1025
+ this._config.waitBeforeCapture = waitBeforeCapture;
977
1026
  }
978
- getDisableNMLUrlCache() {
979
- return this.disableNMLUrlCache;
1027
+ getWaitBeforeCapture() {
1028
+ return this.waitBeforeCapture;
980
1029
  }
981
- setDisableNMLUrlCache(disableNMLUrlCache) {
982
- this.disableNMLUrlCache = disableNMLUrlCache;
1030
+ setWaitBeforeCapture(waitBeforeCapture) {
1031
+ this.waitBeforeCapture = waitBeforeCapture;
983
1032
  return this;
984
1033
  }
985
- get captureStatusBar() {
986
- return this._config.captureStatusBar;
1034
+ get waitBeforeScreenshots() {
1035
+ return this._config.waitBeforeScreenshots;
987
1036
  }
988
- set captureStatusBar(captureStatusBar) {
989
- this._config.captureStatusBar = captureStatusBar;
1037
+ set waitBeforeScreenshots(waitBeforeScreenshots) {
1038
+ utils.guard.isInteger(waitBeforeScreenshots, { name: 'waitBeforeScreenshots', gt: 0 });
1039
+ this._config.waitBeforeScreenshots = waitBeforeScreenshots;
990
1040
  }
991
- getCaptureStatusBar() {
992
- return this.disableNMLUrlCache;
1041
+ getWaitBeforeScreenshots() {
1042
+ return this.waitBeforeScreenshots;
993
1043
  }
994
- setCaptureStatusBar(captureStatusBar) {
995
- this.captureStatusBar = captureStatusBar;
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 => {