Grunt plugin for check changes at your app screenshots. Reject task when screenshot was changed and create diff file
grunt.initConfig({
imageDiffValidator: {
my_app: {
options: {
fuzzFactor: '1%'
},
flatten: true,
src: 'test/files/current/*',
original: 'test/files/original',
dest: 'test/files/diff'
}
};
Type: Boolean
Default value: false
Set to true if you want to specify full paths for your files (like at an example)
Type: Array
Default value: []
Array of files masks for compare with same files at original
note cwd param is supported too. See Gruntfile.js
Type: String
Default value: ''
Path for search original for compare
Type: String
Default value: ''
Where difference files need to be saved
Type: String
Optional. Default value: '1%'
What difference need to be ignored
Use some like protractor-screenshot-reporter to generate screenshots at your e2e tests
Use PNG instead of JPG for yours screenshots
JPG diff result example you can find at test/files/diff/different.jpeg (cat smile only was changed)
For generation of all files with difference, run with --force parameter
grunt imageDiffValidator --force