Skip to content

Commit

Permalink
Add Chromatic visual regression tests for UI components
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes committed Jun 21, 2022
1 parent e6e6cae commit af610d9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Workflow name
name: "Chromatic Deployment"

# Event for the workflow
on: push

# List of jobs
jobs:
test:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- run: yarn
#👇 Adds Chromatic as a step in the workflow
- uses: chromaui/action@v1
# Options required for Chromatic's GitHub Action
with:
#👇 Chromatic projectToken, see https://storybook.js.org/tutorials/intro-to-storybook/react/en/deploy/ to obtain it
projectToken: t1lqdxy63up
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"@storybook/test-runner": "^0.2.0",
"@storybook/testing-library": "^0.0.13",
"babel-plugin-named-exports-order": "^0.0.2",
"chromatic": "^6.6.3",
"msw": "^0.42.1",
"msw-storybook-addon": "^1.6.3",
"prop-types": "^15.8.1",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3503,7 +3503,7 @@
dependencies:
"@types/node" "*"

"@types/webpack-env@^1.16.0":
"@types/webpack-env@^1.16.0", "@types/webpack-env@^1.17.0":
version "1.17.0"
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.17.0.tgz#f99ce359f1bfd87da90cc4a57cab0a18f34a48d0"
integrity sha512-eHSaNYEyxRA5IAG0Ym/yCyf86niZUIF/TpWKofQI/CVfh5HsMEUyfE2kwFxha4ow0s5g0LfISQxpDKjbRDrizw==
Expand Down Expand Up @@ -5262,6 +5262,13 @@ chownr@^2.0.0:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==

chromatic@^6.6.3:
version "6.6.3"
resolved "https://registry.yarnpkg.com/chromatic/-/chromatic-6.6.3.tgz#8e66f39b42f64debbe05fdee21ea5bb5fd8c3f94"
integrity sha512-6FS39fAZnQL2A+bECyU469Qo4Th9EYpQ2ciIX/y1Qj+BRQib0N99hab34teYf2bVCD4+WuGMMTdUbt3rp3qcQw==
dependencies:
"@types/webpack-env" "^1.17.0"

chrome-trace-event@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac"
Expand Down

0 comments on commit af610d9

Please sign in to comment.