Skip to content

Commit

Permalink
Run doc server 4 testing stories
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Aug 8, 2024
1 parent 5395d1d commit 61b2b90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,11 @@ jobs:
with:
files: ./coverage/clover.xml
use_oidc: true
- name: Build docs
run: pnpm run docs
- name: Test stories
run: pnpm playwright test stories/snapshot.spec.ts
run: |
# Run the preview server in the background
pnpm preview &
sleep 3
pnpm playwright test stories/snapshot.spec.ts
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ If stories needs reusable helper code that should not be part of the package, th
The stories can be tested using [Visual Snapshots](https://ladle.dev/docs/visual-snapshots) with

```bash
pnpm run docs
pnpm preview
# In another shell
pnpm playwright test stories/snapshot.spec.ts
```
(A new story will fail initially, but after snapshot (stories/snapshot.spec.ts-snapshots/*.png) is created it will pass.)
Expand Down

0 comments on commit 61b2b90

Please sign in to comment.