@applitools/eyes 1.33.3 → 1.34.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/CHANGELOG.md +96 -0
- package/dist/BatchClose.js +84 -0
- package/dist/Eyes.js +750 -0
- package/dist/Logger.js +122 -0
- package/dist/Runners.js +130 -0
- package/dist/SDK.js +45 -0
- package/dist/SessionEventHandlers.js +193 -0
- package/dist/cli/cli.js +56 -0
- package/dist/cli/load-config.js +73 -0
- package/dist/enums/AccessibilityGuidelinesVersion.js +9 -0
- package/dist/enums/AccessibilityLevel.js +9 -0
- package/dist/enums/AccessibilityRegionType.js +12 -0
- package/dist/enums/AccessibilityStatus.js +9 -0
- package/dist/enums/BrowserType.js +23 -0
- package/dist/enums/CorsIframeHandle.js +10 -0
- package/dist/enums/DeviceName.js +105 -0
- package/dist/enums/DynamicTextType.js +13 -0
- package/dist/enums/FailureReport.js +8 -0
- package/dist/enums/IosDeviceName.js +47 -0
- package/dist/enums/IosMultiDeviceTarget.js +30 -0
- package/dist/enums/IosVersion.js +10 -0
- package/dist/enums/MatchLevel.js +15 -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 +47 -0
- package/dist/index.js +128 -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 +702 -0
- package/dist/input/Configuration.js +1179 -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/LatestCommitInfo.js +2 -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 +102 -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 +49 -0
- package/dist/output/TestResults.js +378 -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 +4 -3
- package/types/BatchClose.d.ts +23 -0
- package/types/Eyes.d.ts +255 -0
- package/types/Logger.d.ts +30 -0
- package/types/Runners.d.ts +41 -0
- package/types/SDK.d.ts +20 -0
- package/types/SessionEventHandlers.d.ts +78 -0
- package/types/cli/cli.d.ts +2 -0
- package/types/cli/load-config.d.ts +1 -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/BrowserType.d.ts +20 -0
- package/types/enums/CorsIframeHandle.d.ts +7 -0
- package/types/enums/DeviceName.d.ts +101 -0
- package/types/enums/DynamicTextType.d.ts +9 -0
- package/types/enums/FailureReport.d.ts +5 -0
- package/types/enums/IosDeviceName.d.ts +43 -0
- package/types/enums/IosMultiDeviceTarget.d.ts +26 -0
- package/types/enums/IosVersion.d.ts +7 -0
- package/types/enums/MatchLevel.d.ts +12 -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 +280 -0
- package/types/input/Configuration.d.ts +437 -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/LatestCommitInfo.d.ts +4 -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 +47 -0
- package/types/input/RunnerOptions.d.ts +21 -0
- package/types/input/VisualLocatorSettings.d.ts +4 -0
- package/types/output/ApiUrls.d.ts +41 -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 +186 -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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum IosMultiDeviceTargetEnum {
|
|
2
|
+
iPhone_SE_3 = "iPhone SE (3rd generation)",
|
|
3
|
+
iPhone_SE_2 = "iPhone SE (2nd generation)",
|
|
4
|
+
iPhone_8 = "iPhone 8",
|
|
5
|
+
iPhone_8_Plus = "iPhone 8 Plus",
|
|
6
|
+
iPhone_13_mini = "iPhone 13 mini",
|
|
7
|
+
iPhone_12_mini = "iPhone 12 mini",
|
|
8
|
+
iPhone_11_Pro = "iPhone 11 Pro",
|
|
9
|
+
iPhone_X = "iPhone X",
|
|
10
|
+
iPhone_XR = "iPhone XR",
|
|
11
|
+
iPhone_Xs = "iPhone Xs",
|
|
12
|
+
iPhone_Xs_Max = "iPhone Xs Max",
|
|
13
|
+
iPhone_11 = "iPhone 11",
|
|
14
|
+
iPhone_11_Pro_Max = "iPhone 11 Pro Max",
|
|
15
|
+
iPhone_12 = "iPhone 12",
|
|
16
|
+
iPhone_12_Pro = "iPhone 12 Pro",
|
|
17
|
+
iPhone_12_Pro_Max = "iPhone 12 Pro Max",
|
|
18
|
+
iPhone_13 = "iPhone 13",
|
|
19
|
+
iPhone_13_Pro = "iPhone 13 Pro",
|
|
20
|
+
iPhone_13_Pro_Max = "iPhone 13 Pro Max",
|
|
21
|
+
iPhone_14 = "iPhone 14",
|
|
22
|
+
iPhone_14_Pro = "iPhone 14 Pro",
|
|
23
|
+
iPhone_14_Plus = "iPhone 14 Plus",
|
|
24
|
+
iPhone_14_Pro_Max = "iPhone 14 Pro Max"
|
|
25
|
+
}
|
|
26
|
+
export type IosMultiDeviceTarget = `${IosMultiDeviceTargetEnum}`;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
Dynamic = "Dynamic",
|
|
10
|
+
Exact = "Exact"
|
|
11
|
+
}
|
|
12
|
+
export type MatchLevel = `${MatchLevelEnum}`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EyesError } from './EyesError';
|
|
2
|
+
import { TestResults, TestResultsData } from '../output/TestResults';
|
|
3
|
+
export declare class TestFailedError extends EyesError {
|
|
4
|
+
private _result;
|
|
5
|
+
constructor(message: string, results: TestResults);
|
|
6
|
+
constructor(results: TestResults);
|
|
7
|
+
get testResults(): TestResults;
|
|
8
|
+
getTestResults(): TestResultsData;
|
|
9
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export { BrowserType as BrowserTypePlain, BrowserTypeEnum as BrowserType } from './enums/BrowserType';
|
|
2
|
+
export { CorsIframeHandle as CorsIframeHandlePlain, CorsIframeHandleEnum as CorsIframeHandle, } from './enums/CorsIframeHandle';
|
|
3
|
+
export { DeviceName as DeviceNamePlain, DeviceNameEnum as DeviceName } from './enums/DeviceName';
|
|
4
|
+
export { FailureReport as FailureReportPlain, FailureReportEnum as FailureReport } from './enums/FailureReport';
|
|
5
|
+
export { IosDeviceName as IosDeviceNamePlain, IosDeviceNameEnum as IosDeviceName } from './enums/IosDeviceName';
|
|
6
|
+
export { IosVersion as IosVersionPlain, IosVersionEnum as IosVersion } from './enums/IosVersion';
|
|
7
|
+
export { MatchLevel as MatchLevelPlain, MatchLevelEnum as MatchLevel } from './enums/MatchLevel';
|
|
8
|
+
export { ScreenOrientation as ScreenOrientationPlain, ScreenOrientationEnum as ScreenOrientation, } from './enums/ScreenOrientation';
|
|
9
|
+
export { SessionType as SessionTypePlain, SessionTypeEnum as SessionType } from './enums/SessionType';
|
|
10
|
+
export { StitchMode as StitchModePlain, StitchModeEnum as StitchMode } from './enums/StitchMode';
|
|
11
|
+
export { TestResultsStatus as TestResultsStatusPlain, TestResultsStatusEnum as TestResultsStatus, } from './enums/TestResultsStatus';
|
|
12
|
+
export { AccessibilityGuidelinesVersion as AccessibilityGuidelinesVersionPlain, AccessibilityGuidelinesVersionEnum as AccessibilityGuidelinesVersion, } from './enums/AccessibilityGuidelinesVersion';
|
|
13
|
+
export { AccessibilityLevel as AccessibilityLevelPlain, AccessibilityLevelEnum as AccessibilityLevel, } from './enums/AccessibilityLevel';
|
|
14
|
+
export { AccessibilityRegionType as AccessibilityRegionTypePlain, AccessibilityRegionTypeEnum as AccessibilityRegionType, } from './enums/AccessibilityRegionType';
|
|
15
|
+
export { AccessibilityStatus as AccessibilityStatusPlain, AccessibilityStatusEnum as AccessibilityStatus, } from './enums/AccessibilityStatus';
|
|
16
|
+
export { DynamicTextType as DynamicTextTypePlain, DynamicTextTypeEnum as DynamicTextType } from './enums/DynamicTextType';
|
|
17
|
+
export { EyesError } from './errors/EyesError';
|
|
18
|
+
export { TestFailedError } from './errors/TestFailedError';
|
|
19
|
+
export { DiffsFoundError } from './errors/DiffsFoundError';
|
|
20
|
+
export { NewTestError } from './errors/NewTestError';
|
|
21
|
+
export { AccessibilityMatchSettings as AccessibilityMatchSettingsPlain, AccessibilityMatchSettingsData as AccessibilityMatchSettings, } from './input/AccessibilityMatchSettings';
|
|
22
|
+
export { AccessibilitySettings } from './input/AccessibilitySettings';
|
|
23
|
+
export { BatchInfo as BatchInfoPlain, BatchInfoData as BatchInfo } from './input/BatchInfo';
|
|
24
|
+
export { Image } from './input/Image';
|
|
25
|
+
export { CheckSettingsImage as CheckSettingsImagePlain, CheckSettingsImageFluent as CheckSettingsImage, CheckSettingsAutomation as CheckSettingsAutomationPlain, CheckSettingsAutomationFluent as CheckSettingsAutomation, TargetImage, TargetAutomation, Target, } from './input/CheckSettings';
|
|
26
|
+
export { Configuration as ConfigurationPlain, ConfigurationData as Configuration } from './input/Configuration';
|
|
27
|
+
export { CutProvider as CutProviderPlain, CutProviderData as CutProvider, FixedCutProviderData as FixedCutProvider, UnscaledFixedCutProviderData as UnscaledFixedCutProvider, } from './input/CutProvider';
|
|
28
|
+
export { ExactMatchSettings as ExactMatchSettingsPlain, ExactMatchSettingsData as ExactMatchSettings, } from './input/ExactMatchSettings';
|
|
29
|
+
export { FloatingMatchSettings as FloatingMatchSettingsPlain, FloatingMatchSettingsData as FloatingMatchSettings, } from './input/FloatingMatchSettings';
|
|
30
|
+
export { ImageMatchSettings as ImageMatchSettingsPlain, ImageMatchSettingsData as ImageMatchSettings, } from './input/ImageMatchSettings';
|
|
31
|
+
export { ImageRotation as ImageRotationPlain, ImageRotationData as ImageRotation } from './input/ImageRotation';
|
|
32
|
+
export { Location as LocationPlain, LocationData as Location } from './input/Location';
|
|
33
|
+
export { LogHandler as LogHandlerPlain, CustomLogHandler as CustomLogHandlerPlain, FileLogHandler as FileLogHandlerPlain, ConsoleLogHandler as ConsoleLogHandlerPlain, LogHandlerData as LogHandler, FileLogHandlerData as FileLogHandler, ConsoleLogHandlerData as ConsoleLogHandler, NullLogHandlerData as NullLogHandler, } from './input/LogHandler';
|
|
34
|
+
export { OCRRegion } from './input/OCRRegion';
|
|
35
|
+
export { OCRSettings } from './input/OCRSettings';
|
|
36
|
+
export { PropertyData as PropertyDataPlain, PropertyDataData as PropertyData } from './input/PropertyData';
|
|
37
|
+
export { ProxySettings as ProxySettingsPlain, ProxySettingsData as ProxySettings } from './input/ProxySettings';
|
|
38
|
+
export { RectangleSize as RectangleSizePlain, RectangleSizeData as RectangleSize } from './input/RectangleSize';
|
|
39
|
+
export { Region as RegionPlain, LegacyRegion as LegacyRegionPlain, RegionData as Region } from './input/Region';
|
|
40
|
+
export { DesktopBrowserInfo, ChromeEmulationInfo, IOSDeviceInfo } from './input/RenderInfo';
|
|
41
|
+
export { RunnerOptions as RunnerOptionsPlain, RunnerOptionsFluent, RunnerOptionsFluentInit as RunnerOptions, } from './input/RunnerOptions';
|
|
42
|
+
export { VisualLocatorSettings } from './input/VisualLocatorSettings';
|
|
43
|
+
export { ApiUrls as ApiUrlsPlain, ApiUrlsData as ApiUrls } from './output/ApiUrls';
|
|
44
|
+
export { AppUrls as AppUrlsPlain, AppUrlsData as AppUrls } from './output/AppUrls';
|
|
45
|
+
export { MatchResult as MatchResultPlain, MatchResultData as MatchResult } from './output/MatchResult';
|
|
46
|
+
export { SessionUrls as SessionUrlsPlain, SessionUrlsData as SessionUrls } from './output/SessionUrls';
|
|
47
|
+
export { StepInfo as StepInfoPlain, StepInfoData as StepInfo } from './output/StepInfo';
|
|
48
|
+
export { TestAccessibilityStatus } from './output/TestAccessibilityStatus';
|
|
49
|
+
export { TestResults as TestResultsPlain, TestResultsData as TestResults } from './output/TestResults';
|
|
50
|
+
export { TestResultContainer as TestResultContainerPlain, TestResultContainerData as TestResultContainer, } from './output/TestResultContainer';
|
|
51
|
+
export { TestResultsSummary as TestResultsSummaryPlain, TestResultsSummaryData as TestResultsSummary, } from './output/TestResultsSummary';
|
|
52
|
+
export { TextRegion } from './output/TextRegion';
|
|
53
|
+
export { ValidationInfo as ValidationInfoPlain, ValidationInfoData as ValidationInfo } from './output/ValidationInfo';
|
|
54
|
+
export { ValidationResult as ValidationResultPlain, ValidationResultData as ValidationResult, } from './output/ValidationResult';
|
|
55
|
+
export { EyesSelector } from './input/EyesSelector';
|
|
56
|
+
export { Logger } from './Logger';
|
|
57
|
+
export { Eyes } from './Eyes';
|
|
58
|
+
export { BatchClose, closeBatch } from './BatchClose';
|
|
59
|
+
export { EyesRunner, ClassicRunner, VisualGridRunner } from './Runners';
|
|
60
|
+
export { SessionEventHandler, SessionEventHandlers, RemoteSessionEventHandler } from './SessionEventHandlers';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AccessibilityRegionType, AccessibilityRegionTypeEnum } from '../enums/AccessibilityRegionType';
|
|
2
|
+
import { Region, RegionData } from './Region';
|
|
3
|
+
export type AccessibilityMatchSettings = {
|
|
4
|
+
region: Region;
|
|
5
|
+
type?: AccessibilityRegionType;
|
|
6
|
+
};
|
|
7
|
+
export declare class AccessibilityMatchSettingsData implements Required<AccessibilityMatchSettings> {
|
|
8
|
+
private _settings;
|
|
9
|
+
constructor(settings: AccessibilityMatchSettings);
|
|
10
|
+
constructor(region: Region);
|
|
11
|
+
constructor(x: number, y: number, width: number, height: number, type?: AccessibilityRegionType);
|
|
12
|
+
get region(): Region;
|
|
13
|
+
set region(region: Region);
|
|
14
|
+
getRegion(): RegionData;
|
|
15
|
+
setRegion(region: Region): void;
|
|
16
|
+
getLeft(): number;
|
|
17
|
+
setLeft(left: number): void;
|
|
18
|
+
getTop(): number;
|
|
19
|
+
setTop(top: number): void;
|
|
20
|
+
getWidth(): number;
|
|
21
|
+
setWidth(width: number): void;
|
|
22
|
+
getHeight(): number;
|
|
23
|
+
setHeight(height: number): void;
|
|
24
|
+
get type(): AccessibilityRegionType;
|
|
25
|
+
set type(type: AccessibilityRegionType);
|
|
26
|
+
getType(): AccessibilityRegionTypeEnum;
|
|
27
|
+
setType(type: AccessibilityRegionType): void;
|
|
28
|
+
/** @internal */
|
|
29
|
+
toObject(): AccessibilityMatchSettings;
|
|
30
|
+
/** @internal */
|
|
31
|
+
toJSON(): AccessibilityMatchSettings;
|
|
32
|
+
/** @internal */
|
|
33
|
+
toString(): string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AccessibilityLevel } from '../enums/AccessibilityLevel';
|
|
2
|
+
import { AccessibilityGuidelinesVersion } from '../enums/AccessibilityGuidelinesVersion';
|
|
3
|
+
export type AccessibilitySettings = {
|
|
4
|
+
level?: AccessibilityLevel;
|
|
5
|
+
guidelinesVersion?: AccessibilityGuidelinesVersion;
|
|
6
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PropertyData, PropertyDataData } from './PropertyData';
|
|
2
|
+
export type BatchInfo = {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
sequenceName?: string;
|
|
6
|
+
startedAt?: Date | string;
|
|
7
|
+
notifyOnCompletion?: boolean;
|
|
8
|
+
properties?: PropertyData[];
|
|
9
|
+
};
|
|
10
|
+
export declare class BatchInfoData implements Required<BatchInfo> {
|
|
11
|
+
private _batch;
|
|
12
|
+
constructor();
|
|
13
|
+
constructor(batch?: BatchInfo);
|
|
14
|
+
constructor(name?: string, startedAt?: Date | string, id?: string);
|
|
15
|
+
get id(): string;
|
|
16
|
+
set id(id: string);
|
|
17
|
+
getId(): string;
|
|
18
|
+
setId(id: string): this;
|
|
19
|
+
get name(): string;
|
|
20
|
+
set name(name: string);
|
|
21
|
+
getName(): string;
|
|
22
|
+
setName(name: string): this;
|
|
23
|
+
get sequenceName(): string;
|
|
24
|
+
set sequenceName(sequenceName: string);
|
|
25
|
+
getSequenceName(): string;
|
|
26
|
+
setSequenceName(sequenceName: string): this;
|
|
27
|
+
get startedAt(): Date | string;
|
|
28
|
+
set startedAt(startedAt: Date | string);
|
|
29
|
+
getStartedAt(): Date | string;
|
|
30
|
+
setStartedAt(startedAt: Date | string): this;
|
|
31
|
+
get notifyOnCompletion(): boolean;
|
|
32
|
+
set notifyOnCompletion(notifyOnCompletion: boolean);
|
|
33
|
+
getNotifyOnCompletion(): boolean;
|
|
34
|
+
setNotifyOnCompletion(notifyOnCompletion: boolean): this;
|
|
35
|
+
get properties(): PropertyData[];
|
|
36
|
+
set properties(properties: PropertyData[]);
|
|
37
|
+
getProperties(): PropertyDataData[];
|
|
38
|
+
setProperties(properties: PropertyData[]): this;
|
|
39
|
+
addProperty(name: string, value: string): this;
|
|
40
|
+
addProperty(prop: PropertyData): this;
|
|
41
|
+
/** @internal */
|
|
42
|
+
toObject(): BatchInfo;
|
|
43
|
+
/** @internal */
|
|
44
|
+
toJSON(): BatchInfo;
|
|
45
|
+
/** @internal */
|
|
46
|
+
toString(): string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type * as Core from '@applitools/core';
|
|
3
|
+
import { EyesSelector } from './EyesSelector';
|
|
4
|
+
import { Image } from './Image';
|
|
5
|
+
import { AccessibilityRegionType } from '../enums/AccessibilityRegionType';
|
|
6
|
+
import { MatchLevel } from '../enums/MatchLevel';
|
|
7
|
+
import { Region, LegacyRegion } from './Region';
|
|
8
|
+
import { Location } from './Location';
|
|
9
|
+
import { LazyLoadOptions } from './LazyLoadOptions';
|
|
10
|
+
import { DensityMetrics } from './DensityMetrics';
|
|
11
|
+
import * as utils from '@applitools/utils';
|
|
12
|
+
import { DynamicTextType } from '../enums/DynamicTextType';
|
|
13
|
+
import { type StitchMode } from '../enums/StitchMode';
|
|
14
|
+
type RegionReference<TSpec extends Core.SpecType> = Region | LegacyRegion | ElementReference<TSpec>;
|
|
15
|
+
type ElementReference<TSpec extends Core.SpecType> = TSpec['element'] | SelectorReference<TSpec>;
|
|
16
|
+
type SelectorReference<TSpec extends Core.SpecType> = EyesSelector<TSpec['selector']>;
|
|
17
|
+
type FrameReference<TSpec extends Core.SpecType> = ElementReference<TSpec> | string | number;
|
|
18
|
+
type ContextReference<TSpec extends Core.SpecType> = {
|
|
19
|
+
frame: FrameReference<TSpec>;
|
|
20
|
+
scrollRootElement?: ElementReference<TSpec>;
|
|
21
|
+
};
|
|
22
|
+
type CodedRegion<TRegion = never> = {
|
|
23
|
+
region: Region | LegacyRegion | TRegion;
|
|
24
|
+
padding?: number | {
|
|
25
|
+
top: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
left: number;
|
|
28
|
+
right: number;
|
|
29
|
+
};
|
|
30
|
+
regionId?: string;
|
|
31
|
+
};
|
|
32
|
+
type CodedFloatingRegion<TRegion = never> = CodedRegion<TRegion> & {
|
|
33
|
+
offset?: {
|
|
34
|
+
top?: number;
|
|
35
|
+
bottom?: number;
|
|
36
|
+
left?: number;
|
|
37
|
+
right?: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/** @deprecated */
|
|
41
|
+
type LegacyCodedFloatingRegion<TRegion = never> = CodedRegion<TRegion> & {
|
|
42
|
+
maxUpOffset?: number;
|
|
43
|
+
maxDownOffset?: number;
|
|
44
|
+
maxLeftOffset?: number;
|
|
45
|
+
maxRightOffset?: number;
|
|
46
|
+
};
|
|
47
|
+
type CodedAccessibilityRegion<TRegion = never> = CodedRegion<TRegion> & {
|
|
48
|
+
type?: AccessibilityRegionType;
|
|
49
|
+
};
|
|
50
|
+
type DynamicTextTypeOrPattern = DynamicTextType | string;
|
|
51
|
+
type CodedDynamicRegion<TRegion = never> = CodedRegion<TRegion> & {
|
|
52
|
+
type?: DynamicTextTypeOrPattern | DynamicTextTypeOrPattern[];
|
|
53
|
+
};
|
|
54
|
+
export type CheckSettingsBase<TRegion = never> = {
|
|
55
|
+
name?: string;
|
|
56
|
+
region?: Region | LegacyRegion | TRegion;
|
|
57
|
+
matchLevel?: MatchLevel;
|
|
58
|
+
useDom?: boolean;
|
|
59
|
+
sendDom?: boolean;
|
|
60
|
+
enablePatterns?: boolean;
|
|
61
|
+
ignoreDisplacements?: boolean;
|
|
62
|
+
ignoreMismatch?: boolean;
|
|
63
|
+
ignoreCaret?: boolean;
|
|
64
|
+
ignoreRegions?: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[];
|
|
65
|
+
layoutRegions?: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[];
|
|
66
|
+
strictRegions?: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[];
|
|
67
|
+
contentRegions?: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[];
|
|
68
|
+
floatingRegions?: (CodedFloatingRegion<TRegion> | LegacyCodedFloatingRegion<TRegion> | Region | LegacyRegion | TRegion)[];
|
|
69
|
+
accessibilityRegions?: (CodedAccessibilityRegion<TRegion> | Region | LegacyRegion | TRegion)[];
|
|
70
|
+
dynamicRegions?: (CodedDynamicRegion<TRegion> | Region | TRegion)[];
|
|
71
|
+
pageId?: string;
|
|
72
|
+
variationGroupId?: string;
|
|
73
|
+
densityMetrics?: DensityMetrics;
|
|
74
|
+
stitchMode?: StitchMode;
|
|
75
|
+
};
|
|
76
|
+
export type CheckSettingsImage = CheckSettingsBase;
|
|
77
|
+
type LayoutBreakpoints = boolean | number[] | {
|
|
78
|
+
breakpoints: number[] | boolean;
|
|
79
|
+
reload?: boolean;
|
|
80
|
+
} | {
|
|
81
|
+
breakpoints: boolean;
|
|
82
|
+
heightBreakpoints: boolean;
|
|
83
|
+
reload?: boolean;
|
|
84
|
+
};
|
|
85
|
+
export type CheckSettingsAutomation<TSpec extends Core.SpecType> = CheckSettingsBase<RegionReference<TSpec>> & {
|
|
86
|
+
frames?: (ContextReference<TSpec> | FrameReference<TSpec>)[];
|
|
87
|
+
webview?: boolean | string;
|
|
88
|
+
scrollRootElement?: ElementReference<TSpec>;
|
|
89
|
+
fully?: boolean;
|
|
90
|
+
disableBrowserFetching?: boolean;
|
|
91
|
+
layoutBreakpoints?: LayoutBreakpoints;
|
|
92
|
+
/** @deprecated */
|
|
93
|
+
visualGridOptions?: {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
};
|
|
96
|
+
ufgOptions?: {
|
|
97
|
+
[key: string]: any;
|
|
98
|
+
};
|
|
99
|
+
/** @deprecated */
|
|
100
|
+
nmgOptions?: {
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
};
|
|
103
|
+
useSystemScreenshot?: boolean;
|
|
104
|
+
hooks?: {
|
|
105
|
+
beforeCaptureScreenshot: string;
|
|
106
|
+
};
|
|
107
|
+
timeout?: number;
|
|
108
|
+
waitBeforeCapture?: number | (() => Promise<void>);
|
|
109
|
+
lazyLoad?: boolean | LazyLoadOptions;
|
|
110
|
+
};
|
|
111
|
+
export declare class CheckSettingsBaseFluent<TRegion = never> {
|
|
112
|
+
protected _settings: CheckSettingsBase<TRegion>;
|
|
113
|
+
protected parent?: this;
|
|
114
|
+
protected childs: this[];
|
|
115
|
+
constructor(settings?: CheckSettingsBase<TRegion> | CheckSettingsBaseFluent<TRegion>, parent?: CheckSettingsBaseFluent<TRegion>);
|
|
116
|
+
region(region: Region | LegacyRegion | TRegion): typeof this;
|
|
117
|
+
name(name: string): typeof this;
|
|
118
|
+
withName(name: string): this;
|
|
119
|
+
ignoreRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
120
|
+
ignoreRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
121
|
+
/** @deprecated */
|
|
122
|
+
ignore(region: Region | LegacyRegion | TRegion): this;
|
|
123
|
+
/** @deprecated */
|
|
124
|
+
ignores(...regions: (Region | LegacyRegion | TRegion)[]): typeof this;
|
|
125
|
+
layoutRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
126
|
+
layoutRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
127
|
+
strictRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
128
|
+
strictRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
129
|
+
contentRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): typeof this;
|
|
130
|
+
contentRegions(...regions: (CodedRegion<TRegion> | Region | LegacyRegion | TRegion)[]): typeof this;
|
|
131
|
+
floatingRegion(region: CodedFloatingRegion<TRegion>): this;
|
|
132
|
+
floatingRegion(region: LegacyCodedFloatingRegion<TRegion>): this;
|
|
133
|
+
floatingRegion(region: Region | LegacyRegion | TRegion, maxUpOffset?: number, maxDownOffset?: number, maxLeftOffset?: number, maxRightOffset?: number): this;
|
|
134
|
+
floatingRegions(...regions: (CodedFloatingRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
135
|
+
floatingRegions(maxOffset: number, ...regions: (Region | LegacyRegion | TRegion)[]): this;
|
|
136
|
+
/** @deprecated */
|
|
137
|
+
floating(region: CodedFloatingRegion<TRegion>): this;
|
|
138
|
+
/** @deprecated */
|
|
139
|
+
floating(region: Region | LegacyRegion | TRegion): this;
|
|
140
|
+
/** @deprecated */
|
|
141
|
+
floatings(...regions: (CodedFloatingRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
142
|
+
/** @deprecated */
|
|
143
|
+
floatings(maxOffset: number, ...regions: (Region | LegacyRegion | TRegion)[]): this;
|
|
144
|
+
accessibilityRegion(region: CodedAccessibilityRegion<TRegion>): this;
|
|
145
|
+
accessibilityRegion(region: Region | LegacyRegion | TRegion, type?: AccessibilityRegionType): this;
|
|
146
|
+
accessibilityRegions(...regions: (CodedAccessibilityRegion<TRegion> | Region | LegacyRegion | TRegion)[]): this;
|
|
147
|
+
accessibilityRegions(type: AccessibilityRegionType, ...regions: (Region | LegacyRegion | TRegion)[]): this;
|
|
148
|
+
dynamicRegion(region: CodedDynamicRegion<TRegion>): this;
|
|
149
|
+
dynamicRegion(region: Region | TRegion): this;
|
|
150
|
+
dynamicRegion(region: Region | TRegion, type?: DynamicTextTypeOrPattern | DynamicTextTypeOrPattern[]): this;
|
|
151
|
+
dynamicRegions(...regions: (CodedDynamicRegion<TRegion> | Region | TRegion)[]): this;
|
|
152
|
+
matchLevel(matchLevel: MatchLevel): typeof this;
|
|
153
|
+
layout(): typeof this;
|
|
154
|
+
exact(): typeof this;
|
|
155
|
+
strict(): typeof this;
|
|
156
|
+
ignoreColors(): typeof this;
|
|
157
|
+
dynamic(): typeof this;
|
|
158
|
+
/** @deprecated */
|
|
159
|
+
content(): typeof this;
|
|
160
|
+
enablePatterns(enablePatterns?: boolean): typeof this;
|
|
161
|
+
ignoreDisplacements(ignoreDisplacements?: boolean): typeof this;
|
|
162
|
+
ignoreCaret(ignoreCaret?: boolean): typeof this;
|
|
163
|
+
useDom(useDom?: boolean): typeof this;
|
|
164
|
+
sendDom(sendDom?: boolean): typeof this;
|
|
165
|
+
pageId(pageId: string): typeof this;
|
|
166
|
+
variationGroupId(variationGroupId: string): typeof this;
|
|
167
|
+
/** @internal */
|
|
168
|
+
toObject(): CheckSettingsBase<TRegion>;
|
|
169
|
+
/** @internal */
|
|
170
|
+
toString(): string;
|
|
171
|
+
/** @internal */
|
|
172
|
+
protected assumesMutability(): true | undefined;
|
|
173
|
+
protected static makeMutableTreeProxy<K, T extends CheckSettingsBaseFluent<K>>(self: T, ctor: new (...args: any[]) => T): T;
|
|
174
|
+
protected toCoreCodedRegion(region: CodedRegion<TRegion> | Region | LegacyRegion | TRegion): Core.CodedRegion<TRegion | utils.Region> | utils.Region | TRegion;
|
|
175
|
+
protected toCoreCodedFloatingRegion(region: CodedFloatingRegion<TRegion> | LegacyCodedFloatingRegion<TRegion> | Region | LegacyRegion | TRegion): Core.FloatingRegion<TRegion | utils.Region> | utils.Region | TRegion;
|
|
176
|
+
protected toCoreRegion(region: Region | LegacyRegion | TRegion): utils.Region | TRegion;
|
|
177
|
+
}
|
|
178
|
+
export declare class CheckSettingsImageFluent extends CheckSettingsBaseFluent {
|
|
179
|
+
protected _target: Image;
|
|
180
|
+
constructor(settings?: CheckSettingsImage | CheckSettingsImageFluent, target?: Image, parent?: CheckSettingsImageFluent);
|
|
181
|
+
image(image: Buffer | URL | string): typeof this;
|
|
182
|
+
buffer(imageBuffer: Buffer): typeof this;
|
|
183
|
+
base64(imageBase64: Buffer): typeof this;
|
|
184
|
+
path(imagePath: string): typeof this;
|
|
185
|
+
url(imageUrl: URL | string): typeof this;
|
|
186
|
+
name(name: string): typeof this;
|
|
187
|
+
withDom(dom: string): typeof this;
|
|
188
|
+
withLocation(locationInViewport: Location): typeof this;
|
|
189
|
+
/** @internal */
|
|
190
|
+
toJSON(): {
|
|
191
|
+
target: Image;
|
|
192
|
+
settings: Core.CheckSettings<never, 'classic'>;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export declare class CheckSettingsAutomationFluent<TSpec extends Core.SpecType = Core.SpecType> extends CheckSettingsBaseFluent<RegionReference<TSpec>> {
|
|
196
|
+
protected _settings: CheckSettingsAutomation<TSpec>;
|
|
197
|
+
protected static readonly _spec: Core.SpecDriver<Core.SpecType>;
|
|
198
|
+
protected _spec: Core.SpecDriver<TSpec>;
|
|
199
|
+
protected _isElementReference(value: any): value is ElementReference<TSpec>;
|
|
200
|
+
protected _isSelectorReference(selector: any): selector is SelectorReference<TSpec>;
|
|
201
|
+
protected _isFrameReference(value: any): value is FrameReference<TSpec>;
|
|
202
|
+
constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>);
|
|
203
|
+
/** @internal */
|
|
204
|
+
constructor(settings?: CheckSettingsAutomation<TSpec> | CheckSettingsAutomationFluent<TSpec>, spec?: Core.SpecDriver<TSpec>, parent?: CheckSettingsAutomationFluent<TSpec>);
|
|
205
|
+
region(region: RegionReference<TSpec>): this;
|
|
206
|
+
shadow(selector: SelectorReference<TSpec>): typeof this;
|
|
207
|
+
frame(context: ContextReference<TSpec>): this;
|
|
208
|
+
frame(frame: FrameReference<TSpec>, scrollRootElement?: ElementReference<TSpec>): this;
|
|
209
|
+
webview(webview?: string | boolean): typeof this;
|
|
210
|
+
scrollRootElement(scrollRootElement: ElementReference<TSpec>): typeof this;
|
|
211
|
+
fully(fully?: boolean): typeof this;
|
|
212
|
+
/** @deprecated */
|
|
213
|
+
stitchContent(stitchContent?: boolean): this;
|
|
214
|
+
disableBrowserFetching(disableBrowserFetching: boolean): typeof this;
|
|
215
|
+
layoutBreakpoints(breakpoints: boolean, heightBreakpoints: boolean, settings?: {
|
|
216
|
+
reload?: boolean;
|
|
217
|
+
}): this;
|
|
218
|
+
layoutBreakpoints(breakpoints: boolean | number[], settings?: {
|
|
219
|
+
reload?: boolean;
|
|
220
|
+
}): this;
|
|
221
|
+
hook(name: string, script: string): typeof this;
|
|
222
|
+
beforeRenderScreenshotHook(script: string): typeof this;
|
|
223
|
+
/** @deprecated */
|
|
224
|
+
webHook(script: string): typeof this;
|
|
225
|
+
ufgOption(key: string, value: any): this;
|
|
226
|
+
ufgOptions(options: {
|
|
227
|
+
[key: string]: any;
|
|
228
|
+
}): this;
|
|
229
|
+
/** @deprecated */
|
|
230
|
+
nmgOption(key: string, value: any): this;
|
|
231
|
+
/** @deprecated */
|
|
232
|
+
nmgOptions(options: {
|
|
233
|
+
[key: string]: any;
|
|
234
|
+
}): this;
|
|
235
|
+
/** @deprecated */
|
|
236
|
+
visualGridOption(key: string, value: any): this;
|
|
237
|
+
/** @deprecated */
|
|
238
|
+
visualGridOptions(options: {
|
|
239
|
+
[key: string]: any;
|
|
240
|
+
}): this;
|
|
241
|
+
useSystemScreenshot(useSystemScreenshot?: boolean): this;
|
|
242
|
+
timeout(timeout: number): typeof this;
|
|
243
|
+
waitBeforeCapture(waitBeforeCapture: number | (() => Promise<void>)): typeof this;
|
|
244
|
+
lazyLoad(options?: LazyLoadOptions | boolean): typeof this;
|
|
245
|
+
densityMetrics(options: DensityMetrics): typeof this;
|
|
246
|
+
stitchMode(stitchMode: StitchMode): typeof this;
|
|
247
|
+
/** @internal */
|
|
248
|
+
protected toLayoutBreakpoints(): {
|
|
249
|
+
breakpoints: number[] | boolean;
|
|
250
|
+
heightBreakpoints?: boolean;
|
|
251
|
+
reload?: boolean;
|
|
252
|
+
};
|
|
253
|
+
/** @internal */
|
|
254
|
+
toJSON(): {
|
|
255
|
+
target: undefined;
|
|
256
|
+
settings: Core.CheckSettings<TSpec, 'classic'> & Core.CheckSettings<TSpec, 'ufg'>;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
export type TargetImage = {
|
|
260
|
+
image(image: Buffer | URL | string): CheckSettingsImageFluent;
|
|
261
|
+
buffer(imageBuffer: Buffer): CheckSettingsImageFluent;
|
|
262
|
+
base64(imageBase64: string): CheckSettingsImageFluent;
|
|
263
|
+
path(imagePath: string): CheckSettingsImageFluent;
|
|
264
|
+
url(imageUrl: URL | string): CheckSettingsImageFluent;
|
|
265
|
+
};
|
|
266
|
+
export declare const TargetImage: TargetImage;
|
|
267
|
+
export type TargetAutomation<TSpec extends Core.SpecType = Core.SpecType> = {
|
|
268
|
+
/** @internal */
|
|
269
|
+
spec: Core.SpecDriver<TSpec>;
|
|
270
|
+
window(): CheckSettingsAutomationFluent<TSpec>;
|
|
271
|
+
region(region: RegionReference<TSpec> | LegacyRegion): CheckSettingsAutomationFluent<TSpec>;
|
|
272
|
+
frame(context: ContextReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
|
|
273
|
+
frame(frame: FrameReference<TSpec>, scrollRootElement?: ElementReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
|
|
274
|
+
shadow(selector: SelectorReference<TSpec>): CheckSettingsAutomationFluent<TSpec>;
|
|
275
|
+
webview(webview?: string | boolean): CheckSettingsAutomationFluent<TSpec>;
|
|
276
|
+
};
|
|
277
|
+
export declare const TargetAutomation: TargetAutomation<Core.SpecType>;
|
|
278
|
+
export type Target<TSpec extends Core.SpecType = Core.SpecType> = TargetImage & TargetAutomation<TSpec>;
|
|
279
|
+
export declare const Target: Target<Core.SpecType>;
|
|
280
|
+
export {};
|