0.1.1 • Published 8 years ago

grunt-image-diff-validator v0.1.1

Weekly downloads
1
License
-
Repository
github
Last release
8 years ago

grunt-image-diff-validator

Grunt plugin for check changes at your app screenshots. Reject task when screenshot was changed and create diff file


Usage Example

grunt.initConfig({
    imageDiffValidator: {
          my_app: {
                options: {
                    fuzzFactor: '1%'
                },
                flatten: true,
                src: 'test/files/current/*',
                original: 'test/files/original',
                dest: 'test/files/diff'
          }
};

flatten

Type: Boolean Default value: false

Set to true if you want to specify full paths for your files (like at an example)

src

Type: Array Default value: []

Array of files masks for compare with same files at original note cwd param is supported too. See Gruntfile.js

original

Type: String Default value: ''

Path for search original for compare

dest

Type: String Default value: ''

Where difference files need to be saved

options.fuzzFactor

Type: String Optional. Default value: '1%'

What difference need to be ignored


Recommendations

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