Skip to content

Ebazhanov/cypress-image-screenshot-comparison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cypress visual regression example (screenshot comparison)

"cypress-image-snapshot": "^3.1.1"

CircleCI CircleCI

This repo an example of how to use visual regression (screenshot comparison) + cypress

diff-example.png

TODO

  • integrate with circle
  • add mochawesome html
  • add failed screenshot to mochawesome html
  • play with Threshold
addMatchImageSnapshotCommand({
  failureThreshold: 0.03, // threshold for entire image
  failureThresholdType: 'percent', // percent of image or number of pixels
  customDiffConfig: { threshold: 0.1 }, // threshold for each pixel
  capture: 'viewport', // capture viewport in screenshot
});

An example of screenshot diff circleci job