@applitools/eyes 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +26 -0
- package/dist/BatchClose.js +74 -0
- package/dist/Eyes.js +716 -0
- package/dist/Logger.js +128 -0
- package/dist/Runners.js +126 -0
- package/dist/SDK.js +41 -0
- package/dist/SessionEventHandlers.js +193 -0
- package/dist/enums/AccessibilityGuidelinesVersion.js +8 -0
- package/dist/enums/AccessibilityLevel.js +8 -0
- package/dist/enums/AccessibilityRegionType.js +11 -0
- package/dist/enums/AccessibilityStatus.js +8 -0
- package/dist/enums/AndroidDeviceName.js +31 -0
- package/dist/enums/AndroidVersion.js +8 -0
- package/dist/enums/BrowserType.js +23 -0
- package/dist/enums/CorsIframeHandle.js +10 -0
- package/dist/enums/DeviceName.js +75 -0
- package/dist/enums/FailureReport.js +8 -0
- package/dist/enums/IosDeviceName.js +31 -0
- package/dist/enums/IosVersion.js +10 -0
- package/dist/enums/MatchLevel.js +14 -0
- package/dist/enums/ScreenOrientation.js +8 -0
- package/dist/enums/SessionType.js +8 -0
- package/dist/enums/StitchMode.js +11 -0
- package/dist/enums/TestResultsStatus.js +9 -0
- package/dist/errors/DiffsFoundError.js +38 -0
- package/dist/errors/EyesError.js +6 -0
- package/dist/errors/NewTestError.js +38 -0
- package/dist/errors/TestFailedError.js +46 -0
- package/dist/index.js +130 -0
- package/dist/input/AUTProxySettings.js +2 -0
- package/dist/input/AccessibilityMatchSettings.js +109 -0
- package/dist/input/AccessibilitySettings.js +2 -0
- package/dist/input/BatchInfo.js +153 -0
- package/dist/input/CheckSettings.js +547 -0
- package/dist/input/Configuration.js +1048 -0
- package/dist/input/CutProvider.js +132 -0
- package/dist/input/DebugScreenshotProvider.js +2 -0
- package/dist/input/DensityMetrics.js +2 -0
- package/dist/input/ExactMatchSettings.js +102 -0
- package/dist/input/EyesSelector.js +2 -0
- package/dist/input/FloatingMatchSettings.js +152 -0
- package/dist/input/Image.js +2 -0
- package/dist/input/ImageMatchSettings.js +271 -0
- package/dist/input/ImageRotation.js +59 -0
- package/dist/input/LazyLoadOptions.js +2 -0
- package/dist/input/Location.js +74 -0
- package/dist/input/LogHandler.js +90 -0
- package/dist/input/OCRRegion.js +2 -0
- package/dist/input/OCRSettings.js +2 -0
- package/dist/input/PropertyData.js +76 -0
- package/dist/input/ProxySettings.js +77 -0
- package/dist/input/RectangleSize.js +74 -0
- package/dist/input/Region.js +135 -0
- package/dist/input/RenderInfo.js +2 -0
- package/dist/input/RunnerOptions.js +56 -0
- package/dist/input/VisualLocatorSettings.js +2 -0
- package/dist/output/ApiUrls.js +96 -0
- package/dist/output/AppUrls.js +66 -0
- package/dist/output/MatchResult.js +66 -0
- package/dist/output/SessionUrls.js +66 -0
- package/dist/output/StepInfo.js +118 -0
- package/dist/output/TestAccessibilityStatus.js +2 -0
- package/dist/output/TestResultContainer.js +46 -0
- package/dist/output/TestResults.js +365 -0
- package/dist/output/TestResultsSummary.js +49 -0
- package/dist/output/TextRegion.js +2 -0
- package/dist/output/ValidationInfo.js +60 -0
- package/dist/output/ValidationResult.js +53 -0
- package/package.json +68 -0
- package/types/BatchClose.d.ts +23 -0
- package/types/Eyes.d.ts +245 -0
- package/types/Logger.d.ts +32 -0
- package/types/Runners.d.ts +50 -0
- package/types/SDK.d.ts +10 -0
- package/types/SessionEventHandlers.d.ts +78 -0
- package/types/enums/AccessibilityGuidelinesVersion.d.ts +5 -0
- package/types/enums/AccessibilityLevel.d.ts +5 -0
- package/types/enums/AccessibilityRegionType.d.ts +8 -0
- package/types/enums/AccessibilityStatus.d.ts +5 -0
- package/types/enums/AndroidDeviceName.d.ts +28 -0
- package/types/enums/AndroidVersion.d.ts +5 -0
- package/types/enums/BrowserType.d.ts +20 -0
- package/types/enums/CorsIframeHandle.d.ts +7 -0
- package/types/enums/DeviceName.d.ts +70 -0
- package/types/enums/FailureReport.d.ts +5 -0
- package/types/enums/IosDeviceName.d.ts +28 -0
- package/types/enums/IosVersion.d.ts +7 -0
- package/types/enums/MatchLevel.d.ts +11 -0
- package/types/enums/ScreenOrientation.d.ts +5 -0
- package/types/enums/SessionType.d.ts +5 -0
- package/types/enums/StitchMode.d.ts +8 -0
- package/types/enums/TestResultsStatus.d.ts +6 -0
- package/types/errors/DiffsFoundError.d.ts +6 -0
- package/types/errors/EyesError.d.ts +2 -0
- package/types/errors/NewTestError.d.ts +6 -0
- package/types/errors/TestFailedError.d.ts +9 -0
- package/types/index.d.ts +60 -0
- package/types/input/AUTProxySettings.d.ts +5 -0
- package/types/input/AccessibilityMatchSettings.d.ts +34 -0
- package/types/input/AccessibilitySettings.d.ts +6 -0
- package/types/input/BatchInfo.d.ts +47 -0
- package/types/input/CheckSettings.d.ts +231 -0
- package/types/input/Configuration.d.ts +368 -0
- package/types/input/CutProvider.d.ts +44 -0
- package/types/input/DebugScreenshotProvider.d.ts +5 -0
- package/types/input/DensityMetrics.d.ts +5 -0
- package/types/input/ExactMatchSettings.d.ts +34 -0
- package/types/input/EyesSelector.d.ts +6 -0
- package/types/input/FloatingMatchSettings.d.ts +50 -0
- package/types/input/Image.d.ts +11 -0
- package/types/input/ImageMatchSettings.d.ts +95 -0
- package/types/input/ImageRotation.d.ts +15 -0
- package/types/input/LazyLoadOptions.d.ts +5 -0
- package/types/input/Location.d.ts +23 -0
- package/types/input/LogHandler.d.ts +45 -0
- package/types/input/OCRRegion.d.ts +9 -0
- package/types/input/OCRSettings.d.ts +6 -0
- package/types/input/PropertyData.d.ts +23 -0
- package/types/input/ProxySettings.d.ts +25 -0
- package/types/input/RectangleSize.d.ts +23 -0
- package/types/input/Region.d.ts +46 -0
- package/types/input/RenderInfo.d.ts +37 -0
- package/types/input/RunnerOptions.d.ts +16 -0
- package/types/input/VisualLocatorSettings.d.ts +4 -0
- package/types/output/ApiUrls.d.ts +38 -0
- package/types/output/AppUrls.d.ts +23 -0
- package/types/output/MatchResult.d.ts +23 -0
- package/types/output/SessionUrls.d.ts +23 -0
- package/types/output/StepInfo.d.ts +50 -0
- package/types/output/TestAccessibilityStatus.d.ts +8 -0
- package/types/output/TestResultContainer.d.ts +31 -0
- package/types/output/TestResults.d.ts +177 -0
- package/types/output/TestResultsSummary.d.ts +18 -0
- package/types/output/TextRegion.d.ts +7 -0
- package/types/output/ValidationInfo.d.ts +21 -0
- package/types/output/ValidationResult.d.ts +18 -0
package/types/Eyes.d.ts
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type * as Core from '@applitools/core';
|
|
3
|
+
import { type SDK } from './SDK';
|
|
4
|
+
import { EyesSelector } from './input/EyesSelector';
|
|
5
|
+
import { SessionType } from './enums/SessionType';
|
|
6
|
+
import { StitchMode, StitchModeEnum } from './enums/StitchMode';
|
|
7
|
+
import { MatchLevel, MatchLevelEnum } from './enums/MatchLevel';
|
|
8
|
+
import { CheckSettingsAutomation, CheckSettingsAutomationFluent, CheckSettingsImage, CheckSettingsImageFluent } from './input/CheckSettings';
|
|
9
|
+
import { Image } from './input/Image';
|
|
10
|
+
import { OCRSettings } from './input/OCRSettings';
|
|
11
|
+
import { VisualLocatorSettings } from './input/VisualLocatorSettings';
|
|
12
|
+
import { ProxySettings, ProxySettingsData } from './input/ProxySettings';
|
|
13
|
+
import { Configuration, ConfigurationData } from './input/Configuration';
|
|
14
|
+
import { BatchInfo, BatchInfoData } from './input/BatchInfo';
|
|
15
|
+
import { RectangleSize, RectangleSizeData } from './input/RectangleSize';
|
|
16
|
+
import { Region } from './input/Region';
|
|
17
|
+
import { OCRRegion } from './input/OCRRegion';
|
|
18
|
+
import { ImageRotation, ImageRotationData } from './input/ImageRotation';
|
|
19
|
+
import { CutProviderData } from './input/CutProvider';
|
|
20
|
+
import { LogHandlerData, LogHandler } from './input/LogHandler';
|
|
21
|
+
import { TextRegion } from './output/TextRegion';
|
|
22
|
+
import { MatchResultData } from './output/MatchResult';
|
|
23
|
+
import { TestResults, TestResultsData } from './output/TestResults';
|
|
24
|
+
import { ValidationInfo } from './output/ValidationInfo';
|
|
25
|
+
import { ValidationResult } from './output/ValidationResult';
|
|
26
|
+
import { SessionEventHandler, SessionEventHandlers } from './SessionEventHandlers';
|
|
27
|
+
import { EyesRunner } from './Runners';
|
|
28
|
+
import { Logger } from './Logger';
|
|
29
|
+
export declare class Eyes<TSpec extends Core.SpecType = Core.SpecType> {
|
|
30
|
+
protected static readonly _sdk: SDK<Core.SpecType>;
|
|
31
|
+
protected get _sdk(): SDK<TSpec>;
|
|
32
|
+
private _logger;
|
|
33
|
+
private _config;
|
|
34
|
+
private _state;
|
|
35
|
+
private _runner;
|
|
36
|
+
private _driver?;
|
|
37
|
+
private _core;
|
|
38
|
+
private _eyes?;
|
|
39
|
+
private _spec?;
|
|
40
|
+
private _events;
|
|
41
|
+
private _handlers;
|
|
42
|
+
static getExecutionCloudUrl(config?: Configuration): Promise<string>;
|
|
43
|
+
static setViewportSize(driver: unknown, size: RectangleSize): Promise<void>;
|
|
44
|
+
constructor(runner?: EyesRunner, config?: Configuration<TSpec>);
|
|
45
|
+
constructor(config?: Configuration<TSpec>);
|
|
46
|
+
get logger(): Logger;
|
|
47
|
+
getLogger(): Logger;
|
|
48
|
+
get runner(): EyesRunner;
|
|
49
|
+
getRunner(): EyesRunner;
|
|
50
|
+
get driver(): TSpec['driver'];
|
|
51
|
+
getDriver(): TSpec['driver'];
|
|
52
|
+
get configuration(): Configuration<TSpec>;
|
|
53
|
+
set configuration(config: Configuration<TSpec>);
|
|
54
|
+
getConfiguration(): ConfigurationData<TSpec>;
|
|
55
|
+
setConfiguration(config: Configuration<TSpec>): void;
|
|
56
|
+
get isOpen(): boolean;
|
|
57
|
+
getIsOpen(): boolean;
|
|
58
|
+
/** @undocumented */
|
|
59
|
+
on(handler: (event: string, data?: Record<string, any>) => any): () => void;
|
|
60
|
+
/** @undocumented */
|
|
61
|
+
on(event: 'setSizeWillStart', handler: (data: {
|
|
62
|
+
viewportSize: RectangleSize;
|
|
63
|
+
}) => any): () => void;
|
|
64
|
+
/** @undocumented */
|
|
65
|
+
on(event: 'setSizeEnded', handler: () => any): () => void;
|
|
66
|
+
/** @undocumented */
|
|
67
|
+
on(event: 'initStarted', handler: () => any): () => void;
|
|
68
|
+
/** @undocumented */
|
|
69
|
+
on(event: 'initEnded', handler: () => any): () => void;
|
|
70
|
+
/** @undocumented */
|
|
71
|
+
on(event: 'testStarted', handler: (data: {
|
|
72
|
+
sessionId: string;
|
|
73
|
+
}) => any): () => void;
|
|
74
|
+
/** @undocumented */
|
|
75
|
+
on(event: 'validationWillStart', handler: (data: {
|
|
76
|
+
sessionId: string;
|
|
77
|
+
validationInfo: ValidationInfo;
|
|
78
|
+
}) => any): () => void;
|
|
79
|
+
/** @undocumented */
|
|
80
|
+
on(event: 'validationEnded', handler: (data: {
|
|
81
|
+
sessionId: string;
|
|
82
|
+
validationId: number;
|
|
83
|
+
validationResult: ValidationResult;
|
|
84
|
+
}) => any): () => void;
|
|
85
|
+
/** @undocumented */
|
|
86
|
+
on(event: 'testEnded', handler: (data: {
|
|
87
|
+
sessionId: string;
|
|
88
|
+
testResults: TestResults;
|
|
89
|
+
}) => any): () => void;
|
|
90
|
+
/** @undocumented */
|
|
91
|
+
off(event: string): void;
|
|
92
|
+
/** @undocumented */
|
|
93
|
+
off(handler: (...args: any[]) => any): void;
|
|
94
|
+
getExecutionCloudUrl(): Promise<string>;
|
|
95
|
+
open(driver: TSpec['driver'], config?: Configuration<TSpec>): Promise<TSpec['driver']>;
|
|
96
|
+
open(driver: TSpec['driver'], appName?: string, testName?: string, viewportSize?: RectangleSize, sessionType?: SessionType): Promise<TSpec['driver']>;
|
|
97
|
+
open(config?: Configuration<TSpec>): Promise<void>;
|
|
98
|
+
open(appName?: string, testName?: string, viewportSize?: RectangleSize, sessionType?: SessionType): Promise<void>;
|
|
99
|
+
check(name: string, checkSettings: CheckSettingsImageFluent | CheckSettingsAutomationFluent<TSpec>): Promise<MatchResultData>;
|
|
100
|
+
check(target: Image, checkSettings?: CheckSettingsImage): Promise<MatchResultData>;
|
|
101
|
+
check(checkSettings?: CheckSettingsAutomation<TSpec>): Promise<MatchResultData>;
|
|
102
|
+
/** @deprecated */
|
|
103
|
+
checkWindow(name?: string, timeout?: number, fully?: boolean): Promise<MatchResultData>;
|
|
104
|
+
/** @deprecated */
|
|
105
|
+
checkFrame(element: TSpec['element'] | EyesSelector<TSpec['selector']> | string | number, timeout?: number, name?: string): Promise<MatchResultData>;
|
|
106
|
+
/** @deprecated */
|
|
107
|
+
checkElement(element: TSpec['element'], timeout?: number, name?: string): Promise<MatchResultData>;
|
|
108
|
+
/** @deprecated */
|
|
109
|
+
checkElementBy(selector: EyesSelector<TSpec['selector']>, timeout?: number, name?: string): Promise<MatchResultData>;
|
|
110
|
+
/** @deprecated */
|
|
111
|
+
checkRegion(region: Region, name?: string, timeout?: number): Promise<MatchResultData>;
|
|
112
|
+
/** @deprecated */
|
|
113
|
+
checkRegion(image: Buffer | URL | string, region: Region, name?: string, ignoreMismatch?: boolean): Promise<MatchResultData>;
|
|
114
|
+
/** @deprecated */
|
|
115
|
+
checkRegionByElement(element: TSpec['element'], name?: string, timeout?: number): Promise<MatchResultData>;
|
|
116
|
+
/** @deprecated */
|
|
117
|
+
checkRegionBy(selector: EyesSelector<TSpec['selector']>, name?: string, timeout?: number, fully?: boolean): Promise<MatchResultData>;
|
|
118
|
+
/** @deprecated */
|
|
119
|
+
checkRegionInFrame(frame: TSpec['element'] | EyesSelector<TSpec['selector']> | string | number, selector: EyesSelector<TSpec['selector']>, timeout?: number, name?: string, fully?: boolean): Promise<MatchResultData>;
|
|
120
|
+
/** @deprecated */
|
|
121
|
+
checkImage(image: Buffer | URL | string, name?: string, ignoreMismatch?: boolean): Promise<MatchResultData>;
|
|
122
|
+
locate<TLocator extends string>(settings: VisualLocatorSettings<TLocator>): Promise<Record<TLocator, Region[]>>;
|
|
123
|
+
extractTextRegions<TPattern extends string>(target: Core.ImageTarget, settings: OCRSettings<TPattern>): Promise<Record<TPattern, TextRegion[]>>;
|
|
124
|
+
/** @deprecated */
|
|
125
|
+
extractTextRegions<TPattern extends string>(settingsWithImage: OCRSettings<TPattern> & {
|
|
126
|
+
image: Core.ImageTarget['image'];
|
|
127
|
+
}): Promise<Record<TPattern, TextRegion[]>>;
|
|
128
|
+
extractTextRegions<TPattern extends string>(settings: OCRSettings<TPattern>): Promise<Record<TPattern, TextRegion[]>>;
|
|
129
|
+
extractText(target: Core.ImageTarget, settings: OCRRegion<TSpec>[]): Promise<string[]>;
|
|
130
|
+
/** @deprecated */
|
|
131
|
+
extractText(settingsWithImage: (OCRRegion<never> & {
|
|
132
|
+
image: Core.ImageTarget['image'];
|
|
133
|
+
})[]): Promise<string[]>;
|
|
134
|
+
extractText(settings: OCRRegion<TSpec>[]): Promise<string[]>;
|
|
135
|
+
close(throwErr?: boolean): Promise<TestResultsData>;
|
|
136
|
+
closeAsync(): Promise<void>;
|
|
137
|
+
abort(): Promise<TestResultsData>;
|
|
138
|
+
abortAsync(): Promise<void>;
|
|
139
|
+
/** @deprecated */
|
|
140
|
+
abortIfNotClosed(): Promise<TestResults>;
|
|
141
|
+
getViewportSize(): Promise<RectangleSizeData>;
|
|
142
|
+
setViewportSize(size: RectangleSize): Promise<void>;
|
|
143
|
+
getScrollRootElement(): TSpec['element'] | EyesSelector<TSpec['selector']>;
|
|
144
|
+
setScrollRootElement(scrollRootElement: TSpec['element'] | EyesSelector<TSpec['selector']>): void;
|
|
145
|
+
setLogHandler(handler: LogHandlerData | LogHandler): void;
|
|
146
|
+
getLogHandler(): LogHandlerData;
|
|
147
|
+
setCutProvider(cutProvider: CutProviderData): void;
|
|
148
|
+
setImageCut(cutProvider: CutProviderData): void;
|
|
149
|
+
getIsCutProviderExplicitlySet(): boolean;
|
|
150
|
+
getRotation(): ImageRotationData;
|
|
151
|
+
setRotation(rotation: ImageRotation | ImageRotationData): void;
|
|
152
|
+
getScaleRatio(): number;
|
|
153
|
+
setScaleRatio(scaleRatio: number): void;
|
|
154
|
+
getSaveDebugScreenshots(): boolean;
|
|
155
|
+
setSaveDebugScreenshots(save: boolean): void;
|
|
156
|
+
getDebugScreenshotsPath(): string;
|
|
157
|
+
setDebugScreenshotsPath(path: string): void;
|
|
158
|
+
getDebugScreenshotsPrefix(): string;
|
|
159
|
+
setDebugScreenshotsPrefix(prefix: string): void;
|
|
160
|
+
addProperty(name: string, value: string): ConfigurationData<TSpec>;
|
|
161
|
+
clearProperties(): ConfigurationData<TSpec>;
|
|
162
|
+
getBatch(): BatchInfoData;
|
|
163
|
+
setBatch(batch: BatchInfo): void;
|
|
164
|
+
setBatch(name: string, id?: string, startedAt?: Date | string): void;
|
|
165
|
+
getApiKey(): string;
|
|
166
|
+
setApiKey(apiKey: string): void;
|
|
167
|
+
getTestName(): string;
|
|
168
|
+
setTestName(testName: string): void;
|
|
169
|
+
getAppName(): string;
|
|
170
|
+
setAppName(appName: string): void;
|
|
171
|
+
getBaselineBranchName(): string;
|
|
172
|
+
setBaselineBranchName(baselineBranchName: string): void;
|
|
173
|
+
/** @deprecated */
|
|
174
|
+
getBaselineName(): string;
|
|
175
|
+
/** @deprecated */
|
|
176
|
+
setBaselineName(baselineName: string): void;
|
|
177
|
+
getBaselineEnvName(): string;
|
|
178
|
+
setBaselineEnvName(baselineEnvName: string): void;
|
|
179
|
+
getBranchName(): string;
|
|
180
|
+
setBranchName(branchName: string): void;
|
|
181
|
+
getHostApp(): string;
|
|
182
|
+
setHostApp(hostApp: string): void;
|
|
183
|
+
getHostOS(): string;
|
|
184
|
+
setHostOS(hostOS: string): void;
|
|
185
|
+
getHostAppInfo(): string;
|
|
186
|
+
setHostAppInfo(hostAppInfo: string): void;
|
|
187
|
+
getHostOSInfo(): string;
|
|
188
|
+
setHostOSInfo(hostOSInfo: string): void;
|
|
189
|
+
getDeviceInfo(): string;
|
|
190
|
+
setDeviceInfo(deviceInfo: string): void;
|
|
191
|
+
setIgnoreCaret(ignoreCaret: boolean): void;
|
|
192
|
+
getIgnoreCaret(): boolean;
|
|
193
|
+
getIsDisabled(): boolean;
|
|
194
|
+
setIsDisabled(isDisabled: boolean): void;
|
|
195
|
+
getMatchLevel(): MatchLevelEnum;
|
|
196
|
+
setMatchLevel(matchLevel: MatchLevel): void;
|
|
197
|
+
getMatchTimeout(): number;
|
|
198
|
+
setMatchTimeout(matchTimeout: number): void;
|
|
199
|
+
getParentBranchName(): string;
|
|
200
|
+
setParentBranchName(parentBranchName: string): void;
|
|
201
|
+
setProxy(proxy: ProxySettings): void;
|
|
202
|
+
setProxy(url: string, username?: string, password?: string, isHttpOnly?: boolean): void;
|
|
203
|
+
setProxy(isEnabled: false): void;
|
|
204
|
+
getProxy(): ProxySettingsData;
|
|
205
|
+
getSaveDiffs(): boolean;
|
|
206
|
+
setSaveDiffs(saveDiffs: boolean): void;
|
|
207
|
+
getSaveNewTests(): boolean;
|
|
208
|
+
setSaveNewTests(saveNewTests: boolean): void;
|
|
209
|
+
getServerUrl(): string;
|
|
210
|
+
setServerUrl(serverUrl: string): void;
|
|
211
|
+
getSendDom(): boolean;
|
|
212
|
+
setSendDom(sendDom: boolean): void;
|
|
213
|
+
getHideCaret(): boolean;
|
|
214
|
+
setHideCaret(hideCaret: boolean): void;
|
|
215
|
+
getHideScrollbars(): boolean;
|
|
216
|
+
setHideScrollbars(hideScrollbars: boolean): void;
|
|
217
|
+
getForceFullPageScreenshot(): boolean;
|
|
218
|
+
setForceFullPageScreenshot(forceFullPageScreenshot: boolean): void;
|
|
219
|
+
getWaitBeforeScreenshots(): number;
|
|
220
|
+
setWaitBeforeScreenshots(waitBeforeScreenshots: number): void;
|
|
221
|
+
getStitchMode(): StitchModeEnum;
|
|
222
|
+
setStitchMode(stitchMode: StitchMode): void;
|
|
223
|
+
getStitchOverlap(): number;
|
|
224
|
+
setStitchOverlap(stitchOverlap: number): void;
|
|
225
|
+
/**
|
|
226
|
+
* @undocumented
|
|
227
|
+
* @deprecated
|
|
228
|
+
*/
|
|
229
|
+
getSessionEventHandlers(): SessionEventHandlers;
|
|
230
|
+
/**
|
|
231
|
+
* @undocumented
|
|
232
|
+
* @deprecated
|
|
233
|
+
*/
|
|
234
|
+
addSessionEventHandler(handler: SessionEventHandler): void;
|
|
235
|
+
/**
|
|
236
|
+
* @undocumented
|
|
237
|
+
* @deprecated
|
|
238
|
+
*/
|
|
239
|
+
removeSessionEventHandler(handler: SessionEventHandler): void;
|
|
240
|
+
/**
|
|
241
|
+
* @undocumented
|
|
242
|
+
* @deprecated
|
|
243
|
+
*/
|
|
244
|
+
clearSessionEventHandlers(): void;
|
|
245
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type * as logger from '@applitools/logger';
|
|
2
|
+
import { LogHandler, LogHandlerData, FileLogHandlerData, ConsoleLogHandlerData } from './input/LogHandler';
|
|
3
|
+
export declare class Logger {
|
|
4
|
+
private _logger?;
|
|
5
|
+
private _options;
|
|
6
|
+
private _makeLogger;
|
|
7
|
+
/** @internal */
|
|
8
|
+
readonly isLogger = true;
|
|
9
|
+
/** @internal */
|
|
10
|
+
constructor(logger?: logger.Logger);
|
|
11
|
+
constructor(options?: {
|
|
12
|
+
show?: boolean;
|
|
13
|
+
label?: string;
|
|
14
|
+
handler?: LogHandler;
|
|
15
|
+
});
|
|
16
|
+
constructor(show?: boolean);
|
|
17
|
+
/** @internal */
|
|
18
|
+
getLogger(): logger.Logger;
|
|
19
|
+
getLogHandler(): LogHandlerData | ConsoleLogHandlerData | FileLogHandlerData;
|
|
20
|
+
setLogHandler(handler: LogHandler): void;
|
|
21
|
+
verbose(...messages: any[]): void;
|
|
22
|
+
log(...messages: any[]): void;
|
|
23
|
+
warn(...messages: any[]): void;
|
|
24
|
+
error(...messages: any[]): void;
|
|
25
|
+
fatal(...messages: any[]): void;
|
|
26
|
+
open(): void;
|
|
27
|
+
close(): void;
|
|
28
|
+
tag(name: string, value: any): void;
|
|
29
|
+
/** @internal */
|
|
30
|
+
extend(options?: logger.ExtendOptions): Logger;
|
|
31
|
+
extend(label?: string): Logger;
|
|
32
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type * as Core from '@applitools/core';
|
|
2
|
+
import { type Logger } from '@applitools/logger';
|
|
3
|
+
import { RunnerOptions, RunnerOptionsFluent } from './input/RunnerOptions';
|
|
4
|
+
import { TestResultsSummaryData } from './output/TestResultsSummary';
|
|
5
|
+
import { Eyes } from './Eyes';
|
|
6
|
+
export declare abstract class EyesRunner {
|
|
7
|
+
private _core?;
|
|
8
|
+
private _manager?;
|
|
9
|
+
private _eyes;
|
|
10
|
+
/** @internal */
|
|
11
|
+
abstract get config(): {
|
|
12
|
+
type: 'classic' | 'ufg';
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
attach<TSpec extends Core.SpecType = Core.SpecType>(eyes: Eyes<TSpec>, core: Core.Core<TSpec, 'classic' | 'ufg'>): void;
|
|
16
|
+
/** @internal */
|
|
17
|
+
openEyes<TSpec extends Core.SpecType = Core.SpecType>(options: {
|
|
18
|
+
target: TSpec['driver'];
|
|
19
|
+
config?: Core.Config<TSpec, 'classic' | 'ufg'>;
|
|
20
|
+
logger?: Logger;
|
|
21
|
+
on?: (name: string, data?: Record<string, any>) => void;
|
|
22
|
+
}): Promise<Core.Eyes<TSpec, 'classic' | 'ufg'>>;
|
|
23
|
+
getAllTestResults(throwErr?: boolean): Promise<TestResultsSummaryData>;
|
|
24
|
+
}
|
|
25
|
+
export declare class VisualGridRunner extends EyesRunner {
|
|
26
|
+
private _testConcurrency?;
|
|
27
|
+
private _legacyConcurrency?;
|
|
28
|
+
constructor(options?: RunnerOptions);
|
|
29
|
+
/** @deprecated */
|
|
30
|
+
constructor(options?: RunnerOptionsFluent);
|
|
31
|
+
/** @deprecated */
|
|
32
|
+
constructor(legacyConcurrency?: number);
|
|
33
|
+
/** @internal */
|
|
34
|
+
get config(): {
|
|
35
|
+
type: "ufg";
|
|
36
|
+
concurrency: number | undefined;
|
|
37
|
+
legacyConcurrency: number | undefined;
|
|
38
|
+
};
|
|
39
|
+
get testConcurrency(): number | undefined;
|
|
40
|
+
/** @deprecated */
|
|
41
|
+
get legacyConcurrency(): number | undefined;
|
|
42
|
+
/** @deprecated */
|
|
43
|
+
getConcurrentSessions(): number | undefined;
|
|
44
|
+
}
|
|
45
|
+
export declare class ClassicRunner extends EyesRunner {
|
|
46
|
+
/** @internal */
|
|
47
|
+
get config(): {
|
|
48
|
+
type: "classic";
|
|
49
|
+
};
|
|
50
|
+
}
|
package/types/SDK.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { makeCore as makeDefaultCore, type Core, type SpecType, type SpecDriver } from '@applitools/core';
|
|
2
|
+
export interface SDK<TSpec extends SpecType = SpecType> {
|
|
3
|
+
agentId?: string;
|
|
4
|
+
spec?: SpecDriver<TSpec>;
|
|
5
|
+
makeCore?: typeof makeDefaultCore;
|
|
6
|
+
}
|
|
7
|
+
export declare function initSDK<TSpec extends SpecType = SpecType>(options?: SDK<TSpec>): {
|
|
8
|
+
core: Core<TSpec, 'classic' | 'ufg'>;
|
|
9
|
+
spec?: SpecDriver<TSpec>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { Eyes } from './Eyes';
|
|
2
|
+
import { RectangleSizeData } from './input/RectangleSize';
|
|
3
|
+
import { TestResultsData } from './output/TestResults';
|
|
4
|
+
import { ValidationInfoData } from './output/ValidationInfo';
|
|
5
|
+
import { ValidationResultData } from './output/ValidationResult';
|
|
6
|
+
/** @deprecated */
|
|
7
|
+
export declare abstract class SessionEventHandler {
|
|
8
|
+
abstract initStarted(): any;
|
|
9
|
+
abstract initEnded(): any;
|
|
10
|
+
abstract setSizeWillStart(viewportSize: RectangleSizeData): any;
|
|
11
|
+
abstract setSizeEnded(): any;
|
|
12
|
+
abstract testStarted(sessionId: string): any;
|
|
13
|
+
abstract testEnded(sessionId: string, testResults: TestResultsData): any;
|
|
14
|
+
abstract validationWillStart(sessionId: string, validationInfo: ValidationInfoData): any;
|
|
15
|
+
abstract validationEnded(sessionId: string, validationId: number, validationResult: ValidationResultData): any;
|
|
16
|
+
private _detach?;
|
|
17
|
+
/** @internal */
|
|
18
|
+
attach(eyes: Eyes): void;
|
|
19
|
+
/** @internal */
|
|
20
|
+
detach(): void;
|
|
21
|
+
}
|
|
22
|
+
/** @deprecated */
|
|
23
|
+
export declare class SessionEventHandlers extends SessionEventHandler {
|
|
24
|
+
private _handlers;
|
|
25
|
+
addEventHandler(handler: SessionEventHandler): void;
|
|
26
|
+
removeEventHandler(handler: SessionEventHandler): void;
|
|
27
|
+
clearEventHandlers(): void;
|
|
28
|
+
initStarted(): void;
|
|
29
|
+
initEnded(): void;
|
|
30
|
+
setSizeWillStart(viewportSize: RectangleSizeData): void;
|
|
31
|
+
setSizeEnded(): void;
|
|
32
|
+
testStarted(sessionId: string): void;
|
|
33
|
+
testEnded(sessionId: string, testResults: TestResultsData): void;
|
|
34
|
+
validationWillStart(sessionId: string, validationInfo: ValidationInfoData): void;
|
|
35
|
+
validationEnded(sessionId: string, validationId: number, validationResult: ValidationResultData): void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @undocumented
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
41
|
+
export declare class RemoteSessionEventHandler extends SessionEventHandler {
|
|
42
|
+
private _serverUrl;
|
|
43
|
+
private _accessKey?;
|
|
44
|
+
private _timeout?;
|
|
45
|
+
constructor(options: {
|
|
46
|
+
serverUrl: string;
|
|
47
|
+
accessKey?: string;
|
|
48
|
+
timeout?: number;
|
|
49
|
+
});
|
|
50
|
+
constructor(serverUrl: string, accessKey?: string, timeout?: number);
|
|
51
|
+
get serverUrl(): string;
|
|
52
|
+
set serverUrl(serverUrl: string);
|
|
53
|
+
getServerUrl(): string;
|
|
54
|
+
setServerUrl(serverUrl: string): void;
|
|
55
|
+
get accessKey(): string | undefined;
|
|
56
|
+
set accessKey(accessKey: string | undefined);
|
|
57
|
+
getAccessKey(): string | undefined;
|
|
58
|
+
setAccessKey(accessKey: string): void;
|
|
59
|
+
get timeout(): number | undefined;
|
|
60
|
+
set timeout(timeout: number | undefined);
|
|
61
|
+
setTimeout(timeout: number): void;
|
|
62
|
+
getTimeout(): number | undefined;
|
|
63
|
+
initStarted(): void;
|
|
64
|
+
initEnded(): void;
|
|
65
|
+
setSizeWillStart(): void;
|
|
66
|
+
setSizeEnded(): void;
|
|
67
|
+
testStarted(): void;
|
|
68
|
+
testEnded(): void;
|
|
69
|
+
validationWillStart(): void;
|
|
70
|
+
validationEnded(): void;
|
|
71
|
+
/** @internal */
|
|
72
|
+
toJSON(): {
|
|
73
|
+
serverUrl: string;
|
|
74
|
+
accessKey?: string;
|
|
75
|
+
};
|
|
76
|
+
/** @internal */
|
|
77
|
+
toString(): string;
|
|
78
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare enum AccessibilityRegionTypeEnum {
|
|
2
|
+
IgnoreContrast = "IgnoreContrast",
|
|
3
|
+
RegularText = "RegularText",
|
|
4
|
+
LargeText = "LargeText",
|
|
5
|
+
BoldText = "BoldText",
|
|
6
|
+
GraphicalObject = "GraphicalObject"
|
|
7
|
+
}
|
|
8
|
+
export type AccessibilityRegionType = `${AccessibilityRegionTypeEnum}`;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum AndroidDeviceNameEnum {
|
|
2
|
+
Pixel_3_XL = "Pixel 3 XL",
|
|
3
|
+
Pixel_4 = "Pixel 4",
|
|
4
|
+
Pixel_4_XL = "Pixel 4 XL",
|
|
5
|
+
Pixel_5 = "Pixel 5",
|
|
6
|
+
Pixel_6 = "Pixel 6",
|
|
7
|
+
Galaxy_S10 = "Galaxy S10",
|
|
8
|
+
Galaxy_S10_Plus = "Galaxy S10 Plus",
|
|
9
|
+
Galaxy_Note_10 = "Galaxy Note 10",
|
|
10
|
+
Galaxy_Note_10_Plus = "Galaxy Note 10 Plus",
|
|
11
|
+
Galaxy_S20 = "Galaxy S20",
|
|
12
|
+
Galaxy_S20_Plus = "Galaxy S20 Plus",
|
|
13
|
+
Galaxy_S21 = "Galaxy S21",
|
|
14
|
+
Galaxy_S21_Plus = "Galaxy S21 Plus",
|
|
15
|
+
Galaxy_S21_Ultra = "Galaxy S21 Ultra",
|
|
16
|
+
Galaxy_S22 = "Galaxy S22",
|
|
17
|
+
Galaxy_S22_Plus = "Galaxy S22 Plus",
|
|
18
|
+
Galaxy_Tab_S7 = "Galaxy Tab S7",
|
|
19
|
+
Galaxy_Tab_S8 = "Galaxy Tab S8",
|
|
20
|
+
Xiaomi_Redmi_Note_10_JE = "Xiaomi Redmi Note 10 JE",
|
|
21
|
+
Xiaomi_Redmi_Note_11 = "Xiaomi Redmi Note 11",
|
|
22
|
+
Xiaomi_Redmi_Note_11_Pro = "Xiaomi Redmi Note 11 Pro",
|
|
23
|
+
Sony_Xperia_1_II = "Sony Xperia 1 II",
|
|
24
|
+
Sony_Xperia_10_II = "Sony Xperia 10 II",
|
|
25
|
+
Sony_Xperia_Ace_II = "Sony Xperia Ace II",
|
|
26
|
+
Huawei_P30_Lite = "Huawei P30 Lite"
|
|
27
|
+
}
|
|
28
|
+
export type AndroidDeviceName = `${AndroidDeviceNameEnum}`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum BrowserTypeEnum {
|
|
2
|
+
CHROME = "chrome",
|
|
3
|
+
CHROME_ONE_VERSION_BACK = "chrome-one-version-back",
|
|
4
|
+
CHROME_TWO_VERSIONS_BACK = "chrome-two-versions-back",
|
|
5
|
+
FIREFOX = "firefox",
|
|
6
|
+
FIREFOX_ONE_VERSION_BACK = "firefox-one-version-back",
|
|
7
|
+
FIREFOX_TWO_VERSIONS_BACK = "firefox-two-versions-back",
|
|
8
|
+
IE_11 = "ie",
|
|
9
|
+
IE_10 = "ie10",
|
|
10
|
+
EDGE = "edge",
|
|
11
|
+
EDGE_CHROMIUM = "edgechromium",
|
|
12
|
+
EDGE_LEGACY = "edgelegacy",
|
|
13
|
+
EDGE_CHROMIUM_ONE_VERSION_BACK = "edgechromium-one-version-back",
|
|
14
|
+
EDGE_CHROMIUM_TWO_VERSIONS_BACK = "edgechromium-two-versions-back",
|
|
15
|
+
SAFARI = "safari",
|
|
16
|
+
SAFARI_EARLY_ACCESS = "safari-earlyaccess",
|
|
17
|
+
SAFARI_ONE_VERSION_BACK = "safari-one-version-back",
|
|
18
|
+
SAFARI_TWO_VERSIONS_BACK = "safari-two-versions-back"
|
|
19
|
+
}
|
|
20
|
+
export type BrowserType = `${BrowserTypeEnum}`;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare enum DeviceNameEnum {
|
|
2
|
+
Blackberry_PlayBook = "Blackberry PlayBook",
|
|
3
|
+
BlackBerry_Z30 = "BlackBerry Z30",
|
|
4
|
+
Galaxy_A5 = "Galaxy A5",
|
|
5
|
+
Galaxy_Note_10 = "Galaxy Note 10",
|
|
6
|
+
Galaxy_Note_10_Plus = "Galaxy Note 10 Plus",
|
|
7
|
+
Galaxy_Note_2 = "Galaxy Note 2",
|
|
8
|
+
Galaxy_Note_3 = "Galaxy Note 3",
|
|
9
|
+
Galaxy_Note_4 = "Galaxy Note 4",
|
|
10
|
+
Galaxy_Note_8 = "Galaxy Note 8",
|
|
11
|
+
Galaxy_Note_9 = "Galaxy Note 9",
|
|
12
|
+
Galaxy_S3 = "Galaxy S3",
|
|
13
|
+
Galaxy_S5 = "Galaxy S5",
|
|
14
|
+
Galaxy_S8 = "Galaxy S8",
|
|
15
|
+
Galaxy_S8_Plus = "Galaxy S8 Plus",
|
|
16
|
+
Galaxy_S9 = "Galaxy S9",
|
|
17
|
+
Galaxy_S9_Plus = "Galaxy S9 Plus",
|
|
18
|
+
Galaxy_S10 = "Galaxy S10",
|
|
19
|
+
Galaxy_S10_Plus = "Galaxy S10 Plus",
|
|
20
|
+
Galaxy_S20 = "Galaxy S20",
|
|
21
|
+
Galaxy_S22 = "Galaxy S22",
|
|
22
|
+
Galaxy_Tab_S7 = "Galaxy Tab S7",
|
|
23
|
+
iPad = "iPad",
|
|
24
|
+
iPad_6th_Gen = "iPad 6th Gen",
|
|
25
|
+
iPad_7th_Gen = "iPad 7th Gen",
|
|
26
|
+
iPad_Air_2 = "iPad Air 2",
|
|
27
|
+
iPad_Mini = "iPad Mini",
|
|
28
|
+
iPad_Pro = "iPad Pro",
|
|
29
|
+
iPhone_11 = "iPhone 11",
|
|
30
|
+
iPhone_11_Pro = "iPhone 11 Pro",
|
|
31
|
+
iPhone_11_Pro_Max = "iPhone 11 Pro Max",
|
|
32
|
+
iPhone_4 = "iPhone 4",
|
|
33
|
+
iPhone_5SE = "iPhone 5/SE",
|
|
34
|
+
iPhone_6_7_8 = "iPhone 6/7/8",
|
|
35
|
+
iPhone_6_7_8_Plus = "iPhone 6/7/8 Plus",
|
|
36
|
+
iPhone_X = "iPhone X",
|
|
37
|
+
iPhone_XR = "iPhone XR",
|
|
38
|
+
iPhone_XS = "iPhone XS",
|
|
39
|
+
iPhone_XS_Max = "iPhone XS Max",
|
|
40
|
+
Kindle_Fire_HDX = "Kindle Fire HDX",
|
|
41
|
+
Laptop_with_HiDPI_screen = "Laptop with HiDPI screen",
|
|
42
|
+
Laptop_with_MDPI_screen = "Laptop with MDPI screen",
|
|
43
|
+
Laptop_with_touch = "Laptop with touch",
|
|
44
|
+
LG_G6 = "LG G6",
|
|
45
|
+
LG_Optimus_L70 = "LG Optimus L70",
|
|
46
|
+
Microsoft_Lumia_550 = "Microsoft Lumia 550",
|
|
47
|
+
Microsoft_Lumia_950 = "Microsoft Lumia 950",
|
|
48
|
+
Nexus_10 = "Nexus 10",
|
|
49
|
+
Nexus_4 = "Nexus 4",
|
|
50
|
+
Nexus_5 = "Nexus 5",
|
|
51
|
+
Nexus_5X = "Nexus 5X",
|
|
52
|
+
Nexus_6 = "Nexus 6",
|
|
53
|
+
Nexus_6P = "Nexus 6P",
|
|
54
|
+
Nexus_7 = "Nexus 7",
|
|
55
|
+
Nokia_Lumia_520 = "Nokia Lumia 520",
|
|
56
|
+
Nokia_N9 = "Nokia N9",
|
|
57
|
+
OnePlus_7T = "OnePlus 7T",
|
|
58
|
+
OnePlus_7T_Pro = "OnePlus 7T Pro",
|
|
59
|
+
Pixel_2 = "Pixel 2",
|
|
60
|
+
Pixel_2_XL = "Pixel 2 XL",
|
|
61
|
+
Pixel_3 = "Pixel 3",
|
|
62
|
+
Pixel_3_XL = "Pixel 3 XL",
|
|
63
|
+
Pixel_4 = "Pixel 4",
|
|
64
|
+
Pixel_4_XL = "Pixel 4 XL",
|
|
65
|
+
Pixel_5 = "Pixel 5",
|
|
66
|
+
Sony_Xperia_10_II = "Sony Xperia 10 II",
|
|
67
|
+
Huawei_Mate_50_Pro = "Huawei Mate 50 Pro",
|
|
68
|
+
Huawei_Matepad_11 = "Huawei Matepad 11"
|
|
69
|
+
}
|
|
70
|
+
export type DeviceName = `${DeviceNameEnum}`;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum IosDeviceNameEnum {
|
|
2
|
+
iPhone_14_Pro_Max = "iPhone 14 Pro Max",
|
|
3
|
+
iPhone_14 = "iPhone 14",
|
|
4
|
+
iPhone_13_Pro_Max = "iPhone 13 Pro Max",
|
|
5
|
+
iPhone_13_Pro = "iPhone 13 Pro",
|
|
6
|
+
iPhone_13 = "iPhone 13",
|
|
7
|
+
iPhone_12_Pro_Max = "iPhone 12 Pro Max",
|
|
8
|
+
iPhone_12_Pro = "iPhone 12 Pro",
|
|
9
|
+
iPhone_12 = "iPhone 12",
|
|
10
|
+
iPhone_12_mini = "iPhone 12 mini",
|
|
11
|
+
iPhone_11_Pro = "iPhone 11 Pro",
|
|
12
|
+
iPhone_11_Pro_Max = "iPhone 11 Pro Max",
|
|
13
|
+
iPhone_11 = "iPhone 11",
|
|
14
|
+
iPhone_XR = "iPhone XR",
|
|
15
|
+
iPhone_XS = "iPhone Xs",
|
|
16
|
+
iPhone_X = "iPhone X",
|
|
17
|
+
iPhone_8 = "iPhone 8",
|
|
18
|
+
iPhone_8_Plus = "iPhone 8 Plus",
|
|
19
|
+
iPhone_7 = "iPhone 7",
|
|
20
|
+
iPhone_SE = "iPhone SE (1st generation)",
|
|
21
|
+
iPad_Pro_3 = "iPad Pro (12.9-inch) (3rd generation)",
|
|
22
|
+
iPad_Pro_4 = "iPad Pro (11-inch) (4th generation)",
|
|
23
|
+
iPad_7 = "iPad (7th generation)",
|
|
24
|
+
iPad_9 = "iPad (9th generation)",
|
|
25
|
+
iPad_Air_2 = "iPad Air (2nd generation)",
|
|
26
|
+
iPad_Air_4 = "iPad Air (4th generation)"
|
|
27
|
+
}
|
|
28
|
+
export type IosDeviceName = `${IosDeviceNameEnum}`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum MatchLevelEnum {
|
|
2
|
+
None = "None",
|
|
3
|
+
LegacyLayout = "Layout1",
|
|
4
|
+
Layout = "Layout",
|
|
5
|
+
Layout2 = "Layout2",
|
|
6
|
+
Content = "Content",
|
|
7
|
+
IgnoreColors = "IgnoreColors",
|
|
8
|
+
Strict = "Strict",
|
|
9
|
+
Exact = "Exact"
|
|
10
|
+
}
|
|
11
|
+
export type MatchLevel = `${MatchLevelEnum}`;
|