From 70c1d99c48d1b4cff73f29cf46d82f627014bc51 Mon Sep 17 00:00:00 2001 From: CJ Patoilo Date: Sun, 17 May 2020 19:02:31 -0300 Subject: [PATCH] Update the visual regression testing --- .github/contributing.md | 4 ++-- .github/pull_request_template.md | 2 +- package.json | 11 +++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/contributing.md b/.github/contributing.md index b007760..c924852 100644 --- a/.github/contributing.md +++ b/.github/contributing.md @@ -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 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 4c3492e..21b6ff7 100755 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -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 ============================== diff --git a/package.json b/package.json index 63cba99..5c9482c 100644 --- a/package.json +++ b/package.json @@ -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": {