@applitools/eyes-nightwatch 1.10.0 → 1.10.3
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 +22 -0
- package/dist/spec-driver.js +26 -34
- package/package.json +15 -15
- package/types/index.d.ts +185 -79
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
## 1.10.3 - 2022/3/14
|
|
7
|
+
|
|
8
|
+
- fixing: Nightwatch 1.10.2 throwing Module assert/Strict not found
|
|
9
|
+
- updated to @applitools/eyes-api@1.2.0 (from 1.1.6)
|
|
10
|
+
- updated to @applitools/eyes-sdk-core@13.1.1 (from 12.24.7)
|
|
11
|
+
- updated to @applitools/types@1.2.2 (from 1.0.22)
|
|
12
|
+
- updated to @applitools/utils@1.2.13 (from 1.2.4)
|
|
13
|
+
- updated to @applitools/visual-grid-client@15.10.1 (from 15.8.53)
|
|
14
|
+
- updated to @applitools/visual-grid-client@15.10.1 (from 15.8.53)
|
|
15
|
+
## 1.10.2 - 2021/12/21
|
|
16
|
+
|
|
17
|
+
- updated to @applitools/eyes-sdk-core@12.24.7 (from 12.24.5)
|
|
18
|
+
- updated to @applitools/types@1.0.22 (from 1.0.21)
|
|
19
|
+
- updated to @applitools/visual-grid-client@15.8.53 (from 15.8.49)
|
|
20
|
+
|
|
21
|
+
## 1.10.1 - 2021/12/7
|
|
22
|
+
|
|
23
|
+
- implement `getCapabilities` instead of `getDriverInfo`
|
|
24
|
+
- updated to @applitools/eyes-sdk-core@12.24.5 (from 12.24.0)
|
|
25
|
+
- updated to @applitools/types@1.0.21 (from 1.0.19)
|
|
26
|
+
- updated to @applitools/visual-grid-client@15.8.49 (from 15.8.44)
|
|
27
|
+
|
|
6
28
|
## 1.10.0 - 2021/11/10
|
|
7
29
|
|
|
8
30
|
- support cookies
|
package/dist/spec-driver.js
CHANGED
|
@@ -19,15 +19,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.build = exports.waitUntilDisplayed = exports.scrollIntoView = exports.type = exports.hover = exports.click = exports.takeScreenshot = exports.visit = exports.getUrl = exports.getTitle = exports.getDriverInfo = exports.
|
|
22
|
+
exports.build = exports.waitUntilDisplayed = exports.scrollIntoView = exports.type = exports.hover = exports.click = exports.takeScreenshot = exports.visit = exports.getUrl = exports.getTitle = exports.getDriverInfo = exports.getCapabilities = exports.getCookies = exports.setWindowSize = exports.getWindowSize = exports.findElements = exports.findElement = exports.childContext = exports.parentContext = exports.mainContext = exports.executeScript = exports.isEqualElements = exports.isStaleElementError = exports.transformSelector = exports.transformElement = exports.transformDriver = exports.isSelector = exports.isElement = exports.isDriver = void 0;
|
|
23
23
|
const utils = __importStar(require("@applitools/utils"));
|
|
24
24
|
const LEGACY_ELEMENT_ID = 'ELEMENT';
|
|
25
|
+
const SHADOW_ROOT_ID = 'shadow-6066-11e4-a52e-4f735466cecf';
|
|
25
26
|
const ELEMENT_ID = 'element-6066-11e4-a52e-4f735466cecf';
|
|
26
27
|
function extractElementId(element) {
|
|
27
28
|
if (utils.types.has(element, ELEMENT_ID))
|
|
28
29
|
return element[ELEMENT_ID];
|
|
29
30
|
else if (utils.types.has(element, LEGACY_ELEMENT_ID))
|
|
30
31
|
return element[LEGACY_ELEMENT_ID];
|
|
32
|
+
else if (utils.types.has(element, SHADOW_ROOT_ID))
|
|
33
|
+
return element[SHADOW_ROOT_ID];
|
|
31
34
|
}
|
|
32
35
|
function call(driver, command, ...args) {
|
|
33
36
|
return new Promise((resolve, reject) => {
|
|
@@ -59,6 +62,16 @@ function isSelector(selector) {
|
|
|
59
62
|
return utils.types.has(selector, ['locateStrategy', 'selector']);
|
|
60
63
|
}
|
|
61
64
|
exports.isSelector = isSelector;
|
|
65
|
+
function transformDriver(driver) {
|
|
66
|
+
return new Proxy(driver, {
|
|
67
|
+
get(target, key) {
|
|
68
|
+
if (key === 'then')
|
|
69
|
+
return undefined;
|
|
70
|
+
return Reflect.get(target, key);
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
exports.transformDriver = transformDriver;
|
|
62
75
|
function transformElement(element) {
|
|
63
76
|
const elementId = extractElementId(utils.types.has(element, 'value') ? element.value : element);
|
|
64
77
|
return { [ELEMENT_ID]: elementId, [LEGACY_ELEMENT_ID]: elementId };
|
|
@@ -159,40 +172,17 @@ async function getCookies(driver, context) {
|
|
|
159
172
|
return [];
|
|
160
173
|
}
|
|
161
174
|
exports.getCookies = getCookies;
|
|
162
|
-
async function
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
175
|
+
async function getCapabilities(driver) {
|
|
176
|
+
try {
|
|
177
|
+
return await call(driver, 'session');
|
|
178
|
+
}
|
|
179
|
+
catch (_a) {
|
|
180
|
+
return driver.options.desiredCapabilities;
|
|
181
|
+
}
|
|
166
182
|
}
|
|
167
|
-
exports.
|
|
183
|
+
exports.getCapabilities = getCapabilities;
|
|
168
184
|
async function getDriverInfo(driver) {
|
|
169
|
-
|
|
170
|
-
const capabilities = driver.options.desiredCapabilities;
|
|
171
|
-
const platformName = (_b = (_a = capabilities.platformName) !== null && _a !== void 0 ? _a : capabilities.platform) !== null && _b !== void 0 ? _b : (_c = capabilities.desired) === null || _c === void 0 ? void 0 : _c.platformName;
|
|
172
|
-
const browserName = (_d = capabilities.browserName) !== null && _d !== void 0 ? _d : capabilities.browser_name;
|
|
173
|
-
const isMobile = ['android', 'ios'].includes(platformName === null || platformName === void 0 ? void 0 : platformName.toLowerCase());
|
|
174
|
-
const isNative = isMobile && !browserName;
|
|
175
|
-
const info = {
|
|
176
|
-
features: { allCookies: false },
|
|
177
|
-
sessionId: driver.sessionId,
|
|
178
|
-
isMobile,
|
|
179
|
-
isNative,
|
|
180
|
-
deviceName: (_e = capabilities.device) !== null && _e !== void 0 ? _e : capabilities.deviceName,
|
|
181
|
-
platformName,
|
|
182
|
-
platformVersion: (_f = capabilities.osVersion) !== null && _f !== void 0 ? _f : capabilities.platformVersion,
|
|
183
|
-
browserName,
|
|
184
|
-
browserVersion: (_g = capabilities.browserVersion) !== null && _g !== void 0 ? _g : capabilities.version,
|
|
185
|
-
pixelRatio: capabilities.pixelRatio,
|
|
186
|
-
};
|
|
187
|
-
if (info.isNative) {
|
|
188
|
-
const desiredCapabilities = utils.types.has(capabilities, ['pixelRatio', 'viewportRect', 'statBarHeight'])
|
|
189
|
-
? capabilities
|
|
190
|
-
: await call(driver, 'session');
|
|
191
|
-
info.pixelRatio = desiredCapabilities.pixelRatio;
|
|
192
|
-
info.statusBarHeight = (_k = (_h = desiredCapabilities.statBarHeight) !== null && _h !== void 0 ? _h : (_j = desiredCapabilities.viewportRect) === null || _j === void 0 ? void 0 : _j.top) !== null && _k !== void 0 ? _k : 0;
|
|
193
|
-
info.navigationBarHeight = 0;
|
|
194
|
-
}
|
|
195
|
-
return info;
|
|
185
|
+
return { sessionId: driver.sessionId, features: { allCookies: false } };
|
|
196
186
|
}
|
|
197
187
|
exports.getDriverInfo = getDriverInfo;
|
|
198
188
|
async function getTitle(driver) {
|
|
@@ -264,6 +254,8 @@ async function build(env) {
|
|
|
264
254
|
browserOptions.w3c = false;
|
|
265
255
|
}
|
|
266
256
|
}
|
|
257
|
+
if (desiredCapabilities.browserName === '')
|
|
258
|
+
desiredCapabilities.browserName = null;
|
|
267
259
|
const Nightwatch = require('nightwatch');
|
|
268
260
|
const Settings = require('nightwatch/lib/settings/settings');
|
|
269
261
|
const settings = Settings.parse({}, {
|
|
@@ -272,7 +264,7 @@ async function build(env) {
|
|
|
272
264
|
output: false,
|
|
273
265
|
webdriver: {
|
|
274
266
|
host: !url.host.includes('localhost') ? url.host : undefined,
|
|
275
|
-
port: url.port,
|
|
267
|
+
port: url.port || 4444,
|
|
276
268
|
default_path_prefix: url.pathname,
|
|
277
269
|
},
|
|
278
270
|
desiredCapabilities,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/eyes-nightwatch",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.3",
|
|
4
4
|
"description": "Applitools Eyes SDK for Nightwatch.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eyes-nightwatch",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"scripts": {
|
|
46
46
|
"lint": "eslint '**/*.ts' '**/*.js'",
|
|
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-nightwatch'",
|
|
49
49
|
"test": "yarn test:it && yarn test:e2e && yarn test:coverage",
|
|
50
50
|
"test:it": "mocha ./test/it/spec-driver.spec.js --exit --no-timeouts -r @applitools/test-utils/mocha-hooks/docker",
|
|
51
51
|
"test:e2e": "yarn test:e2e:nightwatch && yarn test:e2e:cucumber",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"docker:teardown": "docker-compose down",
|
|
59
59
|
"deps": "bongo deps",
|
|
60
60
|
"gh:test": "gh workflow run test.yml --ref $(git rev-parse --abbrev-ref HEAD) -f packages='nightwatch' -f links='eyes-sdk-core eyes-api types test-utils utils driver snippets screenshoter sdk-shared visual-grid-client' -f linking-depth=3",
|
|
61
|
-
"gh:publish": "gh workflow run publish.yml --ref $(git rev-parse --abbrev-ref HEAD)
|
|
61
|
+
"gh:publish": "gh workflow run publish-nightwatch.yml --ref $(git rev-parse --abbrev-ref HEAD)",
|
|
62
62
|
"preversion": "bongo preversion && yarn build",
|
|
63
63
|
"version": "bongo version",
|
|
64
64
|
"postversion": "bongo postversion"
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@applitools/eyes-api": "1.
|
|
73
|
-
"@applitools/eyes-sdk-core": "
|
|
74
|
-
"@applitools/types": "1.
|
|
75
|
-
"@applitools/utils": "1.2.
|
|
76
|
-
"@applitools/visual-grid-client": "15.
|
|
72
|
+
"@applitools/eyes-api": "1.2.0",
|
|
73
|
+
"@applitools/eyes-sdk-core": "13.1.1",
|
|
74
|
+
"@applitools/types": "1.2.2",
|
|
75
|
+
"@applitools/utils": "1.2.13",
|
|
76
|
+
"@applitools/visual-grid-client": "15.10.1"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@applitools/api-extractor": "1.2.
|
|
80
|
-
"@applitools/scripts": "1.0
|
|
81
|
-
"@applitools/sdk-coverage-tests": "2.3.
|
|
82
|
-
"@applitools/sdk-release-kit": "0.13.
|
|
83
|
-
"@applitools/sdk-shared": "0.9.
|
|
84
|
-
"@applitools/test-utils": "1.
|
|
79
|
+
"@applitools/api-extractor": "1.2.7",
|
|
80
|
+
"@applitools/scripts": "1.1.0",
|
|
81
|
+
"@applitools/sdk-coverage-tests": "2.3.18",
|
|
82
|
+
"@applitools/sdk-release-kit": "0.13.11",
|
|
83
|
+
"@applitools/sdk-shared": "0.9.11",
|
|
84
|
+
"@applitools/test-utils": "1.1.5",
|
|
85
85
|
"@types/nightwatch": "^1.3.3",
|
|
86
86
|
"@typescript-eslint/eslint-plugin": "^4.15.1",
|
|
87
87
|
"@typescript-eslint/parser": "^4.15.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"geckodriver": "^1.20.0",
|
|
96
96
|
"husky": "^4.3.8",
|
|
97
97
|
"mocha": "^9.1.3",
|
|
98
|
-
"nightwatch": "1.
|
|
98
|
+
"nightwatch": "1.7.13",
|
|
99
99
|
"nightwatch-api": "^3.0.2",
|
|
100
100
|
"prettier": "^2.1.2",
|
|
101
101
|
"spec-xunit-file": "0.0.1-3",
|
package/types/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ export type Selector = {
|
|
|
7
7
|
};
|
|
8
8
|
export class Eyes {
|
|
9
9
|
static setViewportSize: (driver: Driver, viewportSize: RectangleSize) => Promise<void>;
|
|
10
|
-
constructor(runner
|
|
11
|
-
constructor(config
|
|
10
|
+
constructor(runner?: EyesRunner, config?: ConfigurationPlain);
|
|
11
|
+
constructor(config?: ConfigurationPlain);
|
|
12
12
|
get logger(): Logger;
|
|
13
13
|
getLogger(): Logger;
|
|
14
14
|
get runner(): EyesRunner;
|
|
@@ -21,7 +21,7 @@ export class Eyes {
|
|
|
21
21
|
setConfiguration(config: ConfigurationPlain): void;
|
|
22
22
|
get isOpen(): boolean;
|
|
23
23
|
getIsOpen(): boolean;
|
|
24
|
-
on(handler: (event: string, data
|
|
24
|
+
on(handler: (event: string, data?: Record<string, any>) => any): () => void;
|
|
25
25
|
on(event: "setSizeWillStart", handler: (data: { viewportSize: RectangleSizePlain; }) => any): () => void;
|
|
26
26
|
on(event: "setSizeEnded", handler: () => any): () => void;
|
|
27
27
|
on(event: "initStarted", handler: () => any): () => void;
|
|
@@ -31,23 +31,23 @@ export class Eyes {
|
|
|
31
31
|
on(event: "validationEnded", handler: (data: { sessionId: string; validationId: number; validationResult: ValidationResultPlain; }) => any): () => void;
|
|
32
32
|
on(event: "testEnded", handler: (data: { sessionId: string; testResults: TestResultsPlain; }) => any): () => void;
|
|
33
33
|
off(event: string): void;
|
|
34
|
-
off(handler: (args: Array<any>) => any): void;
|
|
35
|
-
open(driver: Driver, config
|
|
36
|
-
open(driver: Driver, appName
|
|
37
|
-
checkWindow(name
|
|
38
|
-
checkFrame(element: number | Element | EyesSelector<Selector>, timeout
|
|
39
|
-
checkElement(element: Element, timeout
|
|
40
|
-
checkElementBy(selector: EyesSelector<Selector>, timeout
|
|
41
|
-
checkRegion(region
|
|
42
|
-
checkRegionByElement(element: Element, name
|
|
43
|
-
checkRegionBy(selector: EyesSelector<Selector>, name
|
|
44
|
-
checkRegionInFrame(frame: number | Element | EyesSelector<Selector>, selector: EyesSelector<Selector>, timeout
|
|
34
|
+
off(handler: (...args: Array<any>) => any): void;
|
|
35
|
+
open(driver: Driver, config?: ConfigurationPlain): Promise<Driver>;
|
|
36
|
+
open(driver: Driver, appName?: string, testName?: string, viewportSize?: RectangleSizePlain, sessionType?: SessionTypePlain): Promise<Driver>;
|
|
37
|
+
checkWindow(name?: string, timeout?: number, fully?: boolean): Promise<MatchResult>;
|
|
38
|
+
checkFrame(element: number | Element | EyesSelector<Selector>, timeout?: number, name?: string): Promise<MatchResult>;
|
|
39
|
+
checkElement(element: Element, timeout?: number, name?: string): Promise<MatchResult>;
|
|
40
|
+
checkElementBy(selector: EyesSelector<Selector>, timeout?: number, name?: string): Promise<MatchResult>;
|
|
41
|
+
checkRegion(region?: RegionPlain, name?: string, timeout?: number): Promise<MatchResult>;
|
|
42
|
+
checkRegionByElement(element: Element, name?: string, timeout?: number): Promise<MatchResult>;
|
|
43
|
+
checkRegionBy(selector: EyesSelector<Selector>, name?: string, timeout?: number, fully?: boolean): Promise<MatchResult>;
|
|
44
|
+
checkRegionInFrame(frame: number | Element | EyesSelector<Selector>, selector: EyesSelector<Selector>, timeout?: number, name?: string, fully?: boolean): Promise<MatchResult>;
|
|
45
45
|
check(name: string, checkSettings: CheckSettings): Promise<MatchResult>;
|
|
46
|
-
check(checkSettings
|
|
46
|
+
check(checkSettings?: CheckSettingsPlain): Promise<MatchResult>;
|
|
47
47
|
locate<TLocator extends string>(settings: VisualLocatorSettings<TLocator>): Promise<Record<TLocator, Array<RegionPlain>>>;
|
|
48
48
|
extractTextRegions<TPattern extends string>(settings: OCRSettings<TPattern>): Promise<Record<TPattern, Array<TextRegion>>>;
|
|
49
49
|
extractText(regions: Array<OCRRegion>): Promise<Array<string>>;
|
|
50
|
-
close(throwErr
|
|
50
|
+
close(throwErr?: boolean): Promise<TestResults>;
|
|
51
51
|
closeAsync(): Promise<void>;
|
|
52
52
|
abort(): Promise<TestResults>;
|
|
53
53
|
abortAsync(): Promise<void>;
|
|
@@ -75,7 +75,7 @@ export class Eyes {
|
|
|
75
75
|
clearProperties(): Configuration;
|
|
76
76
|
getBatch(): BatchInfo;
|
|
77
77
|
setBatch(batch: BatchInfoPlain): void;
|
|
78
|
-
setBatch(name: string, id
|
|
78
|
+
setBatch(name: string, id?: string, startedAt?: string | Date): void;
|
|
79
79
|
getApiKey(): string;
|
|
80
80
|
setApiKey(apiKey: string): void;
|
|
81
81
|
getTestName(): string;
|
|
@@ -111,7 +111,7 @@ export class Eyes {
|
|
|
111
111
|
getParentBranchName(): string;
|
|
112
112
|
setParentBranchName(parentBranchName: string): void;
|
|
113
113
|
setProxy(proxy: ProxySettingsPlain): void;
|
|
114
|
-
setProxy(url: string, username
|
|
114
|
+
setProxy(url: string, username?: string, password?: string, isHttpOnly?: boolean): void;
|
|
115
115
|
setProxy(isEnabled: false): void;
|
|
116
116
|
getProxy(): ProxySettings;
|
|
117
117
|
getSaveDiffs(): boolean;
|
|
@@ -146,6 +146,7 @@ export type ConfigurationPlain = {
|
|
|
146
146
|
apiKey?: string;
|
|
147
147
|
serverUrl?: string;
|
|
148
148
|
proxy?: ProxySettingsPlain;
|
|
149
|
+
autProxy?: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
|
|
149
150
|
isDisabled?: boolean;
|
|
150
151
|
connectionTimeout?: number;
|
|
151
152
|
removeSession?: boolean;
|
|
@@ -170,6 +171,7 @@ export type ConfigurationPlain = {
|
|
|
170
171
|
baselineBranchName?: string;
|
|
171
172
|
compareWithParentBranch?: boolean;
|
|
172
173
|
ignoreBaseline?: boolean;
|
|
174
|
+
ignoreGitMergeBase?: boolean;
|
|
173
175
|
saveFailedTests?: boolean;
|
|
174
176
|
saveNewTests?: boolean;
|
|
175
177
|
saveDiffs?: boolean;
|
|
@@ -194,7 +196,7 @@ export type ConfigurationPlain = {
|
|
|
194
196
|
disableBrowserFetching?: boolean;
|
|
195
197
|
};
|
|
196
198
|
export class Configuration implements Required<ConfigurationPlain> {
|
|
197
|
-
constructor(config
|
|
199
|
+
constructor(config?: ConfigurationPlain);
|
|
198
200
|
get logs(): LogHandlerPlain;
|
|
199
201
|
set logs(logs: LogHandlerPlain);
|
|
200
202
|
getShowLogs(): boolean;
|
|
@@ -253,8 +255,12 @@ export class Configuration implements Required<ConfigurationPlain> {
|
|
|
253
255
|
set proxy(proxy: ProxySettingsPlain);
|
|
254
256
|
getProxy(): ProxySettings;
|
|
255
257
|
setProxy(proxy: ProxySettingsPlain): Configuration;
|
|
256
|
-
setProxy(url: string, username
|
|
258
|
+
setProxy(url: string, username?: string, password?: string, isHttpOnly?: boolean): Configuration;
|
|
257
259
|
setProxy(isEnabled: false): Configuration;
|
|
260
|
+
get autProxy(): { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
|
|
261
|
+
set autProxy(autProxy: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; });
|
|
262
|
+
getAutProxy(): { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; };
|
|
263
|
+
setAutProxy(autProxy: { proxy: { url: string; username?: string; password?: string; isHttpOnly?: boolean; }; domains?: Array<string>; AUTProxyMode?: "Allow" | "Block"; }): Configuration;
|
|
258
264
|
get connectionTimeout(): number;
|
|
259
265
|
set connectionTimeout(connectionTimeout: number);
|
|
260
266
|
getConnectionTimeout(): number;
|
|
@@ -302,6 +308,10 @@ export class Configuration implements Required<ConfigurationPlain> {
|
|
|
302
308
|
set compareWithParentBranch(compareWithParentBranch: boolean);
|
|
303
309
|
getCompareWithParentBranch(): boolean;
|
|
304
310
|
setCompareWithParentBranch(compareWithParentBranch: boolean): Configuration;
|
|
311
|
+
get ignoreGitMergeBase(): boolean;
|
|
312
|
+
set ignoreGitMergeBase(ignoreGitMergeBase: boolean);
|
|
313
|
+
getIgnoreGitMergeBase(): boolean;
|
|
314
|
+
setIgnoreGitMergeBase(ignoreGitMergeBase: boolean): Configuration;
|
|
305
315
|
get ignoreBaseline(): boolean;
|
|
306
316
|
set ignoreBaseline(ignoreBaseline: boolean);
|
|
307
317
|
getIgnoreBaseline(): boolean;
|
|
@@ -410,10 +420,10 @@ export class Configuration implements Required<ConfigurationPlain> {
|
|
|
410
420
|
set browsersInfo(browsersInfo: Array<DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo>);
|
|
411
421
|
getBrowsersInfo(): Array<DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain; }>;
|
|
412
422
|
setBrowsersInfo(browsersInfo: Array<DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain; }>): Configuration;
|
|
413
|
-
addBrowsers(browsersInfo: Array<DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain; }>): Configuration;
|
|
423
|
+
addBrowsers(...browsersInfo: Array<DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain; }>): Configuration;
|
|
414
424
|
addBrowser(browserInfo: DesktopBrowserInfo | ChromeEmulationInfo | IOSDeviceInfo | { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain; }): Configuration;
|
|
415
|
-
addBrowser(width: number, height: number, name
|
|
416
|
-
addDeviceEmulation(deviceName: DeviceNamePlain, screenOrientation
|
|
425
|
+
addBrowser(width: number, height: number, name?: BrowserTypePlain): Configuration;
|
|
426
|
+
addDeviceEmulation(deviceName: DeviceNamePlain, screenOrientation?: ScreenOrientationPlain): Configuration;
|
|
417
427
|
get visualGridOptions(): { [key: string]: any; };
|
|
418
428
|
set visualGridOptions(visualGridOptions: { [key: string]: any; });
|
|
419
429
|
getVisualGridOptions(): { [key: string]: any; };
|
|
@@ -462,28 +472,29 @@ export type CheckSettingsPlain = {
|
|
|
462
472
|
visualGridOptions?: { [key: string]: any; };
|
|
463
473
|
hooks?: { beforeCaptureScreenshot: string; };
|
|
464
474
|
renderId?: string;
|
|
475
|
+
pageId?: string;
|
|
465
476
|
variationGroupId?: string;
|
|
466
477
|
timeout?: number;
|
|
467
478
|
waitBeforeCapture?: number;
|
|
468
479
|
};
|
|
469
480
|
export class CheckSettings {
|
|
470
|
-
constructor(settings
|
|
481
|
+
constructor(settings?: CheckSettingsPlain);
|
|
471
482
|
name(name: string): CheckSettings;
|
|
472
483
|
withName(name: string): CheckSettings;
|
|
473
484
|
region(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
474
485
|
shadow(selector: string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }): CheckSettings;
|
|
475
486
|
frame(context: { frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })); scrollRootElement?: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }); }): CheckSettings;
|
|
476
|
-
frame(frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })), scrollRootElement
|
|
487
|
+
frame(frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })), scrollRootElement?: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })): CheckSettings;
|
|
477
488
|
ignoreRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
478
|
-
ignoreRegions(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
489
|
+
ignoreRegions(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
479
490
|
ignore(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
480
|
-
ignores(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
491
|
+
ignores(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
481
492
|
layoutRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
482
|
-
layoutRegions(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
493
|
+
layoutRegions(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
483
494
|
strictRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
484
|
-
strictRegions(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
495
|
+
strictRegions(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
485
496
|
contentRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
486
|
-
contentRegions(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
497
|
+
contentRegions(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
487
498
|
floatingRegion(region: {
|
|
488
499
|
region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }));
|
|
489
500
|
maxUpOffset?: number;
|
|
@@ -491,15 +502,15 @@ export class CheckSettings {
|
|
|
491
502
|
maxLeftOffset?: number;
|
|
492
503
|
maxRightOffset?: number;
|
|
493
504
|
}): CheckSettings;
|
|
494
|
-
floatingRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))), maxUpOffset
|
|
495
|
-
floatingRegions(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))) | {
|
|
505
|
+
floatingRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))), maxUpOffset?: number, maxDownOffset?: number, maxLeftOffset?: number, maxRightOffset?: number): CheckSettings;
|
|
506
|
+
floatingRegions(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))) | {
|
|
496
507
|
region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }));
|
|
497
508
|
maxUpOffset?: number;
|
|
498
509
|
maxDownOffset?: number;
|
|
499
510
|
maxLeftOffset?: number;
|
|
500
511
|
maxRightOffset?: number;
|
|
501
512
|
}>): CheckSettings;
|
|
502
|
-
floatingRegions(maxOffset: number, regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
513
|
+
floatingRegions(maxOffset: number, ...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
503
514
|
floating(region: {
|
|
504
515
|
region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }));
|
|
505
516
|
maxUpOffset?: number;
|
|
@@ -508,39 +519,40 @@ export class CheckSettings {
|
|
|
508
519
|
maxRightOffset?: number;
|
|
509
520
|
}): CheckSettings;
|
|
510
521
|
floating(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
511
|
-
floatings(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))) | {
|
|
522
|
+
floatings(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))) | {
|
|
512
523
|
region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }));
|
|
513
524
|
maxUpOffset?: number;
|
|
514
525
|
maxDownOffset?: number;
|
|
515
526
|
maxLeftOffset?: number;
|
|
516
527
|
maxRightOffset?: number;
|
|
517
528
|
}>): CheckSettings;
|
|
518
|
-
floatings(maxOffset: number, regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
529
|
+
floatings(maxOffset: number, ...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
519
530
|
accessibilityRegion(region: { region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })); type?: AccessibilityRegionTypePlain; }): CheckSettings;
|
|
520
|
-
accessibilityRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))), type
|
|
521
|
-
accessibilityRegions(regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))) | { region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })); type?: AccessibilityRegionTypePlain; }>): CheckSettings;
|
|
522
|
-
accessibilityRegions(type: AccessibilityRegionTypePlain, regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
531
|
+
accessibilityRegion(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))), type?: AccessibilityRegionTypePlain): CheckSettings;
|
|
532
|
+
accessibilityRegions(...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }))) | { region: RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })); type?: AccessibilityRegionTypePlain; }>): CheckSettings;
|
|
533
|
+
accessibilityRegions(type: AccessibilityRegionTypePlain, ...regions: Array<LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))>): CheckSettings;
|
|
523
534
|
scrollRootElement(scrollRootElement: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })): CheckSettings;
|
|
524
|
-
fully(fully
|
|
525
|
-
stitchContent(stitchContent
|
|
535
|
+
fully(fully?: boolean): CheckSettings;
|
|
536
|
+
stitchContent(stitchContent?: boolean): CheckSettings;
|
|
526
537
|
matchLevel(matchLevel: MatchLevelPlain): CheckSettings;
|
|
527
538
|
layout(): CheckSettings;
|
|
528
539
|
exact(): CheckSettings;
|
|
529
540
|
strict(): CheckSettings;
|
|
530
541
|
content(): CheckSettings;
|
|
531
|
-
useDom(useDom
|
|
532
|
-
sendDom(sendDom
|
|
533
|
-
enablePatterns(enablePatterns
|
|
534
|
-
ignoreDisplacements(ignoreDisplacements
|
|
535
|
-
ignoreCaret(ignoreCaret
|
|
542
|
+
useDom(useDom?: boolean): CheckSettings;
|
|
543
|
+
sendDom(sendDom?: boolean): CheckSettings;
|
|
544
|
+
enablePatterns(enablePatterns?: boolean): CheckSettings;
|
|
545
|
+
ignoreDisplacements(ignoreDisplacements?: boolean): CheckSettings;
|
|
546
|
+
ignoreCaret(ignoreCaret?: boolean): CheckSettings;
|
|
536
547
|
disableBrowserFetching(disableBrowserFetching: boolean): CheckSettings;
|
|
537
|
-
layoutBreakpoints(layoutBreakpoints
|
|
548
|
+
layoutBreakpoints(layoutBreakpoints?: boolean | Array<number>): CheckSettings;
|
|
538
549
|
hook(name: string, script: string): CheckSettings;
|
|
539
550
|
beforeRenderScreenshotHook(script: string): CheckSettings;
|
|
540
551
|
webHook(script: string): CheckSettings;
|
|
541
552
|
visualGridOption(key: string, value: any): CheckSettings;
|
|
542
553
|
visualGridOptions(options: { [key: string]: any; }): CheckSettings;
|
|
543
554
|
renderId(renderId: string): CheckSettings;
|
|
555
|
+
pageId(pageId: string): CheckSettings;
|
|
544
556
|
variationGroupId(variationGroupId: string): CheckSettings;
|
|
545
557
|
timeout(timeout: number): CheckSettings;
|
|
546
558
|
waitBeforeCapture(waitBeforeCapture: number): CheckSettings;
|
|
@@ -549,13 +561,13 @@ export const Target: {
|
|
|
549
561
|
window(): CheckSettings;
|
|
550
562
|
region(region: LegacyRegionPlain | (RegionPlain | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })))): CheckSettings;
|
|
551
563
|
frame(context: { frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })); scrollRootElement?: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }); }): CheckSettings;
|
|
552
|
-
frame(frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })), scrollRootElement
|
|
564
|
+
frame(frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })), scrollRootElement?: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })): CheckSettings;
|
|
553
565
|
shadow(selector: string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }): CheckSettings;
|
|
554
566
|
};
|
|
555
567
|
export const closeBatch: (options: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }) => Promise<void>;
|
|
556
568
|
export class BatchClose {
|
|
557
569
|
static close(settings: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }): Promise<void>;
|
|
558
|
-
constructor(options
|
|
570
|
+
constructor(options?: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; });
|
|
559
571
|
close(): Promise<void>;
|
|
560
572
|
setBatchIds(batchIds: Array<string>): BatchClose;
|
|
561
573
|
setUrl(serverUrl: string): BatchClose;
|
|
@@ -611,7 +623,7 @@ export enum CorsIframeHandle {
|
|
|
611
623
|
KEEP = 'KEEP',
|
|
612
624
|
SNAPSHOT = 'SNAPSHOT'
|
|
613
625
|
}
|
|
614
|
-
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";
|
|
626
|
+
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";
|
|
615
627
|
export enum DeviceName {
|
|
616
628
|
Blackberry_PlayBook = 'Blackberry PlayBook',
|
|
617
629
|
BlackBerry_Z30 = 'BlackBerry Z30',
|
|
@@ -632,6 +644,7 @@ export enum DeviceName {
|
|
|
632
644
|
Galaxy_S10 = 'Galaxy S10',
|
|
633
645
|
Galaxy_S10_Plus = 'Galaxy S10 Plus',
|
|
634
646
|
Galaxy_S20 = 'Galaxy S20',
|
|
647
|
+
Galaxy_Tab_S7 = 'Galaxy Tab S7',
|
|
635
648
|
iPad = 'iPad',
|
|
636
649
|
iPad_6th_Gen = 'iPad 6th Gen',
|
|
637
650
|
iPad_7th_Gen = 'iPad 7th Gen',
|
|
@@ -681,7 +694,7 @@ export enum FailureReport {
|
|
|
681
694
|
IMMEDIATE = 'IMMEDIATE',
|
|
682
695
|
ON_CLOSE = 'ON_CLOSE'
|
|
683
696
|
}
|
|
684
|
-
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)";
|
|
697
|
+
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)";
|
|
685
698
|
export enum IosDeviceName {
|
|
686
699
|
iPhone_13_Pro_Max = 'iPhone 13 Pro Max',
|
|
687
700
|
iPhone_13_Pro = 'iPhone 13 Pro',
|
|
@@ -701,7 +714,8 @@ export enum IosDeviceName {
|
|
|
701
714
|
iPad_Pro_3 = 'iPad Pro (12.9-inch) (3rd generation)',
|
|
702
715
|
iPad_7 = 'iPad (7th generation)',
|
|
703
716
|
iPad_9 = 'iPad (9th generation)',
|
|
704
|
-
iPad_Air_2 = 'iPad Air (2nd generation)'
|
|
717
|
+
iPad_Air_2 = 'iPad Air (2nd generation)',
|
|
718
|
+
iPad_Air_4 = 'iPad Air (4th generation)'
|
|
705
719
|
}
|
|
706
720
|
export type IosVersionPlain = "latest" | "latest-1";
|
|
707
721
|
export enum IosVersion {
|
|
@@ -743,24 +757,24 @@ export enum TestResultsStatus {
|
|
|
743
757
|
export class EyesError extends Error {
|
|
744
758
|
}
|
|
745
759
|
export class TestFailedError extends EyesError {
|
|
746
|
-
constructor(message: string, results
|
|
760
|
+
constructor(message: string, results?: TestResultsPlain);
|
|
747
761
|
constructor(results: TestResultsPlain);
|
|
748
762
|
get testResults(): TestResultsPlain;
|
|
749
763
|
getTestResults(): TestResults;
|
|
750
764
|
}
|
|
751
765
|
export class DiffsFoundError extends TestFailedError {
|
|
752
|
-
constructor(message: string, results
|
|
766
|
+
constructor(message: string, results?: TestResultsPlain);
|
|
753
767
|
constructor(results: TestResultsPlain);
|
|
754
768
|
}
|
|
755
769
|
export class NewTestError extends TestFailedError {
|
|
756
|
-
constructor(message: string, results
|
|
770
|
+
constructor(message: string, results?: TestResultsPlain);
|
|
757
771
|
constructor(results: TestResultsPlain);
|
|
758
772
|
}
|
|
759
773
|
export type AccessibilityMatchSettingsPlain = { region: RegionPlain; type?: AccessibilityRegionTypePlain; };
|
|
760
774
|
export class AccessibilityMatchSettings implements Required<AccessibilityMatchSettingsPlain> {
|
|
761
775
|
constructor(settings: AccessibilityMatchSettingsPlain);
|
|
762
776
|
constructor(region: RegionPlain);
|
|
763
|
-
constructor(x: number, y: number, width: number, height: number, type
|
|
777
|
+
constructor(x: number, y: number, width: number, height: number, type?: AccessibilityRegionTypePlain);
|
|
764
778
|
get region(): RegionPlain;
|
|
765
779
|
set region(region: RegionPlain);
|
|
766
780
|
getRegion(): Region;
|
|
@@ -789,8 +803,8 @@ export type BatchInfoPlain = {
|
|
|
789
803
|
};
|
|
790
804
|
export class BatchInfo implements Required<BatchInfoPlain> {
|
|
791
805
|
constructor();
|
|
792
|
-
constructor(batch
|
|
793
|
-
constructor(name
|
|
806
|
+
constructor(batch?: BatchInfoPlain);
|
|
807
|
+
constructor(name?: string, startedAt?: string | Date, id?: string);
|
|
794
808
|
get id(): string;
|
|
795
809
|
set id(id: string);
|
|
796
810
|
getId(): string;
|
|
@@ -815,7 +829,8 @@ export class BatchInfo implements Required<BatchInfoPlain> {
|
|
|
815
829
|
set properties(properties: Array<PropertyDataPlain>);
|
|
816
830
|
getProperties(): Array<PropertyData>;
|
|
817
831
|
setProperties(properties: Array<PropertyDataPlain>): BatchInfo;
|
|
818
|
-
addProperty(
|
|
832
|
+
addProperty(name: string, value: string): BatchInfo;
|
|
833
|
+
addProperty(prop: PropertyDataPlain): BatchInfo;
|
|
819
834
|
}
|
|
820
835
|
export type CutProviderPlain = { top: number; right: number; bottom: number; left: number; } | { x: number; y: number; width: number; height: number; };
|
|
821
836
|
export class CutProvider implements Required<{
|
|
@@ -875,7 +890,7 @@ export type FloatingMatchSettingsPlain = {
|
|
|
875
890
|
export class FloatingMatchSettings implements Required<FloatingMatchSettingsPlain> {
|
|
876
891
|
constructor(settings: FloatingMatchSettingsPlain);
|
|
877
892
|
constructor(region: RegionPlain);
|
|
878
|
-
constructor(x: number, y: number, width: number, height: number, maxUpOffset
|
|
893
|
+
constructor(x: number, y: number, width: number, height: number, maxUpOffset?: number, maxDownOffset?: number, maxLeftOffset?: number, maxRightOffset?: number);
|
|
879
894
|
get region(): RegionPlain;
|
|
880
895
|
set region(region: RegionPlain);
|
|
881
896
|
getRegion(): Region;
|
|
@@ -921,7 +936,7 @@ export type ImageMatchSettingsPlain = {
|
|
|
921
936
|
accessibilitySettings?: AccessibilitySettings;
|
|
922
937
|
};
|
|
923
938
|
export class ImageMatchSettings implements Required<ImageMatchSettingsPlain> {
|
|
924
|
-
constructor(settings
|
|
939
|
+
constructor(settings?: ImageMatchSettingsPlain);
|
|
925
940
|
get exact(): ExactMatchSettingsPlain;
|
|
926
941
|
set exact(exact: ExactMatchSettingsPlain);
|
|
927
942
|
getExact(): ExactMatchSettings;
|
|
@@ -1018,7 +1033,7 @@ export type CustomLogHandlerPlain = {
|
|
|
1018
1033
|
export type FileLogHandlerPlain = { type: "file"; filename?: string; append?: boolean; };
|
|
1019
1034
|
export type ConsoleLogHandlerPlain = { type: "console"; };
|
|
1020
1035
|
export abstract class LogHandler implements CustomLogHandlerPlain {
|
|
1021
|
-
constructor(verbose
|
|
1036
|
+
constructor(verbose?: boolean);
|
|
1022
1037
|
get verbose(): boolean;
|
|
1023
1038
|
set verbose(verbose: boolean);
|
|
1024
1039
|
getIsVerbose(): boolean;
|
|
@@ -1029,7 +1044,7 @@ export abstract class LogHandler implements CustomLogHandlerPlain {
|
|
|
1029
1044
|
abstract close(): void;
|
|
1030
1045
|
}
|
|
1031
1046
|
export class FileLogHandler extends LogHandler implements FileLogHandlerPlain {
|
|
1032
|
-
constructor(verbose
|
|
1047
|
+
constructor(verbose?: boolean, filename?: string, append?: boolean);
|
|
1033
1048
|
readonly type: "file";
|
|
1034
1049
|
readonly filename: string;
|
|
1035
1050
|
readonly append: boolean;
|
|
@@ -1065,7 +1080,7 @@ export class PropertyData implements Required<PropertyDataPlain> {
|
|
|
1065
1080
|
export type ProxySettingsPlain = { url: string; username?: string; password?: string; isHttpOnly?: boolean; };
|
|
1066
1081
|
export class ProxySettings implements Required<ProxySettingsPlain> {
|
|
1067
1082
|
constructor(proxy: ProxySettingsPlain);
|
|
1068
|
-
constructor(url: string, username
|
|
1083
|
+
constructor(url: string, username?: string, password?: string, isHttpOnly?: boolean);
|
|
1069
1084
|
get url(): string;
|
|
1070
1085
|
getUri(): string;
|
|
1071
1086
|
getUrl(): string;
|
|
@@ -1340,15 +1355,71 @@ export class TestResults implements Required<TestResultsPlain> {
|
|
|
1340
1355
|
delete(): Promise<void>;
|
|
1341
1356
|
deleteSession(): Promise<void>;
|
|
1342
1357
|
}
|
|
1343
|
-
export type TestResultContainerPlain = { readonly exception
|
|
1358
|
+
export type TestResultContainerPlain = { readonly exception?: Error; readonly testResults?: {
|
|
1359
|
+
readonly id?: string;
|
|
1360
|
+
readonly name?: string;
|
|
1361
|
+
readonly secretToken?: string;
|
|
1362
|
+
readonly status?: "Passed" | "Failed" | "Unresolved";
|
|
1363
|
+
readonly appName?: string;
|
|
1364
|
+
readonly batchId?: string;
|
|
1365
|
+
readonly batchName?: string;
|
|
1366
|
+
readonly branchName?: string;
|
|
1367
|
+
readonly hostOS?: string;
|
|
1368
|
+
readonly hostApp?: string;
|
|
1369
|
+
readonly hostDisplaySize?: { width: number; height: number; };
|
|
1370
|
+
readonly accessibilityStatus?: { readonly level: "AA" | "AAA"; readonly version: "WCAG_2_0" | "WCAG_2_1"; readonly status: "Passed" | "Failed"; };
|
|
1371
|
+
readonly startedAt?: string | Date;
|
|
1372
|
+
readonly duration?: number;
|
|
1373
|
+
readonly isNew?: boolean;
|
|
1374
|
+
readonly isDifferent?: boolean;
|
|
1375
|
+
readonly isAborted?: boolean;
|
|
1376
|
+
readonly appUrls?: { readonly batch?: string; readonly session?: string; };
|
|
1377
|
+
readonly apiUrls?: { readonly batch?: string; readonly session?: string; };
|
|
1378
|
+
readonly stepsInfo?: Array<{
|
|
1379
|
+
readonly name?: string;
|
|
1380
|
+
readonly isDifferent?: boolean;
|
|
1381
|
+
readonly hasBaselineImage?: boolean;
|
|
1382
|
+
readonly hasCurrentImage?: boolean;
|
|
1383
|
+
readonly appUrls?: { readonly step?: string; readonly stepEditor?: string; };
|
|
1384
|
+
readonly apiUrls?: {
|
|
1385
|
+
readonly baselineImage?: string;
|
|
1386
|
+
readonly currentImage?: string;
|
|
1387
|
+
readonly checkpointImage?: string;
|
|
1388
|
+
readonly checkpointImageThumbnail?: string;
|
|
1389
|
+
readonly diffImage?: string;
|
|
1390
|
+
};
|
|
1391
|
+
readonly renderId?: Array<string>;
|
|
1392
|
+
}>;
|
|
1393
|
+
readonly steps?: number;
|
|
1394
|
+
readonly matches?: number;
|
|
1395
|
+
readonly mismatches?: number;
|
|
1396
|
+
readonly missing?: number;
|
|
1397
|
+
readonly exactMatches?: number;
|
|
1398
|
+
readonly strictMatches?: number;
|
|
1399
|
+
readonly contentMatches?: number;
|
|
1400
|
+
readonly layoutMatches?: number;
|
|
1401
|
+
readonly noneMatches?: number;
|
|
1402
|
+
readonly url?: string;
|
|
1403
|
+
}; 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"; }; }; };
|
|
1344
1404
|
export class TestResultContainer implements Required<TestResultContainerPlain> {
|
|
1345
1405
|
get testResults(): TestResultsPlain;
|
|
1346
1406
|
getTestResults(): TestResults;
|
|
1347
1407
|
get exception(): Error;
|
|
1348
1408
|
getException(): Error;
|
|
1409
|
+
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"; }; };
|
|
1410
|
+
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"; }; };
|
|
1349
1411
|
}
|
|
1350
|
-
export type TestResultsSummaryPlain =
|
|
1351
|
-
|
|
1412
|
+
export type TestResultsSummaryPlain = {
|
|
1413
|
+
results: Array<TestResultContainerPlain>;
|
|
1414
|
+
passed: number;
|
|
1415
|
+
unresolved: number;
|
|
1416
|
+
failed: number;
|
|
1417
|
+
exceptions: number;
|
|
1418
|
+
mismatches: number;
|
|
1419
|
+
missing: number;
|
|
1420
|
+
matches: number;
|
|
1421
|
+
};
|
|
1422
|
+
export class TestResultsSummary implements Iterable<TestResultContainerPlain> {
|
|
1352
1423
|
getAllResults(): Array<TestResultContainer>;
|
|
1353
1424
|
[Symbol.iterator](): Iterator<TestResultContainer, any, undefined>;
|
|
1354
1425
|
}
|
|
@@ -1373,28 +1444,63 @@ export class ValidationResult implements Required<ValidationResultPlain> {
|
|
|
1373
1444
|
}
|
|
1374
1445
|
export type EyesSelector<TSelector = never> = string | TSelector | { selector: string | TSelector; type?: string; shadow?: EyesSelector<TSelector>; frame?: EyesSelector<TSelector>; };
|
|
1375
1446
|
export class Logger {
|
|
1376
|
-
constructor(options
|
|
1377
|
-
constructor(show
|
|
1447
|
+
constructor(options?: { show?: boolean; label?: string; handler?: LogHandlerPlain; });
|
|
1448
|
+
constructor(show?: boolean);
|
|
1378
1449
|
getLogHandler(): LogHandler;
|
|
1379
1450
|
setLogHandler(handler: LogHandlerPlain): void;
|
|
1380
|
-
verbose(messages: Array<any>): void;
|
|
1381
|
-
log(messages: Array<any>): void;
|
|
1382
|
-
warn(messages: Array<any>): void;
|
|
1383
|
-
error(messages: Array<any>): void;
|
|
1384
|
-
fatal(messages: Array<any>): void;
|
|
1451
|
+
verbose(...messages: Array<any>): void;
|
|
1452
|
+
log(...messages: Array<any>): void;
|
|
1453
|
+
warn(...messages: Array<any>): void;
|
|
1454
|
+
error(...messages: Array<any>): void;
|
|
1455
|
+
fatal(...messages: Array<any>): void;
|
|
1385
1456
|
open(): void;
|
|
1386
1457
|
close(): void;
|
|
1387
|
-
extend(
|
|
1458
|
+
extend(options?: Omit<{
|
|
1459
|
+
handler?: CustomLogHandlerPlain | FileLogHandlerPlain | ConsoleLogHandlerPlain | {
|
|
1460
|
+
type: "rolling file";
|
|
1461
|
+
dirname?: string;
|
|
1462
|
+
name?: string;
|
|
1463
|
+
maxFileLength?: number;
|
|
1464
|
+
maxFileNumber?: number;
|
|
1465
|
+
};
|
|
1466
|
+
format?: (message: any, options: {
|
|
1467
|
+
formatting?: boolean;
|
|
1468
|
+
label?: string;
|
|
1469
|
+
timestamp?: Date;
|
|
1470
|
+
level?: "silent" | "fatal" | "error" | "warn" | "info";
|
|
1471
|
+
tags?: Record<string, unknown>;
|
|
1472
|
+
color?: string | Array<string>;
|
|
1473
|
+
colors?: { timestamp?: string | Array<string>; level?: {
|
|
1474
|
+
silent?: string | Array<string>;
|
|
1475
|
+
fatal?: string | Array<string>;
|
|
1476
|
+
error?: string | Array<string>;
|
|
1477
|
+
warn?: string | Array<string>;
|
|
1478
|
+
info?: string | Array<string>;
|
|
1479
|
+
}; tags?: string | Array<string>; message?: string | Array<string>; };
|
|
1480
|
+
}) => string;
|
|
1481
|
+
label?: string;
|
|
1482
|
+
timestamp?: false;
|
|
1483
|
+
level?: number | ("silent" | "fatal" | "error" | "warn" | "info");
|
|
1484
|
+
colors?: boolean | { timestamp?: string | Array<string>; level?: {
|
|
1485
|
+
silent?: string | Array<string>;
|
|
1486
|
+
fatal?: string | Array<string>;
|
|
1487
|
+
error?: string | Array<string>;
|
|
1488
|
+
warn?: string | Array<string>;
|
|
1489
|
+
info?: string | Array<string>;
|
|
1490
|
+
}; tags?: string | Array<string>; message?: string | Array<string>; };
|
|
1491
|
+
console?: boolean | CustomLogHandlerPlain;
|
|
1492
|
+
}, "handler">): Logger;
|
|
1493
|
+
extend(label?: string): Logger;
|
|
1388
1494
|
}
|
|
1389
1495
|
export abstract class EyesRunner {
|
|
1390
|
-
getAllTestResults(throwErr
|
|
1496
|
+
getAllTestResults(throwErr?: boolean): Promise<TestResultsSummary>;
|
|
1391
1497
|
}
|
|
1392
1498
|
export class ClassicRunner extends EyesRunner {
|
|
1393
1499
|
}
|
|
1394
1500
|
export class VisualGridRunner extends EyesRunner {
|
|
1395
|
-
constructor(options
|
|
1396
|
-
constructor(options
|
|
1397
|
-
constructor(legacyConcurrency
|
|
1501
|
+
constructor(options?: RunnerOptionsPlain);
|
|
1502
|
+
constructor(options?: RunnerOptionsFluent);
|
|
1503
|
+
constructor(legacyConcurrency?: number);
|
|
1398
1504
|
get testConcurrency(): number;
|
|
1399
1505
|
get legacyConcurrency(): number;
|
|
1400
1506
|
getConcurrentSessions(): number;
|
|
@@ -1424,7 +1530,7 @@ export class SessionEventHandlers extends SessionEventHandler {
|
|
|
1424
1530
|
}
|
|
1425
1531
|
export class RemoteSessionEventHandler extends SessionEventHandler {
|
|
1426
1532
|
constructor(options: { serverUrl: string; accessKey?: string; timeout?: number; });
|
|
1427
|
-
constructor(serverUrl: string, accessKey
|
|
1533
|
+
constructor(serverUrl: string, accessKey?: string, timeout?: number);
|
|
1428
1534
|
get serverUrl(): string;
|
|
1429
1535
|
set serverUrl(serverUrl: string);
|
|
1430
1536
|
getServerUrl(): string;
|