Skip to content

Commit

Permalink
Add Chromatic visual regression tests for UI component
Browse files Browse the repository at this point in the history
  • Loading branch information
jonniebigodes committed Dec 21, 2023
1 parent bab74c1 commit b9671fb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/chromatic.yml
@@ -0,0 +1,20 @@
# name of our action
name: "Chromatic Deployment"
# the event that will trigger the action
on: push

# what the action will do
jobs:
test:
# the operating system it will run on
runs-on: ubuntu-latest
# the list of steps that the action will go through
steps:
- uses: actions/checkout@v1
- run: yarn
- uses: chromaui/action@v1
# options required to the GitHub Chromatic action
with:
# Chromatic projectToken, see https://storybook.js.org/tutorials/visual-testing-handbook/react/en/automate/ to obtain it
projectToken: 385f9df90462
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -27,6 +27,7 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.0.0-beta.0",
"chromatic": "^10.1.0",
"eslint": "^8.38.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -3453,6 +3453,11 @@ chownr@^2.0.0:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==

chromatic@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/chromatic/-/chromatic-10.1.0.tgz#d82f3045c297fb9a2d752aa1322d5fdb2cd3fd78"
integrity sha512-S+ztO8f1k/LckuzJKCqaTs6AfUQ0eLNT9kEoyCUwX7gkJnveQo5JStCfY55v30zogjRkHJpwqzEfSXl6AwO2tQ==

ci-info@^3.2.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
Expand Down

0 comments on commit b9671fb

Please sign in to comment.