-
Notifications
You must be signed in to change notification settings - Fork 5
Adding visual regression testing with BackstopJS #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
170cab6
ba0d688
ddd7599
86a2772
ebb0497
3d92ace
1a618dc
eb75985
ed49efc
4927bce
e1b7f02
39168c4
27e28de
26f5ef7
3201b43
0bd9ae1
f38b29e
8b98830
adf7d67
50d8ded
b858ecf
3bcfbcf
67311c6
348d98e
7cd48e0
2c05edc
685146f
a26259d
4533657
fb4abb7
1679a9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 67.0.5 | ||
| 70.0.12 |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 3 has a typo it should be "implemented" not "implemenented"
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 7 has a typo it should be "switching" not "switch"
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 33 should be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've removed this line now. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,3 +42,19 @@ npm install | |
| ## Running the Application | ||
|
|
||
| For running this application, run `make run` which first executes `scripts/load_release.sh` script that downloads the Design System macros zip file from the github release and unzips them into a templates folder. Then, `flask --app application run ` renders all the example components as displayed in the Design System at `http://127.0.0.1:5000`. The CSS and JS are pulled in at runtime from the CDN. | ||
|
|
||
| ## Visual Tests | ||
|
|
||
| For the visual regression tests BackstopJS is used. To install BackstopJS run: | ||
|
|
||
| ``` | ||
| npm install -g backstopjs | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To be consistent with the DS we should probably use yarn not npm
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed in prev tech session, when I try to install yarn its downloading too many packages that I think are not required. Can you check this and tell me if its doing the same for you also |
||
| ``` | ||
|
|
||
| Note-: Make sure to install npm package([link](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)) before before installing BackstopJS. | ||
|
|
||
| To utilize BackstopJS, the workflow is as follows: | ||
|
|
||
| `make generate-backstopjs`: This python file generates `backstop.json` file which has the config for BackstopJS | ||
|
|
||
| `make test`: This runs the tests which creates a set of screenshots, compares them with reference screenshots and shows any changes in the visual report (`backstop_data/html_report`). Note-: Make sure to keep the local server running before executing this step. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 8 has a typo it should be "preprocessor" not "preprosser", "version" needs to be "versions" and "script" should be added to the end of the sentence.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to add "script" here to the end of the sentence