@wdio/image-comparison-core
Version:
Image comparison core module for @wdio/visual-service - WebdriverIO visual testing framework
51 lines • 2.46 kB
TypeScript
import type { DetermineDeviceBlockOutsOptions, DeviceRectangles, ElementRectangles, PrepareIgnoreRectanglesOptions, PreparedIgnoreRectangles, RectanglesOutput, ScreenRectanglesOptions, SplitIgnores, StatusAddressToolBarRectangles, StatusAddressToolBarRectanglesOptions } from './rectangles.interfaces.js';
import type { ElementIgnore } from 'src/commands/element.interfaces.js';
/**
* Determine the element rectangles on the page / screenshot
*/
export declare function determineElementRectangles({ browserInstance, base64Image, options, element, }: ElementRectangles): Promise<RectanglesOutput>;
/**
* Determine the rectangles of the screen for the screenshot
*/
export declare function determineScreenRectangles(base64Image: string, options: ScreenRectanglesOptions): RectanglesOutput;
/**
* Determine the rectangles for the mobile devices
*/
export declare function determineStatusAddressToolBarRectangles({ deviceRectangles, options }: {
deviceRectangles: DeviceRectangles;
options: StatusAddressToolBarRectanglesOptions;
}): StatusAddressToolBarRectangles;
/**
* Validate that the element is a WebdriverIO element
*/
export declare function isWdioElement(x: unknown): boolean;
/**
* Validate that the object is a valid ignore region
*/
export declare function validateIgnoreRegion(x: unknown): boolean;
/**
* Format the error message
*/
export declare function formatErrorMessage(item: unknown, message: string): string;
/**
* Split the ignores into elements and regions and throw an error if
* an element is not a valid WebdriverIO element/region
*/
export declare function splitIgnores(items: unknown[]): SplitIgnores;
/**
* Get the regions from the elements
*/
export declare function getRegionsFromElements(browserInstance: WebdriverIO.Browser, elements: WebdriverIO.Element[]): Promise<RectanglesOutput[]>;
/**
* Translate ignores to regions
*/
export declare function determineIgnoreRegions(browserInstance: WebdriverIO.Browser, ignores: ElementIgnore[]): Promise<RectanglesOutput[]>;
/**
* Determine the device block outs
*/
export declare function determineDeviceBlockOuts({ isAndroid, screenCompareOptions, instanceData }: DetermineDeviceBlockOutsOptions): Promise<RectanglesOutput[]>;
/**
* Prepare all ignore rectangles for image comparison
*/
export declare function prepareIgnoreRectangles(options: PrepareIgnoreRectanglesOptions): Promise<PreparedIgnoreRectangles>;
//# sourceMappingURL=rectangles.d.ts.map