Skip to content

Commit

Permalink
Merge branch 'main' into release/v0.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Dec 2, 2024
2 parents eb1a945 + 8dabc7a commit faeafe7
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 159 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
# v0.20.0 (Thu Nov 28 2024)

### Release Notes

#### Feature: Run postVisit on failures ([#494](https://github.com/storybookjs/test-runner/pull/494))

The test-runner's postVisit hook now runs even if there are failures. This allows you to, for instance, take snapshots on component failures. You can check whether the test has failed via the `hasFailure` property in the context passed to the hook:

```ts
const config: TestRunnerConfig = {
async postVisit(_page, context) {
if(context.hasFailure) {
console.log('problems!')
// do a snapshot, write a log, or anything you like
}
},
}
```

---

#### 🚀 Enhancement

- Release 0.20.0 [#518](https://github.com/storybookjs/test-runner/pull/518) ([@yannbf](https://github.com/yannbf) [@shilman](https://github.com/shilman))
- Feature: Run postVisit on failures [#494](https://github.com/storybookjs/test-runner/pull/494) ([@yannbf](https://github.com/yannbf))
- Release 0.20.0 [#514](https://github.com/storybookjs/test-runner/pull/514) ([@yannbf](https://github.com/yannbf) runner@fv-az773-358.an51pne1gm2ejjnmkprpigk40g.dx.internal.cloudapp.net)
- Align with Storybook 8.2 core package layout [#512](https://github.com/storybookjs/test-runner/pull/512) ([@yannbf](https://github.com/yannbf))

#### 📝 Documentation

- Fix tags docs [#497](https://github.com/storybookjs/test-runner/pull/497) ([@shilman](https://github.com/shilman) [@yannbf](https://github.com/yannbf))

#### Authors: 6

- Michael Shilman ([@shilman](https://github.com/shilman))
- shilman (runner@fv-az1567-4.ivwpl3vsblrubjity54i0equac.phxx.internal.cloudapp.net)
- shilman (runner@fv-az2031-358.rag0t2s20xiu3oejmeweyzhkrf.bx.internal.cloudapp.net)
- shilman (runner@fv-az738-609.ayi0s4js3kfu5apuyubnvt3std.cx.internal.cloudapp.net)
- shilman (runner@fv-az773-358.an51pne1gm2ejjnmkprpigk40g.dx.internal.cloudapp.net)
- Yann Braga ([@yannbf](https://github.com/yannbf))

---

# v0.19.1 (Mon Jul 15 2024)

#### 🐛 Bug Fix
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@storybook/test-runner",
"version": "0.19.1",
"version": "0.20.0",
"description": "Test runner for Storybook stories",
"keywords": [
"storybook-addons",
Expand Down Expand Up @@ -78,11 +78,11 @@
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.18.6",
"@storybook/addon-coverage": "^1.0.0",
"@storybook/addon-essentials": "next",
"@storybook/addon-interactions": "next",
"@storybook/react": "next",
"@storybook/react-vite": "next",
"@storybook/test": "next",
"@storybook/addon-essentials": "^8.0.0",
"@storybook/addon-interactions": "^8.0.0",
"@storybook/react": "^8.0.0",
"@storybook/react-vite": "^8.0.0",
"@storybook/test": "^8.0.0",
"@types/jest": "^29.0.0",
"@types/node": "^16.4.1",
"@types/node-fetch": "^2.6.11",
Expand All @@ -104,7 +104,7 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"read-pkg-up": "^7.0.1",
"storybook": "next",
"storybook": "^8.0.0",
"tempy": "^1.0.1",
"ts-dedent": "^2.0.0",
"ts-jest": "^29.0.0",
Expand Down
Loading

0 comments on commit faeafe7

Please sign in to comment.