Clarify storybook tests (#6073)

In this PR, I'm simplifying storybook setup:
1) Remove build --test configuration that prevent autodocs. We are not
using autodocs at all (the dev experience is not good enough), so I have
completely disabled it.
2) Clarify `serve` vs `test` vs `serve-and-test` configurations


After this PR:
- you can serve storybook in two modes: `npx nx run
twenty-front:storybook:serve:dev` and `npx nx run
twenty-front:storybook:serve:static`
- you can run tests agains an already served storybook (this is useful
in dev so you don't have to rebuild everytime to run tests): `npx nx run
twenty-front:storybook:test`
- you can conbine both: `npx nx run
twenty-front:storybook:serve-and-test:static`
This commit is contained in:
Charles Bochet
2024-06-30 20:02:13 +02:00
committed by GitHub
parent 36530dbe89
commit 6683ffb890
9 changed files with 64 additions and 99 deletions

View File

@ -28,9 +28,9 @@ nx lint twenty-front
```bash
nx test twenty-front# run jest tests
nx storybook:dev twenty-front# run storybook
nx storybook:test twenty-front# run tests # (needs yarn storybook:dev to be running)
nx storybook:coverage twenty-front # (needs yarn storybook:dev to be running)
nx storybook:serve:dev twenty-front# run storybook
nx storybook:test twenty-front# run tests # (needs yarn storybook:serve:dev to be running)
nx storybook:coverage twenty-front # (needs yarn storybook:serve:dev to be running)
```
## Tech Stack