Skip to content

Commit 9baa831

Browse files
IBX-10622: Added chromatic config (#45)
* IBX-10622: Added chromatic config * IBX-10622: Added missing comma * IBX-10622: Added temp worfklow on pull_request * IBX-10622: Added fetch-depth * IBX-10622: Removed temp workflow on pull_request
1 parent 7fc531c commit 9baa831

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

.github/workflows/chromatic.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Visual tests"
2+
3+
on:
4+
workflow_dispatch: ~
5+
6+
jobs:
7+
chromatic:
8+
name: Run Chromatic
9+
runs-on: 'ubuntu-24.04'
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
- name: Install dependencies
19+
run: yarn
20+
- name: Run Chromatic
21+
uses: chromaui/action@latest
22+
with:
23+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

.storybook/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const config = {
3737
},
3838
},
3939
path.resolve(__dirname, '../src/storybook/addons/framework-selector/index.ts'),
40+
'@chromatic-com/storybook',
4041
],
4142
framework: {
4243
name: '@storybook/react-webpack5',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@babel/preset-env": "^7.27.2",
2626
"@babel/preset-react": "^7.27.1",
2727
"@babel/preset-typescript": "^7.27.1",
28+
"@chromatic-com/storybook": "^4.1.1",
2829
"@ibexa/eslint-config": "https://github.com/ibexa/eslint-config-ibexa#~v2.0.0",
2930
"@ibexa/ts-config": "https://github.com/ibexa/ts-config-ibexa#~v1.1.0",
3031
"@storybook/addon-a11y": "^9.0.4",

stories/Icons.stories.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ const meta: Meta<typeof IconsList> = {
4848
component: IconsList,
4949
parameters: {
5050
layout: 'padded',
51+
// Disables Chromatic's snapshotting on a component level
52+
chromatic: { disableSnapshot: true },
5153
},
5254
tags: [],
5355
};

0 commit comments

Comments
 (0)