Releases: garris/BackstopJS
Releases · garris/BackstopJS
Feature/302 add diff output options (#345)
Include BackstopJS in node scripts
const backstop = require('backstopjs');
backstop('reference');
// handle the response like this
backstop('test')
.then(() => {
// test successful
}).catch() => {
// test failed
});
// pass options to the command
backstop('test', {config:'custom/backstop/config.json'});
Since the backstop runner returns promises it can easily be integrated in build systems like gulp
const gulp = require('gulp');
const backstopjs = require('backstopjs');
gulp.task('backstop_reference', () => backstopjs('reference'));
gulp.task('backstop_test', () => backstopjs('test'));
bug fixes including Node 0.10 support
- Adds Incremental option to usage
- fixes Node 0.10 support
Yarn compatibility
fixes #323
Selector expansion feature
Selector expansion https://github.com/garris/BackstopJS#selectorexpansion
find and take screenshots of all matching selector instances
Special thanks to @nobso for this great feature!
- typo fixes
- bumped eslint-plugin-promise
- removed selectors are not used for compare operation
- added concurrency limit to comparison flow
BackstopJS 2.0 -- The rewrite!
Massive performance gains and many new features. Many thanks to @JulienPradet, @onigoetz, @borys-rudenko, @Ksushik, @dmitriyilchgmailcom, @Primajin
Highlights
- Completely removed gulp, rely only on
fs
to move files around - Added a modal to show the images in big, with a slider to compare images in place.
- The report doesn't need a server to be seen
- To see the report, the files are copied in the project (previously the images were copied into Backstop)
- Backstop relies on
process.cwd()
to generate its path, not./node_modules/backstopjs
- Add a
--filter
option to filter scenarii bylabel
in test and referenceVariants
- You can add "variants" to a scenario, they have the same options as a scenario, but are checked against the main scenario
- no reference is created
Browser reporting
- Removed resemblejs, use images generated by the CLI reporter. (we have more than 500 tests, running them in the browser just breaks the browser)
- Copy the reporter files to the project.
- The reporter required to disable the CSP rules of our Jenkins server, not longer the case
- Added a way to toggle the summary of scenarii
- Added a modal on click on reference or test image with a comparison slider
- Tweaked the styles a bit
- Removed custom "circles" to show the number of passed and failed tests : replaced with Bootstrap's "label" because with more than 100 tests, the circle is broken
- Made a more compact "Report" section : removed
analysisTime
anddimensionDifference
(ifisSameDimensions
is true) - Changed the font stack (there was a typo)
CLI Reporting
- Reporting is always run in the CLI and results added to an object
- You can easily add multiple new report types with this new object
- junit report was moved to a separate code block to not clutter the main one
Internal changes
- paths are made from the current working directory, not backstopjs.
- removed the need for an internal hash of the configuration.
- the list of comparisons to create is stored in a special temp file.
- commands no longer have a
before
andafter
this makes the code very complicated to understand and can be replaced by promises inside the main execute - removed "start" and "stop" commands as the server is not needed anymore.
Bugfixes / Regressions
- If the tests failed, the return code was still 0
- You could not use a JavaScript configuration anymore
- Errors in Promises were swallowed
Code Style
- Replaced jshint/jscs with eslint
- Linted with "semistandard"
Tests
- Run tests on travis on more node versions (0.12, 4, 5, 6)
Bug fixes
bugfix junit report
1.3.4 Update bower.json
junit reports bugfix
1.3.3 Update package.json
Take screenshots of your entire document
Take screenshots of your entire document by @medovob
CI Integration with junit reports by Shuresh KM.
Example: Integration with React apps by GS