File tree Expand file tree Collapse file tree 7 files changed +559
-17
lines changed Expand file tree Collapse file tree 7 files changed +559
-17
lines changed Original file line number Diff line number Diff line change 6
6
github_token :
7
7
description : GitHub token
8
8
required : true
9
+ chromatic_token :
10
+ description : Chromatic token
11
+ required : true
9
12
10
13
runs :
11
14
using : composite
23
26
shell : bash
24
27
run : npx nx build headless
25
28
29
+ - name : Publish to Chromatic
30
+ uses : chromaui/action@v1
31
+ # Chromatic GitHub Action options
32
+ with :
33
+ # 👇 Chromatic projectToken, refer to the manage page to obtain it.
34
+ projectToken : ${{ inputs.github_token }}
35
+
26
36
# - name: Build Daisy Theme
27
37
# shell: bash
28
38
# run: npx nx build daisy
Original file line number Diff line number Diff line change 28
28
uses : ./.github/actions/test
29
29
with :
30
30
github_token : ${{ secrets.GITHUB_TOKEN }}
31
+ chromatic_token : ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
Original file line number Diff line number Diff line change 11
11
"commit" : " git-cz" ,
12
12
"format:fix" : " pretty-quick --staged" ,
13
13
"prepare" : " husky install" ,
14
- "test:headless" : " nx component-test headless --watch"
14
+ "test:headless" : " nx component-test headless --watch" ,
15
+ "story:headless" : " nx build-storybook headless"
15
16
},
16
17
"devDependencies" : {
17
18
"@builder.io/qwik" : " 0.101.0" ,
51
52
"all-contributors-cli" : " ^6.24.0" ,
52
53
"autoprefixer" : " ^10.4.13" ,
53
54
"axe-core" : " 4.6.3" ,
55
+ "chromatic" : " 6.17.3" ,
54
56
"commitizen" : " ^4.3.0" ,
55
57
"commitlint" : " ^17.4.3" ,
56
58
"country-list-json" : " 1.1.0" ,
Original file line number Diff line number Diff line change 20
20
"node" : " >=16.0.0"
21
21
},
22
22
"private" : false ,
23
- "scripts" : {
24
- "build" : " qwik build" ,
25
- "build.lib" : " vite build --mode lib" ,
26
- "build.types" : " tsc --emitDeclarationOnly" ,
27
- "dev" : " vite --mode ssr" ,
28
- "dev.debug" : " node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force" ,
29
- "fmt" : " prettier --write ." ,
30
- "fmt.check" : " prettier --check ." ,
31
- "release" : " np" ,
32
- "start" : " vite --open --mode ssr" ,
33
- "qwik" : " qwik" ,
34
- "storybook1" : " storybook dev -p 6006" ,
35
- "build-storybook1" : " storybook build"
36
- },
23
+ "scripts" : {},
37
24
"dependencies" : {
38
25
"@floating-ui/dom" : " 1.0.10"
39
26
}
Original file line number Diff line number Diff line change 93
93
}
94
94
}
95
95
},
96
+ "test-storybook" : {
97
+ "executor" : " nx:run-commands" ,
98
+ "options" : {
99
+ "command" : " pnpm test-storybook --url http://localhost:4400" ,
100
+ "cwd" : " packages/headless"
101
+ }
102
+ },
96
103
"component-test" : {
97
104
"executor" : " @nrwl/cypress:cypress" ,
98
105
"options" : {
Original file line number Diff line number Diff line change @@ -14,14 +14,14 @@ type Story = StoryObj<AccordionProps>;
14
14
export const Primary : Story = {
15
15
render : ( ) => (
16
16
< Accordion >
17
- < AccordionItem label = "Item 1" > This is a test</ AccordionItem >
17
+ < AccordionItem label = "Item 1" > This is a test 1 </ AccordionItem >
18
18
</ Accordion >
19
19
) ,
20
20
play : async ( { canvasElement } ) => {
21
21
const canvas = within ( canvasElement ) ;
22
22
23
23
await userEvent . click ( canvas . getByText ( 'Item 1' ) ) ;
24
24
25
- await expect ( canvas . getByText ( 'This is a test' ) ) . toBeInTheDocument ( ) ;
25
+ await expect ( canvas . getByText ( 'This is a test 1 ' ) ) . toBeInTheDocument ( ) ;
26
26
} ,
27
27
} ;
You can’t perform that action at this time.
0 commit comments