Update the visual regression testing

This commit is contained in:
CJ Patoilo 2020-05-17 19:02:31 -03:00
parent b4a6142387
commit 70c1d99c48
3 changed files with 8 additions and 9 deletions

View File

@ -32,7 +32,7 @@ You can do all of this from your browser using Gitpod, the free online dev envir
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/milligram/milligram)
_Note: For issues relating to the site, please use the [milligram.github.io](https://github.com/milligram/milligram.github.io)_
_Note: For issues relating to the site, please use the [milligram/milligram.github.io](https://github.com/milligram/milligram.github.io)_
## Building
@ -81,7 +81,7 @@ _Note: This style guide was inspired by [Idiomatic.css](https://github.com/necol
## Test
Breaking CSS is easy. Checking every responsive page element is hard. That's why Milligram uses automated visual regression testing for responsive web UI by comparing DOM screenshots at various viewport sizes. To view the comparison run `npm test` after making changes to the source code.
Breaking CSS is easy. Checking every responsive page element is hard. That's why Milligram uses automated visual regression testing for responsive web UI by comparing DOM screenshots at various viewport sizes. To view the comparison run `npm run visual-regression` after making changes to the source code.
## Code of Conduct

View File

@ -14,7 +14,7 @@ Try to solve a problem for each pull request, this increases the chances of acce
1. Push to the branch: `git push origin my-feature-name`
1. Submit a pull request!
*Note: For issues relating to the site, please use the [milligram.github.io](https://github.com/milligram/milligram.github.io)*
_Note: For issues relating to the site, please use the [milligram/milligram.github.io](https://github.com/milligram/milligram.github.io)_
Code of Conduct
==============================

View File

@ -76,13 +76,12 @@
"banner": "banner-cli dist/*.css",
"watch": "onchange src -- run-p build",
"serve": "browser-sync start --no-notify -s test --ss dist -f dist",
"backstop": "run-s build && run-s serve compare",
"reference": "backstop reference --config backstop.config.js",
"compare": "backstop test --config backstop.config.js",
"lint": "prettier-standard --check && sass-lint -c .sasslintrc src --verbose --no-exit",
"visual-regression": "run-s build && run-p serve visual-regression:compare",
"visual-regression:reference": "backstop reference --config backstop.config.js",
"visual-regression:compare": "backstop test --config backstop.config.js",
"lint": "prettier-standard --check && sass-lint --verbose --no-exit",
"prepublish": "run-s build",
"postpublish": "run-s clean",
"test": "npm run build && nyc ava"
"test": "run-s build lint && nyc ava"
},
"husky": {
"hooks": {