@applitools/eyes-selenium 4.58.1 → 4.58.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.
- package/CHANGELOG.md +28 -0
- package/README.md +57 -0
- package/package.json +18 -17
- package/types/index.d.ts +114 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
## 4.58.4 - 2022/4/14
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
- Support UFG for native mobile
|
|
11
|
+
- `runner.getAllTestResults` returns the corresponding UFG browser/device configuration for each test. This is available as `runner.getAllTestResults()[i].browserInfo`.
|
|
12
|
+
### Bug fixes
|
|
13
|
+
- `extractText` now supports regions that don't use hints while using `x`/`y` coordinates
|
|
14
|
+
- accept ios and android lowercase as driver platformName capability when using custom grid
|
|
15
|
+
- when running on a native iOS app, allow capturing NavigationBar and TabBar regions
|
|
16
|
+
- When running a native app on Android, in case we test a device in landscape mode, make sure to account for the navigation bar on the left or right and not at the bottom of the image. Also account for an Appium bug when calculating system bars height.
|
|
17
|
+
- Support data urls in iframes
|
|
18
|
+
|
|
19
|
+
## 4.58.3 - 2022/1/12
|
|
20
|
+
|
|
21
|
+
- fix bugs
|
|
22
|
+
- updated to @applitools/eyes-sdk-core@12.24.12 (from 12.24.3)
|
|
23
|
+
- updated to @applitools/spec-driver-selenium@1.3.1 (from 1.3.0)
|
|
24
|
+
- updated to @applitools/visual-grid-client@15.8.59 (from 15.8.47)
|
|
25
|
+
- updated to @applitools/spec-driver-selenium@1.3.2 (from 1.3.1)
|
|
26
|
+
- updated to @applitools/eyes-sdk-core@12.24.13 (from 12.24.12)
|
|
27
|
+
- updated to @applitools/spec-driver-selenium@1.3.3 (from 1.3.2)
|
|
28
|
+
- updated to @applitools/visual-grid-client@15.8.60 (from 15.8.59)
|
|
29
|
+
|
|
30
|
+
## 4.58.2 - 2021/11/18
|
|
31
|
+
|
|
32
|
+
- updated to @applitools/eyes-sdk-core@12.24.3 (from 12.24.2)
|
|
33
|
+
|
|
6
34
|
## 4.58.1 - 2021/11/18
|
|
7
35
|
|
|
8
36
|
- updated to @applitools/eyes-sdk-core@12.24.2 (from 12.24.0)
|
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
* [Purpose of runners](#purpose-of-runners)
|
|
37
37
|
+ [1. Use the Ultrafast grid](#1-use-the-ultra-fast-grid)
|
|
38
38
|
+ [2. Manage tests across multiple `Eyes` instances](#2-manage-tests-across-multiple-eyes-instances)
|
|
39
|
+
- [Visual locators](#visual-locators)
|
|
39
40
|
- [Recipes for common tasks](#recipes-for-common-tasks)
|
|
40
41
|
* [Configure Server URL](#configure-server-url)
|
|
41
42
|
* [Configure Proxy](#configure-proxy)
|
|
@@ -536,6 +537,62 @@ concurrent sessions ???
|
|
|
536
537
|
add browsers
|
|
537
538
|
-->
|
|
538
539
|
|
|
540
|
+
## Visual locators
|
|
541
|
+
|
|
542
|
+
Information about what are visual locators and how to use them can be found in the documentation page [here](https://applitools.com/docs/features/visual-locators.html).
|
|
543
|
+
|
|
544
|
+
The API to locate a visual locator in Eyes-Selenium has the following TypeScript signature:
|
|
545
|
+
|
|
546
|
+
```ts
|
|
547
|
+
// Note: This is a formal TypeScript definition.
|
|
548
|
+
// The reason we use the generic type TLocator here is that is shows how the return value of eyes.locate is an object
|
|
549
|
+
// with the same keys as the array of locatorNames in the input to eyes.locate.
|
|
550
|
+
// We explain this in more detail in the example below.
|
|
551
|
+
|
|
552
|
+
interface Eyes {
|
|
553
|
+
locate<TLocator extends string>(settings: VisualLocatorSettings<TLocator>): Promise<Record<TLocator, Array<Region>>>
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
interface VisualLocatorSettings<TLocator extends string> {
|
|
557
|
+
locatorNames: Array<TLocator>;
|
|
558
|
+
firstOnly: boolean;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
interface Region {
|
|
562
|
+
x: number;
|
|
563
|
+
y: number;
|
|
564
|
+
width: number;
|
|
565
|
+
height: number;
|
|
566
|
+
}
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
Here is an example for using this API:
|
|
570
|
+
|
|
571
|
+
```js
|
|
572
|
+
// first need to call eyes.open
|
|
573
|
+
await eyes.open(driver, 'Test app', 'Test visual locators')
|
|
574
|
+
|
|
575
|
+
// example for using eyes.locate
|
|
576
|
+
const regionsMap = await eyes.locate({
|
|
577
|
+
locatorNames: ['locator_a', 'locator_b', 'locator_c'],
|
|
578
|
+
})
|
|
579
|
+
|
|
580
|
+
// now get the coordinates of one of the locators
|
|
581
|
+
const regionsForLocator_A = regionsMap['locator_a']
|
|
582
|
+
|
|
583
|
+
// if region is found, perform press at the middle
|
|
584
|
+
if (regionsForLocator_A && regionsForLocator_A.length > 0) {
|
|
585
|
+
const region = regionsForLocator_A[0]
|
|
586
|
+
const clickLocation = {
|
|
587
|
+
x: region.left + region.width / 2,
|
|
588
|
+
y: region.top + region.height / 2,
|
|
589
|
+
}
|
|
590
|
+
await driver.actions({ bridge: true }).move(clickLocation).click().perform()
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
###
|
|
595
|
+
|
|
539
596
|
## Recipes for common tasks
|
|
540
597
|
|
|
541
598
|
### Configure Server URL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-selenium",
|
|
3
|
-
"version": "4.58.
|
|
3
|
+
"version": "4.58.4",
|
|
4
4
|
"description": "Applitools Eyes SDK for Selenium WebDriver",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-selenium",
|
|
@@ -45,18 +45,19 @@
|
|
|
45
45
|
"scripts": {
|
|
46
46
|
"lint": "eslint '**/*.ts'",
|
|
47
47
|
"build": "ttsc",
|
|
48
|
-
"generate:tests": "coverage-tests generate https://raw.githubusercontent.com/applitools/sdk.coverage.tests/
|
|
48
|
+
"generate:tests": "coverage-tests generate https://raw.githubusercontent.com/applitools/sdk.coverage.tests/universal-sdk/js/config.js --name 'eyes-selenium'",
|
|
49
49
|
"test": "yarn test:coverage",
|
|
50
50
|
"test:coverage": "yarn generate:tests && APPLITOOLS_BATCH_NAME='JS Coverage Tests: eyes-selenium' APPLITOOLS_BATCH_ID=$(uuidgen) XUNIT_FILE=coverage-test-report.xml mocha --config .mocharc.cvg.js",
|
|
51
51
|
"report": "coverage-tests report https://raw.githubusercontent.com/applitools/sdk.coverage.tests/master/js/config.js --name 'eyes-selenium'",
|
|
52
52
|
"setup": "yarn docker:setup",
|
|
53
53
|
"docker:setup": "node ../scripts/scripts/generate-docker-compose-config.js && docker-compose up -d",
|
|
54
54
|
"docker:teardown": "docker-compose down",
|
|
55
|
+
"upgrade:framework": "if [ ! -z $APPLITOOLS_SELENIUM_MAJOR_VERSION ]; then packagejson=`cat package.json`; yarn upgrade --no-lockfile selenium-webdriver@$APPLITOOLS_SELENIUM_MAJOR_VERSION; echo \"$packagejson\" > package.json; fi",
|
|
55
56
|
"deps": "bongo deps",
|
|
56
57
|
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='selenium selenium@3' -f links='types test-utils sdk-shared eyes-sdk-core visual-grid-client eyes-api spec-driver-selenium utils driver snippets screenshoter' -f linking-depth=3",
|
|
57
|
-
"gh:publish": "gh workflow run publish.yml --ref $(git rev-parse --abbrev-ref HEAD)
|
|
58
|
-
"preversion": "bongo preversion && yarn build",
|
|
59
|
-
"version": "bongo version",
|
|
58
|
+
"gh:publish": "gh workflow run publish-selenium.yml --ref $(git rev-parse --abbrev-ref HEAD)",
|
|
59
|
+
"preversion": "bongo preversion --verifyPendingChanges && yarn build",
|
|
60
|
+
"version": "bongo version --withPendingChanges",
|
|
60
61
|
"postversion": "bongo postversion"
|
|
61
62
|
},
|
|
62
63
|
"husky": {
|
|
@@ -65,18 +66,18 @@
|
|
|
65
66
|
}
|
|
66
67
|
},
|
|
67
68
|
"dependencies": {
|
|
68
|
-
"@applitools/eyes-api": "1.
|
|
69
|
-
"@applitools/eyes-sdk-core": "
|
|
70
|
-
"@applitools/spec-driver-selenium": "1.3.
|
|
71
|
-
"@applitools/visual-grid-client": "15.
|
|
69
|
+
"@applitools/eyes-api": "1.2.0",
|
|
70
|
+
"@applitools/eyes-sdk-core": "13.2.6",
|
|
71
|
+
"@applitools/spec-driver-selenium": "1.3.5",
|
|
72
|
+
"@applitools/visual-grid-client": "15.11.3"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|
|
74
|
-
"@applitools/api-extractor": "1.2.
|
|
75
|
-
"@applitools/
|
|
76
|
-
"@applitools/
|
|
77
|
-
"@applitools/sdk-
|
|
78
|
-
"@applitools/sdk-shared": "0.9.
|
|
79
|
-
"@applitools/test-utils": "1.0
|
|
75
|
+
"@applitools/api-extractor": "1.2.7",
|
|
76
|
+
"@applitools/bongo": "^2.0.2",
|
|
77
|
+
"@applitools/scripts": "1.1.0",
|
|
78
|
+
"@applitools/sdk-coverage-tests": "2.3.18",
|
|
79
|
+
"@applitools/sdk-shared": "0.9.11",
|
|
80
|
+
"@applitools/test-utils": "1.3.0",
|
|
80
81
|
"@types/selenium-webdriver": "^4.0.11",
|
|
81
82
|
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
|
82
83
|
"@typescript-eslint/parser": "^4.15.1",
|
|
@@ -89,10 +90,10 @@
|
|
|
89
90
|
"husky": "^4.3.8",
|
|
90
91
|
"mocha": "^9.1.2",
|
|
91
92
|
"prettier": "^2.1.2",
|
|
92
|
-
"selenium-webdriver": "^4.
|
|
93
|
+
"selenium-webdriver": "^4.1.1",
|
|
93
94
|
"spec-xunit-file": "0.0.1-3",
|
|
94
95
|
"ttypescript": "^1.5.12",
|
|
95
|
-
"typescript": "^4.5.
|
|
96
|
+
"typescript": "^4.5.4"
|
|
96
97
|
},
|
|
97
98
|
"peerDependencies": {
|
|
98
99
|
"selenium-webdriver": ">=3.6.0"
|
package/types/index.d.ts
CHANGED
|
@@ -142,6 +142,7 @@ export type ConfigurationPlain = {
|
|
|
142
142
|
apiKey?: string;
|
|
143
143
|
serverUrl?: string;
|
|
144
144
|
proxy?: ProxySettingsPlain;
|
|
145
|
+
autProxy?: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
|
|
145
146
|
isDisabled?: boolean;
|
|
146
147
|
connectionTimeout?: number;
|
|
147
148
|
removeSession?: boolean;
|
|
@@ -166,6 +167,7 @@ export type ConfigurationPlain = {
|
|
|
166
167
|
baselineBranchName?: string;
|
|
167
168
|
compareWithParentBranch?: boolean;
|
|
168
169
|
ignoreBaseline?: boolean;
|
|
170
|
+
ignoreGitMergeBase?: boolean;
|
|
169
171
|
saveFailedTests?: boolean;
|
|
170
172
|
saveNewTests?: boolean;
|
|
171
173
|
saveDiffs?: boolean;
|
|
@@ -251,6 +253,10 @@ export class Configuration implements Required<ConfigurationPlain> {
|
|
|
251
253
|
setProxy(proxy: ProxySettingsPlain): Configuration;
|
|
252
254
|
setProxy(url: string, username?: string, password?: string, isHttpOnly?: boolean): Configuration;
|
|
253
255
|
setProxy(isEnabled: false): Configuration;
|
|
256
|
+
get autProxy(): { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
|
|
257
|
+
set autProxy(autProxy: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; });
|
|
258
|
+
getAutProxy(): { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
|
|
259
|
+
setAutProxy(autProxy: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; }): Configuration;
|
|
254
260
|
get connectionTimeout(): number;
|
|
255
261
|
set connectionTimeout(connectionTimeout: number);
|
|
256
262
|
getConnectionTimeout(): number;
|
|
@@ -298,6 +304,10 @@ export class Configuration implements Required<ConfigurationPlain> {
|
|
|
298
304
|
set compareWithParentBranch(compareWithParentBranch: boolean);
|
|
299
305
|
getCompareWithParentBranch(): boolean;
|
|
300
306
|
setCompareWithParentBranch(compareWithParentBranch: boolean): Configuration;
|
|
307
|
+
get ignoreGitMergeBase(): boolean;
|
|
308
|
+
set ignoreGitMergeBase(ignoreGitMergeBase: boolean);
|
|
309
|
+
getIgnoreGitMergeBase(): boolean;
|
|
310
|
+
setIgnoreGitMergeBase(ignoreGitMergeBase: boolean): Configuration;
|
|
301
311
|
get ignoreBaseline(): boolean;
|
|
302
312
|
set ignoreBaseline(ignoreBaseline: boolean);
|
|
303
313
|
getIgnoreBaseline(): boolean;
|
|
@@ -458,6 +468,7 @@ export type CheckSettingsPlain = {
|
|
|
458
468
|
visualGridOptions?: { [key: string]: any; };
|
|
459
469
|
hooks?: { beforeCaptureScreenshot: string; };
|
|
460
470
|
renderId?: string;
|
|
471
|
+
pageId?: string;
|
|
461
472
|
variationGroupId?: string;
|
|
462
473
|
timeout?: number;
|
|
463
474
|
waitBeforeCapture?: number;
|
|
@@ -537,6 +548,7 @@ export class CheckSettings {
|
|
|
537
548
|
visualGridOption(key: string, value: any): CheckSettings;
|
|
538
549
|
visualGridOptions(options: { [key: string]: any; }): CheckSettings;
|
|
539
550
|
renderId(renderId: string): CheckSettings;
|
|
551
|
+
pageId(pageId: string): CheckSettings;
|
|
540
552
|
variationGroupId(variationGroupId: string): CheckSettings;
|
|
541
553
|
timeout(timeout: number): CheckSettings;
|
|
542
554
|
waitBeforeCapture(waitBeforeCapture: number): CheckSettings;
|
|
@@ -606,7 +618,7 @@ export enum CorsIframeHandle {
|
|
|
606
618
|
KEEP = 'KEEP',
|
|
607
619
|
SNAPSHOT = 'SNAPSHOT'
|
|
608
620
|
}
|
|
609
|
-
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" | "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";
|
|
621
|
+
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";
|
|
610
622
|
export enum DeviceName {
|
|
611
623
|
Blackberry_PlayBook = 'Blackberry PlayBook',
|
|
612
624
|
BlackBerry_Z30 = 'BlackBerry Z30',
|
|
@@ -627,6 +639,7 @@ export enum DeviceName {
|
|
|
627
639
|
Galaxy_S10 = 'Galaxy S10',
|
|
628
640
|
Galaxy_S10_Plus = 'Galaxy S10 Plus',
|
|
629
641
|
Galaxy_S20 = 'Galaxy S20',
|
|
642
|
+
Galaxy_Tab_S7 = 'Galaxy Tab S7',
|
|
630
643
|
iPad = 'iPad',
|
|
631
644
|
iPad_6th_Gen = 'iPad 6th Gen',
|
|
632
645
|
iPad_7th_Gen = 'iPad 7th Gen',
|
|
@@ -676,7 +689,7 @@ export enum FailureReport {
|
|
|
676
689
|
IMMEDIATE = 'IMMEDIATE',
|
|
677
690
|
ON_CLOSE = 'ON_CLOSE'
|
|
678
691
|
}
|
|
679
|
-
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)";
|
|
692
|
+
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)";
|
|
680
693
|
export enum IosDeviceName {
|
|
681
694
|
iPhone_13_Pro_Max = 'iPhone 13 Pro Max',
|
|
682
695
|
iPhone_13_Pro = 'iPhone 13 Pro',
|
|
@@ -696,7 +709,8 @@ export enum IosDeviceName {
|
|
|
696
709
|
iPad_Pro_3 = 'iPad Pro (12.9-inch) (3rd generation)',
|
|
697
710
|
iPad_7 = 'iPad (7th generation)',
|
|
698
711
|
iPad_9 = 'iPad (9th generation)',
|
|
699
|
-
iPad_Air_2 = 'iPad Air (2nd generation)'
|
|
712
|
+
iPad_Air_2 = 'iPad Air (2nd generation)',
|
|
713
|
+
iPad_Air_4 = 'iPad Air (4th generation)'
|
|
700
714
|
}
|
|
701
715
|
export type IosVersionPlain = "latest" | "latest-1";
|
|
702
716
|
export enum IosVersion {
|
|
@@ -810,7 +824,8 @@ export class BatchInfo implements Required<BatchInfoPlain> {
|
|
|
810
824
|
set properties(properties: Array<PropertyDataPlain>);
|
|
811
825
|
getProperties(): Array<PropertyData>;
|
|
812
826
|
setProperties(properties: Array<PropertyDataPlain>): BatchInfo;
|
|
813
|
-
addProperty(
|
|
827
|
+
addProperty(name: string, value: string): BatchInfo;
|
|
828
|
+
addProperty(prop: PropertyDataPlain): BatchInfo;
|
|
814
829
|
}
|
|
815
830
|
export type CutProviderPlain = { top: number; right: number; bottom: number; left: number; } | { x: number; y: number; width: number; height: number; };
|
|
816
831
|
export class CutProvider implements Required<{
|
|
@@ -1335,15 +1350,71 @@ export class TestResults implements Required<TestResultsPlain> {
|
|
|
1335
1350
|
delete(): Promise<void>;
|
|
1336
1351
|
deleteSession(): Promise<void>;
|
|
1337
1352
|
}
|
|
1338
|
-
export type TestResultContainerPlain = { readonly exception
|
|
1353
|
+
export type TestResultContainerPlain = { readonly exception?: Error; readonly testResults?: {
|
|
1354
|
+
readonly id?: string;
|
|
1355
|
+
readonly name?: string;
|
|
1356
|
+
readonly secretToken?: string;
|
|
1357
|
+
readonly status?: "Passed" | "Failed" | "Unresolved";
|
|
1358
|
+
readonly appName?: string;
|
|
1359
|
+
readonly batchId?: string;
|
|
1360
|
+
readonly batchName?: string;
|
|
1361
|
+
readonly branchName?: string;
|
|
1362
|
+
readonly hostOS?: string;
|
|
1363
|
+
readonly hostApp?: string;
|
|
1364
|
+
readonly hostDisplaySize?: { width: number; height: number; };
|
|
1365
|
+
readonly accessibilityStatus?: { readonly level: "AA" | "AAA"; readonly version: "WCAG_2_0" | "WCAG_2_1"; readonly status: "Passed" | "Failed"; };
|
|
1366
|
+
readonly startedAt?: string | Date;
|
|
1367
|
+
readonly duration?: number;
|
|
1368
|
+
readonly isNew?: boolean;
|
|
1369
|
+
readonly isDifferent?: boolean;
|
|
1370
|
+
readonly isAborted?: boolean;
|
|
1371
|
+
readonly appUrls?: { readonly batch?: string; readonly session?: string; };
|
|
1372
|
+
readonly apiUrls?: { readonly batch?: string; readonly session?: string; };
|
|
1373
|
+
readonly stepsInfo?: Array<{
|
|
1374
|
+
readonly name?: string;
|
|
1375
|
+
readonly isDifferent?: boolean;
|
|
1376
|
+
readonly hasBaselineImage?: boolean;
|
|
1377
|
+
readonly hasCurrentImage?: boolean;
|
|
1378
|
+
readonly appUrls?: { readonly step?: string; readonly stepEditor?: string; };
|
|
1379
|
+
readonly apiUrls?: {
|
|
1380
|
+
readonly baselineImage?: string;
|
|
1381
|
+
readonly currentImage?: string;
|
|
1382
|
+
readonly checkpointImage?: string;
|
|
1383
|
+
readonly checkpointImageThumbnail?: string;
|
|
1384
|
+
readonly diffImage?: string;
|
|
1385
|
+
};
|
|
1386
|
+
readonly renderId?: Array<string>;
|
|
1387
|
+
}>;
|
|
1388
|
+
readonly steps?: number;
|
|
1389
|
+
readonly matches?: number;
|
|
1390
|
+
readonly mismatches?: number;
|
|
1391
|
+
readonly missing?: number;
|
|
1392
|
+
readonly exactMatches?: number;
|
|
1393
|
+
readonly strictMatches?: number;
|
|
1394
|
+
readonly contentMatches?: number;
|
|
1395
|
+
readonly layoutMatches?: number;
|
|
1396
|
+
readonly noneMatches?: number;
|
|
1397
|
+
readonly url?: string;
|
|
1398
|
+
}; 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 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 7" | "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"; }; }; };
|
|
1339
1399
|
export class TestResultContainer implements Required<TestResultContainerPlain> {
|
|
1340
1400
|
get testResults(): TestResultsPlain;
|
|
1341
1401
|
getTestResults(): TestResults;
|
|
1342
1402
|
get exception(): Error;
|
|
1343
1403
|
getException(): Error;
|
|
1404
|
+
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 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 7" | "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"; }; };
|
|
1405
|
+
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 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 7" | "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"; }; };
|
|
1344
1406
|
}
|
|
1345
|
-
export type TestResultsSummaryPlain =
|
|
1346
|
-
|
|
1407
|
+
export type TestResultsSummaryPlain = {
|
|
1408
|
+
results: Array<TestResultContainerPlain>;
|
|
1409
|
+
passed: number;
|
|
1410
|
+
unresolved: number;
|
|
1411
|
+
failed: number;
|
|
1412
|
+
exceptions: number;
|
|
1413
|
+
mismatches: number;
|
|
1414
|
+
missing: number;
|
|
1415
|
+
matches: number;
|
|
1416
|
+
};
|
|
1417
|
+
export class TestResultsSummary implements Iterable<TestResultContainerPlain> {
|
|
1347
1418
|
getAllResults(): Array<TestResultContainer>;
|
|
1348
1419
|
[Symbol.iterator](): Iterator<TestResultContainer, any, undefined>;
|
|
1349
1420
|
}
|
|
@@ -1379,7 +1450,42 @@ export class Logger {
|
|
|
1379
1450
|
fatal(...messages: Array<any>): void;
|
|
1380
1451
|
open(): void;
|
|
1381
1452
|
close(): void;
|
|
1382
|
-
extend(
|
|
1453
|
+
extend(options?: Omit<{
|
|
1454
|
+
handler?: CustomLogHandlerPlain | FileLogHandlerPlain | ConsoleLogHandlerPlain | {
|
|
1455
|
+
type: "rolling file";
|
|
1456
|
+
dirname?: string;
|
|
1457
|
+
name?: string;
|
|
1458
|
+
maxFileLength?: number;
|
|
1459
|
+
maxFileNumber?: number;
|
|
1460
|
+
};
|
|
1461
|
+
format?: (message: any, options: {
|
|
1462
|
+
formatting?: boolean;
|
|
1463
|
+
label?: string;
|
|
1464
|
+
timestamp?: Date;
|
|
1465
|
+
level?: "silent" | "fatal" | "error" | "warn" | "info";
|
|
1466
|
+
tags?: Record<string, unknown>;
|
|
1467
|
+
color?: string | Array<string>;
|
|
1468
|
+
colors?: { timestamp?: string | Array<string>; level?: {
|
|
1469
|
+
silent?: string | Array<string>;
|
|
1470
|
+
fatal?: string | Array<string>;
|
|
1471
|
+
error?: string | Array<string>;
|
|
1472
|
+
warn?: string | Array<string>;
|
|
1473
|
+
info?: string | Array<string>;
|
|
1474
|
+
}; tags?: string | Array<string>; message?: string | Array<string>; };
|
|
1475
|
+
}) => string;
|
|
1476
|
+
label?: string;
|
|
1477
|
+
timestamp?: false;
|
|
1478
|
+
level?: number | ("silent" | "fatal" | "error" | "warn" | "info");
|
|
1479
|
+
colors?: boolean | { timestamp?: string | Array<string>; level?: {
|
|
1480
|
+
silent?: string | Array<string>;
|
|
1481
|
+
fatal?: string | Array<string>;
|
|
1482
|
+
error?: string | Array<string>;
|
|
1483
|
+
warn?: string | Array<string>;
|
|
1484
|
+
info?: string | Array<string>;
|
|
1485
|
+
}; tags?: string | Array<string>; message?: string | Array<string>; };
|
|
1486
|
+
console?: boolean | CustomLogHandlerPlain;
|
|
1487
|
+
}, "handler">): Logger;
|
|
1488
|
+
extend(label?: string): Logger;
|
|
1383
1489
|
}
|
|
1384
1490
|
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>;
|
|
1385
1491
|
export abstract class EyesRunner {
|