Interface: VisualRegressionOptions
Options for visual regression screenshot comparison.
Capability
visualRegression.options
Example
const opts: VisualRegressionOptions = {
threshold: 0.1,
mask: visualRegression.maskFLPChrome(),
fullPage: true,
};
Properties
fullPage?
optionalfullPage?:boolean
Capture the full scrollable page instead of the viewport. Default: false.
mask?
optionalmask?:Locator[]
Locators to mask with a solid colour rectangle.
maskColor?
optionalmaskColor?:string
Colour used to fill masked regions. Default: '#FF00FF'.
maxDiffPixelRatio?
optionalmaxDiffPixelRatio?:number
Maximum ratio of different pixels (0-1) before the assertion fails.
maxDiffPixels?
optionalmaxDiffPixels?:number
Maximum number of different pixels before the assertion fails.
threshold?
optionalthreshold?:number
Per-pixel colour distance threshold (0-1). Default: 0.2.