@applitools/eyes-testcafe 1.15.4 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  ## Unreleased
4
4
 
5
5
 
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+ ## 1.16.1 - 2022/5/19
14
+
15
+ ### Features
16
+ - Support Galaxy S22 `DeviceName.Galaxy_S22` emulation device
17
+ ### Bug fixes
18
+ - Fixed the error with importing `testcafe` module
19
+
20
+ ## 1.16.0 - 2022/5/17
21
+
22
+ ### Features
23
+ - Support UFG for native mobile
24
+ - `runner.getAllTestResults` returns the corresponding UFG browser/device configuration for each test. This is available as `runner.getAllTestResults()[i].browserInfo`.
25
+ - Support `failTestcafeOnDiff` as environment variable `APPLITOOLS_FAIL_TESTCAFE_ON_DIFF`
26
+ - Support iPhone SE `IosDeviceName.iPhone_SE` and iPhone 8 Plus `IosDeviceName.iPhone_8_Plus` iOS devices
27
+ ### Bug fixes
28
+ - `runner.getAllTestResults` now aborts unclosed tests
29
+ - `runner.getAllTestResults` now returns all results, including aborted tests
30
+ - `extractText` now supports regions that don't use hints while using `x`/`y` coordinates
31
+ - Support data urls in iframes
32
+
33
+ ## 1.15.5 - 2022/2/22
34
+
35
+ - add support for configuring notifyOnCompletion through an environment variable ([Trello](https://trello.com/c/WWdwQvpv))
36
+ - updated to @applitools/eyes-sdk-core@13.0.6 (from 13.0.5)
37
+ - updated to @applitools/visual-grid-client@15.9.0 (from 15.8.65)
38
+
6
39
  ## 1.15.4 - 2022/2/16
7
40
 
8
41
  - fixing: Screenshotter dependency consuming 40+ MB of space
package/dist/legacy.js CHANGED
@@ -21,12 +21,11 @@ const eyes_sdk_core_1 = require("@applitools/eyes-sdk-core");
21
21
  function LegacyTestCafeEyesMixin(Eyes) {
22
22
  return class TestCafeEyes extends Eyes {
23
23
  constructor(runnerOrConfigOrOptions, configOrRunner) {
24
- var _a, _b, _c, _d;
24
+ var _a, _b, _c;
25
25
  if (utils.types.isNull(runnerOrConfigOrOptions) || utils.types.has(runnerOrConfigOrOptions, 'configPath')) {
26
26
  const testcafeConfig = eyes_sdk_core_1.ConfigUtils.getConfig({ configPath: runnerOrConfigOrOptions === null || runnerOrConfigOrOptions === void 0 ? void 0 : runnerOrConfigOrOptions.configPath });
27
27
  const runner = (_a = runnerOrConfigOrOptions === null || runnerOrConfigOrOptions === void 0 ? void 0 : runnerOrConfigOrOptions.runner) !== null && _a !== void 0 ? _a : new api.VisualGridRunner({ testConcurrency: (_c = (_b = testcafeConfig.concurrency) !== null && _b !== void 0 ? _b : testcafeConfig.testConcurrency) !== null && _c !== void 0 ? _c : 1 });
28
28
  super(runner, transformConfig(testcafeConfig));
29
- (_d = testcafeConfig.failTestcafeOnDiff) !== null && _d !== void 0 ? _d : (testcafeConfig.failTestcafeOnDiff = true);
30
29
  this._testcafeConfig = testcafeConfig;
31
30
  }
32
31
  else {
@@ -59,13 +58,12 @@ function LegacyTestCafeEyesMixin(Eyes) {
59
58
  return super.checkWindow(nameOrSetting, timeout, fully);
60
59
  }
61
60
  async close(throwErr = true) {
62
- var _a;
63
- return super.close(throwErr && Boolean((_a = this._testcafeConfig) === null || _a === void 0 ? void 0 : _a.failTestcafeOnDiff));
61
+ return super.close(throwErr && getFailTestcafeOnDiff(this._testcafeConfig));
64
62
  }
65
63
  async waitForResults(throwErr = true) {
66
- var _a, _b;
67
- const resultsSummary = await this.runner.getAllTestResults(throwErr && Boolean((_a = this._testcafeConfig) === null || _a === void 0 ? void 0 : _a.failTestcafeOnDiff));
68
- if ((_b = this._testcafeConfig) === null || _b === void 0 ? void 0 : _b.tapDirPath) {
64
+ var _a;
65
+ const resultsSummary = await this.runner.getAllTestResults(throwErr && getFailTestcafeOnDiff(this._testcafeConfig));
66
+ if ((_a = this._testcafeConfig) === null || _a === void 0 ? void 0 : _a.tapDirPath) {
69
67
  const results = resultsSummary.getAllResults().map(r => r.getTestResults());
70
68
  const includeSubTests = false;
71
69
  const markNewAsPassed = true;
@@ -77,6 +75,15 @@ function LegacyTestCafeEyesMixin(Eyes) {
77
75
  };
78
76
  }
79
77
  exports.LegacyTestCafeEyesMixin = LegacyTestCafeEyesMixin;
78
+ function getFailTestcafeOnDiff(_testcafeConfig) {
79
+ if (utils.general.isDefined(process.env.APPLITOOLS_FAIL_TESTCAFE_ON_DIFF)) {
80
+ return String(process.env.APPLITOOLS_FAIL_TESTCAFE_ON_DIFF).toLowerCase() === 'true';
81
+ }
82
+ if (_testcafeConfig && utils.general.isDefined(_testcafeConfig.failTestcafeOnDiff)) {
83
+ return String(_testcafeConfig.failTestcafeOnDiff).toLowerCase() === 'true';
84
+ }
85
+ return true;
86
+ }
80
87
  function transformConfig(options) {
81
88
  const config = Object.assign({}, options);
82
89
  if (options.concurrency)
@@ -85,8 +92,15 @@ function transformConfig(options) {
85
92
  config.environmentName = options.envName;
86
93
  if (options.browser)
87
94
  config.browsersInfo = utils.types.isArray(options.browser) ? options.browser : [options.browser];
88
- if (options.batchId || options.batchName || options.notifyOnCompletion) {
89
- config.batch = { id: options.batchId, name: options.batchName, notifyOnCompletion: options.notifyOnCompletion };
95
+ if (options.batchId ||
96
+ options.batchName ||
97
+ options.notifyOnCompletion ||
98
+ process.env.APPLITOOLS_NOTIFY_ON_COMPLETION) {
99
+ config.batch = {
100
+ id: options.batchId,
101
+ name: options.batchName,
102
+ notifyOnCompletion: options.notifyOnCompletion || !!process.env.APPLITOOLS_NOTIFY_ON_COMPLETION,
103
+ };
90
104
  }
91
105
  if (options.matchLevel || options.ignoreCaret || options.ignoreDisplacements || options.accessibilityValidation) {
92
106
  config.defaultMatchSettings = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-testcafe",
3
- "version": "1.15.4",
3
+ "version": "1.16.1",
4
4
  "description": "Applitools Eyes SDK for TestCafe",
5
5
  "keywords": [
6
6
  "eyes-testcafe",
@@ -59,8 +59,8 @@
59
59
  "deps": "bongo deps",
60
60
  "gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='testcafe' -f links='eyes-sdk-core eyes-api types test-utils utils driver snippets screenshoter sdk-shared visual-grid-client' -f linking-depth=3",
61
61
  "gh:publish": "gh workflow run publish-testcafe.yml --ref $(git rev-parse --abbrev-ref HEAD)",
62
- "preversion": "yarn deps && bongo preversion && yarn build",
63
- "version": "bongo version",
62
+ "preversion": "yarn deps && bongo preversion --verifyPendingChanges && yarn build",
63
+ "version": "bongo version --withPendingChanges",
64
64
  "postversion": "bongo postversion"
65
65
  },
66
66
  "husky": {
@@ -69,19 +69,20 @@
69
69
  }
70
70
  },
71
71
  "dependencies": {
72
- "@applitools/eyes-api": "1.1.8",
73
- "@applitools/eyes-sdk-core": "13.0.5",
74
- "@applitools/utils": "1.2.13",
75
- "@applitools/visual-grid-client": "15.8.65"
72
+ "@applitools/eyes-api": "1.4.1",
73
+ "@applitools/eyes-sdk-core": "13.6.16",
74
+ "@applitools/utils": "1.3.0",
75
+ "@applitools/visual-grid-client": "15.12.28"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@applitools/api-extractor": "1.2.7",
79
+ "@applitools/bongo": "^2.1.0",
79
80
  "@applitools/scripts": "1.1.0",
80
81
  "@applitools/sdk-coverage-tests": "^2.3.18",
81
- "@applitools/sdk-release-kit": "^0.13.11",
82
82
  "@applitools/sdk-shared": "0.9.11",
83
83
  "@applitools/test-server": "1.0.8",
84
- "@applitools/test-utils": "1.0.12",
84
+ "@applitools/test-utils": "1.3.2",
85
+ "@types/yargs": "^17.0.10",
85
86
  "@typescript-eslint/eslint-plugin": "^4.15.1",
86
87
  "@typescript-eslint/parser": "^4.15.1",
87
88
  "eslint": "^7.9.0",
package/types/index.d.ts CHANGED
@@ -147,6 +147,7 @@ export type ConfigurationPlain = {
147
147
  apiKey?: string;
148
148
  serverUrl?: string;
149
149
  proxy?: ProxySettingsPlain;
150
+ autProxy?: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
150
151
  isDisabled?: boolean;
151
152
  connectionTimeout?: number;
152
153
  removeSession?: boolean;
@@ -257,6 +258,10 @@ export class Configuration implements Required<ConfigurationPlain> {
257
258
  setProxy(proxy: ProxySettingsPlain): Configuration;
258
259
  setProxy(url: string, username?: string, password?: string, isHttpOnly?: boolean): Configuration;
259
260
  setProxy(isEnabled: false): Configuration;
261
+ get autProxy(): { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
262
+ set autProxy(autProxy: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; });
263
+ getAutProxy(): { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
264
+ setAutProxy(autProxy: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; }): Configuration;
260
265
  get connectionTimeout(): number;
261
266
  set connectionTimeout(connectionTimeout: number);
262
267
  getConnectionTimeout(): number;
@@ -468,6 +473,7 @@ export type CheckSettingsPlain = {
468
473
  visualGridOptions?: { [key: string]: any; };
469
474
  hooks?: { beforeCaptureScreenshot: string; };
470
475
  renderId?: string;
476
+ pageId?: string;
471
477
  variationGroupId?: string;
472
478
  timeout?: number;
473
479
  waitBeforeCapture?: number;
@@ -547,6 +553,7 @@ export class CheckSettings {
547
553
  visualGridOption(key: string, value: any): CheckSettings;
548
554
  visualGridOptions(options: { [key: string]: any; }): CheckSettings;
549
555
  renderId(renderId: string): CheckSettings;
556
+ pageId(pageId: string): CheckSettings;
550
557
  variationGroupId(variationGroupId: string): CheckSettings;
551
558
  timeout(timeout: number): CheckSettings;
552
559
  waitBeforeCapture(waitBeforeCapture: number): CheckSettings;
@@ -666,7 +673,7 @@ export enum CorsIframeHandle {
666
673
  KEEP = 'KEEP',
667
674
  SNAPSHOT = 'SNAPSHOT'
668
675
  }
669
- export type DeviceNamePlain = "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5";
676
+ export type DeviceNamePlain = "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5";
670
677
  export enum DeviceName {
671
678
  Blackberry_PlayBook = 'Blackberry PlayBook',
672
679
  BlackBerry_Z30 = 'BlackBerry Z30',
@@ -687,6 +694,7 @@ export enum DeviceName {
687
694
  Galaxy_S10 = 'Galaxy S10',
688
695
  Galaxy_S10_Plus = 'Galaxy S10 Plus',
689
696
  Galaxy_S20 = 'Galaxy S20',
697
+ Galaxy_S22 = 'Galaxy S22',
690
698
  Galaxy_Tab_S7 = 'Galaxy Tab S7',
691
699
  iPad = 'iPad',
692
700
  iPad_6th_Gen = 'iPad 6th Gen',
@@ -737,7 +745,7 @@ export enum FailureReport {
737
745
  IMMEDIATE = 'IMMEDIATE',
738
746
  ON_CLOSE = 'ON_CLOSE'
739
747
  }
740
- export type IosDeviceNamePlain = "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 7" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)";
748
+ export type IosDeviceNamePlain = "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)";
741
749
  export enum IosDeviceName {
742
750
  iPhone_13_Pro_Max = 'iPhone 13 Pro Max',
743
751
  iPhone_13_Pro = 'iPhone 13 Pro',
@@ -753,7 +761,9 @@ export enum IosDeviceName {
753
761
  iPhone_XS = 'iPhone Xs',
754
762
  iPhone_X = 'iPhone X',
755
763
  iPhone_8 = 'iPhone 8',
764
+ iPhone_8_Plus = 'iPhone 8 Plus',
756
765
  iPhone_7 = 'iPhone 7',
766
+ iPhone_SE = 'iPhone SE (1st generation)',
757
767
  iPad_Pro_3 = 'iPad Pro (12.9-inch) (3rd generation)',
758
768
  iPad_7 = 'iPad (7th generation)',
759
769
  iPad_9 = 'iPad (9th generation)',
@@ -1398,15 +1408,71 @@ export class TestResults implements Required<TestResultsPlain> {
1398
1408
  delete(): Promise<void>;
1399
1409
  deleteSession(): Promise<void>;
1400
1410
  }
1401
- export type TestResultContainerPlain = { readonly exception: Error; readonly testResults: TestResultsPlain; };
1411
+ export type TestResultContainerPlain = { readonly exception?: Error; readonly testResults?: {
1412
+ readonly id?: string;
1413
+ readonly name?: string;
1414
+ readonly secretToken?: string;
1415
+ readonly status?: "Passed" | "Failed" | "Unresolved";
1416
+ readonly appName?: string;
1417
+ readonly batchId?: string;
1418
+ readonly batchName?: string;
1419
+ readonly branchName?: string;
1420
+ readonly hostOS?: string;
1421
+ readonly hostApp?: string;
1422
+ readonly hostDisplaySize?: { width: number; height: number; };
1423
+ readonly accessibilityStatus?: { readonly level: "AA" | "AAA"; readonly version: "WCAG_2_0" | "WCAG_2_1"; readonly status: "Passed" | "Failed"; };
1424
+ readonly startedAt?: string | Date;
1425
+ readonly duration?: number;
1426
+ readonly isNew?: boolean;
1427
+ readonly isDifferent?: boolean;
1428
+ readonly isAborted?: boolean;
1429
+ readonly appUrls?: { readonly batch?: string; readonly session?: string; };
1430
+ readonly apiUrls?: { readonly batch?: string; readonly session?: string; };
1431
+ readonly stepsInfo?: Array<{
1432
+ readonly name?: string;
1433
+ readonly isDifferent?: boolean;
1434
+ readonly hasBaselineImage?: boolean;
1435
+ readonly hasCurrentImage?: boolean;
1436
+ readonly appUrls?: { readonly step?: string; readonly stepEditor?: string; };
1437
+ readonly apiUrls?: {
1438
+ readonly baselineImage?: string;
1439
+ readonly currentImage?: string;
1440
+ readonly checkpointImage?: string;
1441
+ readonly checkpointImageThumbnail?: string;
1442
+ readonly diffImage?: string;
1443
+ };
1444
+ readonly renderId?: Array<string>;
1445
+ }>;
1446
+ readonly steps?: number;
1447
+ readonly matches?: number;
1448
+ readonly mismatches?: number;
1449
+ readonly missing?: number;
1450
+ readonly exactMatches?: number;
1451
+ readonly strictMatches?: number;
1452
+ readonly contentMatches?: number;
1453
+ readonly layoutMatches?: number;
1454
+ readonly noneMatches?: number;
1455
+ readonly url?: string;
1456
+ }; readonly browserInfo?: { name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5"; screenOrientation?: "portrait" | "landscape"; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "portrait" | "landscape"; }; }; };
1402
1457
  export class TestResultContainer implements Required<TestResultContainerPlain> {
1403
1458
  get testResults(): TestResultsPlain;
1404
1459
  getTestResults(): TestResults;
1405
1460
  get exception(): Error;
1406
1461
  getException(): Error;
1462
+ get browserInfo(): { name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5"; screenOrientation?: "portrait" | "landscape"; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "portrait" | "landscape"; }; };
1463
+ getBrowserInfo(): { name?: "chrome" | "chrome-one-version-back" | "chrome-two-versions-back" | "firefox" | "firefox-one-version-back" | "firefox-two-versions-back" | "ie" | "ie10" | "edge" | "edgechromium" | "edgelegacy" | "edgechromium-one-version-back" | "edgechromium-two-versions-back" | "safari" | "safari-earlyaccess" | "safari-one-version-back" | "safari-two-versions-back"; width: number; height: number; } | { chromeEmulationInfo: { deviceName: "Blackberry PlayBook" | "BlackBerry Z30" | "Galaxy A5" | "Galaxy Note 10" | "Galaxy Note 10 Plus" | "Galaxy Note 2" | "Galaxy Note 3" | "Galaxy Note 4" | "Galaxy Note 8" | "Galaxy Note 9" | "Galaxy S3" | "Galaxy S5" | "Galaxy S8" | "Galaxy S8 Plus" | "Galaxy S9" | "Galaxy S9 Plus" | "Galaxy S10" | "Galaxy S10 Plus" | "Galaxy S20" | "Galaxy S22" | "Galaxy Tab S7" | "iPad" | "iPad 6th Gen" | "iPad 7th Gen" | "iPad Air 2" | "iPad Mini" | "iPad Pro" | "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone 4" | "iPhone 5/SE" | "iPhone 6/7/8" | "iPhone 6/7/8 Plus" | "iPhone X" | "iPhone XR" | "iPhone XS" | "iPhone XS Max" | "Kindle Fire HDX" | "Laptop with HiDPI screen" | "Laptop with MDPI screen" | "Laptop with touch" | "LG G6" | "LG Optimus L70" | "Microsoft Lumia 550" | "Microsoft Lumia 950" | "Nexus 10" | "Nexus 4" | "Nexus 5" | "Nexus 5X" | "Nexus 6" | "Nexus 6P" | "Nexus 7" | "Nokia Lumia 520" | "Nokia N9" | "OnePlus 7T" | "OnePlus 7T Pro" | "Pixel 2" | "Pixel 2 XL" | "Pixel 3" | "Pixel 3 XL" | "Pixel 4" | "Pixel 4 XL" | "Pixel 5"; screenOrientation?: "portrait" | "landscape"; }; } | { iosDeviceInfo: { deviceName: "iPhone 11" | "iPhone 11 Pro" | "iPhone 11 Pro Max" | "iPhone X" | "iPhone XR" | "iPhone 13 Pro Max" | "iPhone 13 Pro" | "iPhone 13" | "iPhone 12 Pro Max" | "iPhone 12 Pro" | "iPhone 12" | "iPhone 12 mini" | "iPhone Xs" | "iPhone 8" | "iPhone 8 Plus" | "iPhone 7" | "iPhone SE (1st generation)" | "iPad Pro (12.9-inch) (3rd generation)" | "iPad (7th generation)" | "iPad (9th generation)" | "iPad Air (2nd generation)" | "iPad Air (4th generation)"; iosVersion?: "latest" | "latest-1"; screenOrientation?: "portrait" | "landscape"; }; };
1407
1464
  }
1408
- export type TestResultsSummaryPlain = Iterable<TestResultContainerPlain>;
1409
- export class TestResultsSummary implements TestResultsSummaryPlain {
1465
+ export type TestResultsSummaryPlain = {
1466
+ results: Array<TestResultContainerPlain>;
1467
+ passed: number;
1468
+ unresolved: number;
1469
+ failed: number;
1470
+ exceptions: number;
1471
+ mismatches: number;
1472
+ missing: number;
1473
+ matches: number;
1474
+ };
1475
+ export class TestResultsSummary implements Iterable<TestResultContainerPlain> {
1410
1476
  getAllResults(): Array<TestResultContainer>;
1411
1477
  [Symbol.iterator](): Iterator<TestResultContainer, any, undefined>;
1412
1478
  }
@@ -1442,41 +1508,8 @@ export class Logger {
1442
1508
  fatal(...messages: Array<any>): void;
1443
1509
  open(): void;
1444
1510
  close(): void;
1445
- extend(options?: Omit<{
1446
- handler?: CustomLogHandlerPlain | FileLogHandlerPlain | ConsoleLogHandlerPlain | {
1447
- type: "rolling file";
1448
- dirname?: string;
1449
- name?: string;
1450
- maxFileLength?: number;
1451
- maxFileNumber?: number;
1452
- };
1453
- format?: (message: any, options: {
1454
- formatting?: boolean;
1455
- label?: string;
1456
- timestamp?: Date;
1457
- level?: "silent" | "fatal" | "error" | "warn" | "info";
1458
- tags?: Record<string, unknown>;
1459
- color?: string | Array<string>;
1460
- colors?: { timestamp?: string | Array<string>; level?: {
1461
- silent?: string | Array<string>;
1462
- fatal?: string | Array<string>;
1463
- error?: string | Array<string>;
1464
- warn?: string | Array<string>;
1465
- info?: string | Array<string>;
1466
- }; tags?: string | Array<string>; message?: string | Array<string>; };
1467
- }) => string;
1468
- label?: string;
1469
- timestamp?: false;
1470
- level?: number | ("silent" | "fatal" | "error" | "warn" | "info");
1471
- colors?: boolean | { timestamp?: string | Array<string>; level?: {
1472
- silent?: string | Array<string>;
1473
- fatal?: string | Array<string>;
1474
- error?: string | Array<string>;
1475
- warn?: string | Array<string>;
1476
- info?: string | Array<string>;
1477
- }; tags?: string | Array<string>; message?: string | Array<string>; };
1478
- console?: boolean | CustomLogHandlerPlain;
1479
- }, "handler">): Logger;
1511
+ tag(name: string, value: any): void;
1512
+ extend(options?: import('node_modules/@applitools/logger/types/logger.d.ts').ExtendOptions): Logger;
1480
1513
  extend(label?: string): Logger;
1481
1514
  }
1482
1515
  export function closeBatch(spec: { closeBatches(options: { settings: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }; }): Promise<void>; }): (options: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }) => Promise<void>;