@applitools/eyes 1.26.3 → 1.26.4

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
  }
@@ -558,207 +572,287 @@ class ConfigurationData {
558
572
  this.hostOS = hostOS;
559
573
  return this;
560
574
  }
561
- get hostAppInfo() {
562
- return this._config.hostAppInfo;
575
+ get hostOSInfo() {
576
+ return this._config.hostOSInfo;
563
577
  }
564
- set hostAppInfo(hostAppInfo) {
565
- this._config.hostAppInfo = hostAppInfo ? hostAppInfo.trim() : undefined;
578
+ set hostOSInfo(hostOSInfo) {
579
+ this._config.hostOSInfo = hostOSInfo ? hostOSInfo.trim() : undefined;
566
580
  }
567
- getHostAppInfo() {
568
- return this.hostAppInfo;
581
+ getHostOSInfo() {
582
+ return this.hostOSInfo;
569
583
  }
570
- setHostAppInfo(hostAppInfo) {
571
- this.hostAppInfo = hostAppInfo;
584
+ setHostOSInfo(hostOSInfo) {
585
+ this.hostOSInfo = hostOSInfo;
572
586
  return this;
573
587
  }
574
- get hostOSInfo() {
575
- return this._config.hostOSInfo;
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;
576
634
  }
577
- set hostOSInfo(hostOSInfo) {
578
- this._config.hostOSInfo = hostOSInfo ? hostOSInfo.trim() : undefined;
635
+ set ignoreGitMergeBase(ignoreGitMergeBase) {
636
+ utils.guard.isBoolean(ignoreGitMergeBase, { name: 'ignoreGitMergeBase' });
637
+ this._config.ignoreGitMergeBase = ignoreGitMergeBase;
579
638
  }
580
- getHostOSInfo() {
581
- return this.hostOSInfo;
639
+ getIgnoreGitMergeBase() {
640
+ return this.ignoreGitMergeBase;
582
641
  }
583
- setHostOSInfo(hostOSInfo) {
584
- this.hostOSInfo = hostOSInfo;
642
+ setIgnoreGitMergeBase(ignoreGitMergeBase) {
643
+ this.ignoreGitMergeBase = ignoreGitMergeBase;
585
644
  return this;
586
645
  }
587
- get deviceInfo() {
588
- return this._config.deviceInfo;
646
+ get isDisabled() {
647
+ return this._config.isDisabled;
589
648
  }
590
- set deviceInfo(deviceInfo) {
591
- this._config.deviceInfo = deviceInfo ? deviceInfo.trim() : undefined;
649
+ set isDisabled(isDisabled) {
650
+ utils.guard.isBoolean(isDisabled, { name: 'isDisabled', strict: false });
651
+ this._config.isDisabled = isDisabled;
592
652
  }
593
- getDeviceInfo() {
594
- return this.deviceInfo;
653
+ getIsDisabled() {
654
+ return this.isDisabled;
595
655
  }
596
- setDeviceInfo(deviceInfo) {
597
- this.deviceInfo = deviceInfo;
656
+ setIsDisabled(isDisabled) {
657
+ this.isDisabled = isDisabled;
598
658
  return this;
599
659
  }
600
- get defaultMatchSettings() {
601
- return this._config.defaultMatchSettings;
660
+ get layoutBreakpoints() {
661
+ return this._config.layoutBreakpoints;
602
662
  }
603
- set defaultMatchSettings(defaultMatchSettings) {
604
- utils.guard.notNull(defaultMatchSettings, { name: 'defaultMatchSettings' });
605
- this._config.defaultMatchSettings = defaultMatchSettings;
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
+ }
606
671
  }
607
- getDefaultMatchSettings() {
608
- return new ImageMatchSettings_1.ImageMatchSettingsData(this.defaultMatchSettings);
672
+ getLayoutBreakpoints() {
673
+ return this.layoutBreakpoints;
609
674
  }
610
- setDefaultMatchSettings(defaultMatchSettings) {
611
- this.defaultMatchSettings = defaultMatchSettings;
675
+ setLayoutBreakpoints(layoutBreakpoints) {
676
+ this.layoutBreakpoints = layoutBreakpoints;
612
677
  return this;
613
678
  }
614
- getMatchLevel() {
615
- var _a;
616
- return (_a = this.defaultMatchSettings) === null || _a === void 0 ? void 0 : _a.matchLevel;
679
+ get matchLevel() {
680
+ return this.defaultMatchSettings.matchLevel;
617
681
  }
618
- setMatchLevel(matchLevel) {
682
+ set matchLevel(matchLevel) {
683
+ utils.guard.isEnumValue(matchLevel, MatchLevel_1.MatchLevelEnum, { name: 'matchLevel' });
619
684
  if (!this.defaultMatchSettings)
620
685
  this.defaultMatchSettings = {};
621
686
  this.defaultMatchSettings.matchLevel = matchLevel;
622
- return this;
623
687
  }
624
- getAccessibilityValidation() {
625
- return this.defaultMatchSettings.accessibilitySettings;
688
+ getMatchLevel() {
689
+ return this.matchLevel;
626
690
  }
627
- setAccessibilityValidation(accessibilityValidation) {
628
- if (!this.defaultMatchSettings)
629
- this.defaultMatchSettings = {};
630
- this.defaultMatchSettings.accessibilitySettings = accessibilityValidation;
691
+ setMatchLevel(matchLevel) {
692
+ this.matchLevel = matchLevel;
631
693
  return this;
632
694
  }
633
- getUseDom() {
634
- return this.defaultMatchSettings.useDom;
695
+ get matchTimeout() {
696
+ return this._config.matchTimeout;
635
697
  }
636
- setUseDom(useDom) {
637
- if (!this.defaultMatchSettings)
638
- this.defaultMatchSettings = {};
639
- this.defaultMatchSettings.useDom = useDom;
698
+ set matchTimeout(matchTimeout) {
699
+ utils.guard.isInteger(matchTimeout, { name: 'matchTimeout' });
700
+ this._config.matchTimeout = matchTimeout;
701
+ }
702
+ getMatchTimeout() {
703
+ return this.matchTimeout;
704
+ }
705
+ setMatchTimeout(matchTimeout) {
706
+ this.matchTimeout = matchTimeout;
640
707
  return this;
641
708
  }
642
- getEnablePatterns() {
643
- return this.defaultMatchSettings.enablePatterns;
709
+ get parentBranchName() {
710
+ return this._config.parentBranchName;
644
711
  }
645
- setEnablePatterns(enablePatterns) {
646
- if (!this.defaultMatchSettings)
647
- this.defaultMatchSettings = {};
648
- this.defaultMatchSettings.enablePatterns = enablePatterns;
712
+ set parentBranchName(parentBranchName) {
713
+ utils.guard.isString(parentBranchName, { name: 'parentBranchName' });
714
+ this._config.parentBranchName = parentBranchName;
715
+ }
716
+ getParentBranchName() {
717
+ var _a;
718
+ return (_a = this.parentBranchName) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('PARENT_BRANCH');
719
+ }
720
+ setParentBranchName(parentBranchName) {
721
+ this.parentBranchName = parentBranchName;
649
722
  return this;
650
723
  }
651
- getIgnoreDisplacements() {
652
- return this.defaultMatchSettings.ignoreDisplacements;
724
+ get properties() {
725
+ return this._config.properties;
653
726
  }
654
- setIgnoreDisplacements(ignoreDisplacements) {
655
- if (!this.defaultMatchSettings)
656
- this.defaultMatchSettings = {};
657
- this.defaultMatchSettings.ignoreDisplacements = ignoreDisplacements;
727
+ set properties(properties) {
728
+ utils.guard.isArray(properties, { name: 'properties' });
729
+ this._config.properties = properties;
730
+ }
731
+ getProperties() {
732
+ var _a, _b;
733
+ return (_b = (_a = this.properties) === null || _a === void 0 ? void 0 : _a.map(property => new PropertyData_1.PropertyDataData(property))) !== null && _b !== void 0 ? _b : [];
734
+ }
735
+ setProperties(properties) {
736
+ this.properties = properties;
658
737
  return this;
659
738
  }
660
- getIgnoreCaret() {
661
- return this.defaultMatchSettings.ignoreCaret;
739
+ addProperty(propOrName, value) {
740
+ const property = utils.types.isString(propOrName) ? { name: propOrName, value: value } : propOrName;
741
+ if (!this.properties)
742
+ this.properties = [];
743
+ this.properties.push(property);
744
+ return this;
662
745
  }
663
- setIgnoreCaret(ignoreCaret) {
664
- if (!this.defaultMatchSettings)
665
- this.defaultMatchSettings = {};
666
- this.defaultMatchSettings.ignoreCaret = ignoreCaret;
746
+ clearProperties() {
747
+ this.properties = [];
667
748
  return this;
668
749
  }
669
- get forceFullPageScreenshot() {
670
- return this._config.forceFullPageScreenshot;
750
+ get proxy() {
751
+ return this._config.proxy;
671
752
  }
672
- set forceFullPageScreenshot(forceFullPageScreenshot) {
673
- this._config.forceFullPageScreenshot = forceFullPageScreenshot;
753
+ set proxy(proxy) {
754
+ this._config.proxy = proxy;
674
755
  }
675
- getForceFullPageScreenshot() {
676
- return this.forceFullPageScreenshot;
756
+ getProxy() {
757
+ return new ProxySettings_1.ProxySettingsData(this.proxy);
677
758
  }
678
- setForceFullPageScreenshot(forceFullPageScreenshot) {
679
- this.forceFullPageScreenshot = forceFullPageScreenshot;
759
+ setProxy(proxyOrUrlOrIsEnabled, username, password) {
760
+ if (proxyOrUrlOrIsEnabled === false) {
761
+ this.proxy = undefined;
762
+ }
763
+ else if (utils.types.isString(proxyOrUrlOrIsEnabled)) {
764
+ this.proxy = { url: proxyOrUrlOrIsEnabled, username, password };
765
+ }
766
+ else {
767
+ this.proxy = proxyOrUrlOrIsEnabled;
768
+ }
680
769
  return this;
681
770
  }
682
- get waitBeforeScreenshots() {
683
- return this._config.waitBeforeScreenshots;
771
+ /** @undocumented */
772
+ get removeSession() {
773
+ return this._config.removeSession;
684
774
  }
685
- set waitBeforeScreenshots(waitBeforeScreenshots) {
686
- utils.guard.isInteger(waitBeforeScreenshots, { name: 'waitBeforeScreenshots', gt: 0 });
687
- this._config.waitBeforeScreenshots = waitBeforeScreenshots;
775
+ /** @undocumented */
776
+ set removeSession(removeSession) {
777
+ utils.guard.isBoolean(removeSession, { name: 'removeSession' });
778
+ this._config.removeSession = removeSession;
688
779
  }
689
- getWaitBeforeScreenshots() {
690
- return this.waitBeforeScreenshots;
780
+ /** @undocumented */
781
+ getRemoveSession() {
782
+ return this.removeSession;
691
783
  }
692
- setWaitBeforeScreenshots(waitBeforeScreenshots) {
693
- this.waitBeforeScreenshots = waitBeforeScreenshots;
784
+ /** @undocumented */
785
+ setRemoveSession(removeSession) {
786
+ this.removeSession = removeSession;
694
787
  return this;
695
788
  }
696
- get waitBeforeCapture() {
697
- return this._config.waitBeforeCapture;
789
+ get rotation() {
790
+ return this._config.rotation;
698
791
  }
699
- set waitBeforeCapture(waitBeforeCapture) {
700
- utils.guard.isInteger(waitBeforeCapture, { name: 'waitBeforeCapture', gt: 0 });
701
- this._config.waitBeforeCapture = waitBeforeCapture;
792
+ set rotation(rotation) {
793
+ this._config.rotation = rotation;
702
794
  }
703
- getWaitBeforeCapture() {
704
- return this.waitBeforeCapture;
795
+ getRotation() {
796
+ return new ImageRotation_1.ImageRotationData(this.rotation);
705
797
  }
706
- setWaitBeforeCapture(waitBeforeCapture) {
707
- this.waitBeforeCapture = waitBeforeCapture;
798
+ setRotation(rotation) {
799
+ this.rotation = utils.types.isNumber(rotation) ? rotation : rotation.rotation;
708
800
  return this;
709
801
  }
710
- get stitchMode() {
711
- return this._config.stitchMode;
802
+ get saveDiffs() {
803
+ return this._config.saveDiffs;
712
804
  }
713
- set stitchMode(stitchMode) {
714
- utils.guard.isEnumValue(stitchMode, StitchMode_1.StitchModeEnum, { name: 'stitchMode' });
715
- this._config.stitchMode = stitchMode;
805
+ set saveDiffs(saveDiffs) {
806
+ utils.guard.isBoolean(saveDiffs, { name: 'saveDiffs' });
807
+ this._config.saveDiffs = saveDiffs;
716
808
  }
717
- getStitchMode() {
718
- return this.stitchMode;
809
+ getSaveDiffs() {
810
+ return this.saveDiffs;
719
811
  }
720
- setStitchMode(stitchMode) {
721
- this.stitchMode = stitchMode;
812
+ setSaveDiffs(saveDiffs) {
813
+ this.saveDiffs = saveDiffs;
722
814
  return this;
723
815
  }
724
- get hideScrollbars() {
725
- return this._config.hideScrollbars;
816
+ get saveFailedTests() {
817
+ return this._config.saveFailedTests;
726
818
  }
727
- set hideScrollbars(hideScrollbars) {
728
- this._config.hideScrollbars = hideScrollbars;
819
+ set saveFailedTests(saveFailedTests) {
820
+ utils.guard.isBoolean(saveFailedTests, { name: 'saveFailedTests' });
821
+ this._config.saveFailedTests = saveFailedTests;
729
822
  }
730
- getHideScrollbars() {
731
- return this.hideScrollbars;
823
+ getSaveFailedTests() {
824
+ return this.saveFailedTests;
732
825
  }
733
- setHideScrollbars(hideScrollbars) {
734
- this.hideScrollbars = hideScrollbars;
826
+ setSaveFailedTests(saveFailedTests) {
827
+ this.saveFailedTests = saveFailedTests;
735
828
  return this;
736
829
  }
737
- get hideCaret() {
738
- return this._config.hideCaret;
830
+ get saveNewTests() {
831
+ return this._config.saveNewTests;
739
832
  }
740
- set hideCaret(hideCaret) {
741
- this._config.hideCaret = hideCaret;
833
+ set saveNewTests(saveNewTests) {
834
+ utils.guard.isBoolean(saveNewTests, { name: 'saveNewTests' });
835
+ this._config.saveNewTests = saveNewTests;
742
836
  }
743
- getHideCaret() {
744
- return this.hideCaret;
837
+ getSaveNewTests() {
838
+ return this.saveNewTests;
745
839
  }
746
- setHideCaret(hideCaret) {
747
- this.hideCaret = hideCaret;
840
+ setSaveNewTests(saveNewTests) {
841
+ this.saveNewTests = saveNewTests;
748
842
  return this;
749
843
  }
750
- get stitchOverlap() {
751
- return this._config.stitchOverlap;
844
+ get scaleRatio() {
845
+ return this._config.scaleRatio;
752
846
  }
753
- set stitchOverlap(stitchOverlap) {
754
- utils.guard.isInteger(stitchOverlap, { name: 'stitchOverlap', strict: false });
755
- this._config.stitchOverlap = stitchOverlap;
847
+ set scaleRatio(scaleRatio) {
848
+ utils.guard.isNumber(scaleRatio, { name: 'scaleRatio', strict: false });
849
+ this._config.scaleRatio = scaleRatio;
756
850
  }
757
- getStitchOverlap() {
758
- return this.stitchOverlap;
851
+ getScaleRatio() {
852
+ return this.scaleRatio;
759
853
  }
760
- setStitchOverlap(stitchOverlap) {
761
- this.stitchOverlap = stitchOverlap;
854
+ setScaleRatio(scaleRatio) {
855
+ this.scaleRatio = scaleRatio;
762
856
  return this;
763
857
  }
764
858
  get scrollRootElement() {
@@ -779,125 +873,116 @@ class ConfigurationData {
779
873
  this.scrollRootElement = scrollRootElement;
780
874
  return this;
781
875
  }
782
- get cut() {
783
- return this._config.cut;
876
+ get sendDom() {
877
+ return this._config.sendDom;
784
878
  }
785
- set cut(cut) {
786
- this._config.cut = cut;
879
+ set sendDom(sendDom) {
880
+ utils.guard.isBoolean(sendDom, { name: 'sendDom' });
881
+ this._config.sendDom = sendDom;
787
882
  }
788
- getCut() {
789
- return this._config.cut;
883
+ getSendDom() {
884
+ return this.sendDom;
790
885
  }
791
- setCut(cut) {
792
- this.cut = cut;
886
+ setSendDom(sendDom) {
887
+ this.sendDom = sendDom;
793
888
  return this;
794
889
  }
795
- get rotation() {
796
- return this._config.rotation;
890
+ get serverUrl() {
891
+ return this._config.serverUrl;
797
892
  }
798
- set rotation(rotation) {
799
- this._config.rotation = rotation;
893
+ set serverUrl(serverUrl) {
894
+ utils.guard.isString(serverUrl, { name: 'serverUrl', strict: false });
895
+ this._config.serverUrl = serverUrl;
800
896
  }
801
- getRotation() {
802
- return new ImageRotation_1.ImageRotationData(this.rotation);
897
+ getServerUrl() {
898
+ var _a;
899
+ return (_a = this.serverUrl) !== null && _a !== void 0 ? _a : utils.general.getEnvValue('SERVER_URL');
803
900
  }
804
- setRotation(rotation) {
805
- this.rotation = utils.types.isNumber(rotation) ? rotation : rotation.rotation;
901
+ setServerUrl(serverUrl) {
902
+ this.serverUrl = serverUrl;
806
903
  return this;
807
904
  }
808
- get scaleRatio() {
809
- return this._config.scaleRatio;
905
+ get sessionType() {
906
+ return this._config.sessionType;
810
907
  }
811
- set scaleRatio(scaleRatio) {
812
- utils.guard.isNumber(scaleRatio, { name: 'scaleRatio', strict: false });
813
- this._config.scaleRatio = scaleRatio;
908
+ set sessionType(sessionType) {
909
+ this._config.sessionType = sessionType;
814
910
  }
815
- getScaleRatio() {
816
- return this.scaleRatio;
911
+ getSessionType() {
912
+ return this.sessionType;
817
913
  }
818
- setScaleRatio(scaleRatio) {
819
- this.scaleRatio = scaleRatio;
914
+ setSessionType(sessionType) {
915
+ this.sessionType = sessionType;
820
916
  return this;
821
917
  }
822
- /** @undocumented */
823
- get concurrentSessions() {
824
- return this._config.concurrentSessions;
918
+ get stitchMode() {
919
+ return this._config.stitchMode;
825
920
  }
826
- /** @undocumented */
827
- set concurrentSessions(concurrentSessions) {
828
- this._config.concurrentSessions = concurrentSessions;
921
+ set stitchMode(stitchMode) {
922
+ utils.guard.isEnumValue(stitchMode, StitchMode_1.StitchModeEnum, { name: 'stitchMode' });
923
+ this._config.stitchMode = stitchMode;
829
924
  }
830
- /** @undocumented */
831
- getConcurrentSessions() {
832
- return this.concurrentSessions;
925
+ getStitchMode() {
926
+ return this.stitchMode;
833
927
  }
834
- /** @undocumented */
835
- setConcurrentSessions(concurrentSessions) {
836
- this.concurrentSessions = concurrentSessions;
928
+ setStitchMode(stitchMode) {
929
+ this.stitchMode = stitchMode;
837
930
  return this;
838
931
  }
839
- get browsersInfo() {
840
- return this._config.browsersInfo;
932
+ get stitchOverlap() {
933
+ return this._config.stitchOverlap;
841
934
  }
842
- set browsersInfo(browsersInfo) {
843
- utils.guard.isArray(browsersInfo, { name: 'browsersInfo' });
844
- this._config.browsersInfo = browsersInfo;
935
+ set stitchOverlap(stitchOverlap) {
936
+ utils.guard.isInteger(stitchOverlap, { name: 'stitchOverlap', strict: false });
937
+ this._config.stitchOverlap = stitchOverlap;
845
938
  }
846
- getBrowsersInfo() {
847
- return this.browsersInfo;
939
+ getStitchOverlap() {
940
+ return this.stitchOverlap;
848
941
  }
849
- setBrowsersInfo(browsersInfo) {
850
- this.browsersInfo = browsersInfo.map(browserInfo => utils.types.has(browserInfo, 'deviceName') ? { chromeEmulationInfo: browserInfo } : browserInfo);
942
+ setStitchOverlap(stitchOverlap) {
943
+ this.stitchOverlap = stitchOverlap;
851
944
  return this;
852
945
  }
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;
946
+ get testName() {
947
+ return this._config.testName;
861
948
  }
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 });
949
+ set testName(testName) {
950
+ utils.guard.isString(testName, { name: 'testName', strict: false });
951
+ this._config.testName = testName;
867
952
  }
868
- addDeviceEmulation(deviceName, screenOrientation = ScreenOrientation_1.ScreenOrientationEnum.PORTRAIT) {
869
- if (!this.browsersInfo)
870
- this.browsersInfo = [];
871
- this.browsersInfo.push({ chromeEmulationInfo: { deviceName, screenOrientation } });
953
+ getTestName() {
954
+ return this.testName;
955
+ }
956
+ setTestName(testName) {
957
+ this.testName = testName;
872
958
  return this;
873
959
  }
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
- }
960
+ get useDom() {
961
+ return this.defaultMatchSettings.useDom;
962
+ }
963
+ set useDom(useDom) {
964
+ if (!this.defaultMatchSettings)
965
+ this.defaultMatchSettings = {};
966
+ this.defaultMatchSettings.useDom = useDom;
967
+ }
968
+ getUseDom() {
969
+ return this.useDom;
970
+ }
971
+ setUseDom(useDom) {
972
+ this.useDom = useDom;
895
973
  return this;
896
974
  }
897
- addMultiDeviceTarget(deviceName) {
898
- if (!this.browsersInfo)
899
- this.browsersInfo = [];
900
- this.browsersInfo.push({ iosDeviceInfo: { deviceName } });
975
+ get viewportSize() {
976
+ return this._config.viewportSize;
977
+ }
978
+ set viewportSize(viewportSize) {
979
+ this._config.viewportSize = viewportSize;
980
+ }
981
+ getViewportSize() {
982
+ return this.viewportSize && new RectangleSize_1.RectangleSizeData(this.viewportSize);
983
+ }
984
+ setViewportSize(viewportSize) {
985
+ this.viewportSize = viewportSize;
901
986
  return this;
902
987
  }
903
988
  get visualGridOptions() {
@@ -919,80 +1004,32 @@ class ConfigurationData {
919
1004
  this.visualGridOptions[key] = value;
920
1005
  return this;
921
1006
  }
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;
1007
+ get waitBeforeCapture() {
1008
+ return this._config.waitBeforeCapture;
974
1009
  }
975
- set disableNMLUrlCache(disableNMLUrlCache) {
976
- this._config.disableNMLUrlCache = disableNMLUrlCache;
1010
+ set waitBeforeCapture(waitBeforeCapture) {
1011
+ utils.guard.isInteger(waitBeforeCapture, { name: 'waitBeforeCapture', gt: 0 });
1012
+ this._config.waitBeforeCapture = waitBeforeCapture;
977
1013
  }
978
- getDisableNMLUrlCache() {
979
- return this.disableNMLUrlCache;
1014
+ getWaitBeforeCapture() {
1015
+ return this.waitBeforeCapture;
980
1016
  }
981
- setDisableNMLUrlCache(disableNMLUrlCache) {
982
- this.disableNMLUrlCache = disableNMLUrlCache;
1017
+ setWaitBeforeCapture(waitBeforeCapture) {
1018
+ this.waitBeforeCapture = waitBeforeCapture;
983
1019
  return this;
984
1020
  }
985
- get captureStatusBar() {
986
- return this._config.captureStatusBar;
1021
+ get waitBeforeScreenshots() {
1022
+ return this._config.waitBeforeScreenshots;
987
1023
  }
988
- set captureStatusBar(captureStatusBar) {
989
- this._config.captureStatusBar = captureStatusBar;
1024
+ set waitBeforeScreenshots(waitBeforeScreenshots) {
1025
+ utils.guard.isInteger(waitBeforeScreenshots, { name: 'waitBeforeScreenshots', gt: 0 });
1026
+ this._config.waitBeforeScreenshots = waitBeforeScreenshots;
990
1027
  }
991
- getCaptureStatusBar() {
992
- return this.disableNMLUrlCache;
1028
+ getWaitBeforeScreenshots() {
1029
+ return this.waitBeforeScreenshots;
993
1030
  }
994
- setCaptureStatusBar(captureStatusBar) {
995
- this.captureStatusBar = captureStatusBar;
1031
+ setWaitBeforeScreenshots(waitBeforeScreenshots) {
1032
+ this.waitBeforeScreenshots = waitBeforeScreenshots;
996
1033
  return this;
997
1034
  }
998
1035
  /** @internal */