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 May 3, 2023
1 parent bb2471f commit 5cc3b2c
Show file tree
Hide file tree
Showing 3 changed files with 686 additions and 16 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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@v3
with:
fetch-depth: 0
- 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 @@ -42,6 +42,7 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^3.1.0",
"chromatic": "^6.17.4",
"msw": "^1.2.1",
"msw-storybook-addon": "^1.8.0",
"prop-types": "^15.8.1",
Expand Down
Loading

0 comments on commit 5cc3b2c

Please sign in to comment.