Spectrum CSS Testing Asset
A repo to generate and store BackstopJS visual regression testing assets for spectrum-css.
Prerequisites
-
Install docker from here.
Rebuild BackstopJS Bitmaps
Accepts two command line parameters
-
--repo
to specify github repository url. Default value as https://github.com/adobe/spectrum-css.git -
--branch
to specify code branch that the test run against. Default value asmaster
.
Examples
fix_button_margin
of default Spectrum-CSS repository
Run test on branch ./build.sh rebuild_reference --branch=fix_button_margin
feat_card
of repo - https://github.com/jianliao/spectrum-css.git
Run test on branch ./build.sh rebuild_reference --branch=feat_card --repo=https://github.com/jianliao/spectrum-css.git
master
of default Spectrum-CSS repository
Run all the test scenarios on branch All the test scenarios is about 2000+ and takes about 30 mins.
./build.sh rebuild_all_reference
Review the result
Once rebuild_reference done, a browser window will be opened to show the result for you to review.
Update BackstopJS Bitmaps Reference
If all the failure scenarios are expected, run the following command to update the bitmaps reference in folder - bitmaps_reference/
.
./build.sh update_reference
Publish @adobe/spectrum-css-test-asset
- Bump up the version number in package.json
- Git push the change to the repository
- Publish the new package by
npm publish