UNPKG

@wdio/visual-service

Version:

Image comparison / visual regression testing for WebdriverIO

44 lines 1.93 kB
import type { Folders, InstanceData, TestContext } from '@wdio/image-comparison-core'; import type { EnrichTestContextOptions, getFolderMethodOptions, GetInstanceDataOptions } from './types.js'; /** * Get the folders data * * If folder options are passed in use those values * Otherwise, use the values set during instantiation */ export declare function getFolders(methodOptions: getFolderMethodOptions, folders: Folders, currentTestPath: string): Folders; /** * Get the size of a base64 screenshot in pixels without the device pixel ratio */ export declare function getBase64ScreenshotSize(screenshot: string, devicePixelRation?: number): { height: number; width: number; }; /** * Get the device pixel ratio */ export declare function getDevicePixelRatio(screenshot: string, deviceScreenSize: { height: number; width: number; }): number; /** * Get the LambdaTest options, these can be case insensitive */ export declare function getLtOptions(capabilities: WebdriverIO.Capabilities): any | undefined; /** * Get the instance data */ export declare function getInstanceData({ browserInstance, initialDeviceRectangles, isNativeContext }: GetInstanceDataOptions): Promise<InstanceData>; /** * Traverse up the scope chain until browser element was reached */ export declare function getBrowserObject(elem: WebdriverIO.Element | WebdriverIO.Browser): WebdriverIO.Browser; export declare function getNativeContext({ capabilities, isMobile }: { capabilities: WebdriverIO.Capabilities; isMobile: boolean; }): boolean; /** * Make sure we have all the data for the test context */ export declare function enrichTestContext({ commandName, currentTestContext: { framework, parent, title, }, instanceData: { appName, browserName, browserVersion, deviceName, isAndroid, isIOS, isMobile, platformName, platformVersion, }, tag, }: EnrichTestContextOptions): TestContext; //# sourceMappingURL=utils.d.ts.map