@freelancercom/blue-harvest
Version:
protractor helpers
20 lines (17 loc) • 1 kB
TypeScript
import * as looksSame from 'looks-same';
import { ElementFinder, WebElement } from 'protractor';
/**
* Compare a screenshot to a reference, or "golden" image.
* Returns a Promise that resolves to whether or not the
* screenshot is a match. If the UPDATE_SCREENSHOTS environment
* variable is set, the promise resolves to true and the
* golden image is updated.
*
* @param data - The screenshot image data.
* @param golden - The path to the golden image to compare to.
* @param outputFolder - The destination path for saving the diff. if it is not provided, the difference image will not be
* saved.
*/
export declare function compareScreenshot(data: any, golden: any, outputFolder?: any, looksSameOptions?: looksSame.LooksSameOptions): Promise<string>;
export declare function addMask(el: ElementFinder, color: any, zIndex?: number, xOffset?: number, yOffset?: number, sizeMultiplier?: number): Promise<WebElement>;
export declare function removeMask(mask: WebElement): Promise<void>;