- Yann Braga (@yannbf)
Feature: Run postVisit on failures (#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:
const config: TestRunnerConfig = {
async postVisit(_page, context) {
if(context.hasFailure) {
console.log('problems!')
// do a snapshot, write a log, or anything you like
}
},
}
- Release 0.20.0 #518 (@yannbf @shilman)
- Feature: Run postVisit on failures #494 (@yannbf)
- Release 0.20.0 #514 (@yannbf runner@fv-az773-358.an51pne1gm2ejjnmkprpigk40g.dx.internal.cloudapp.net)
- Align with Storybook 8.2 core package layout #512 (@yannbf)
- Michael Shilman (@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)
- Release 0.19.0 #486 (@yannbf [email protected] @ysgk)
- Feat: Add errorMessageFormatter #468 (@yannbf [email protected])
- Fix: Combine tags correctly when transforming story files #485 (@yannbf)
- Fix contents of eject functionality #483 (@yannbf)
- Unpin @swc/core from 1.5.7 #481 (@ysgk)
- @ysgk
- Foxhoundn (@Foxhoundn)
- Yann Braga (@yannbf)
- Release 0.18.2 #476 (@shilman @valentinpalkovic @yannbf)
- Fix 8.1.4+ support for v5 index.json #475 (@shilman @yannbf)
- Pin
@swc/core
to 1.5.7 #474 (@shilman)
- Michael Shilman (@shilman)
- Valentin Palkovic (@valentinpalkovic)
- Yann Braga (@yannbf)
- Release 0.18.1 #466 (@yannbf)
- Fix Windows support in coverage generation #461 (@yannbf)
- Fix getStoryContext type #462 (@yannbf)
- Fix: Skip requiring a main.js file in index.json mode #464 (@yannbf)
- Yann Braga (@yannbf)
- Release 0.18.0 #458 (@skratchdot @yannbf)
- Fix coverage reports, add lcov as extra reporter #456 (@yannbf)
- add
--testTimeout
cli option from jest #409 (@skratchdot @yannbf)
- β¬ (@skratchdot)
- Yann Braga (@yannbf)
- Release 0.17.0 #438 (@JReinhold @shilman @valentinpalkovic @yannbf @ndelangen)
- Support Storybook 8 #429 (@yannbf)
- Support unhandled rendering errors #421 (@yannbf)
- Prebundle dependencies #431 (@yannbf)
- Update internal example to Storybook 8 #430 (@yannbf)
- swap storybook/jest to storybook/test #427 (@ndelangen)
- Add PR template #428 (@yannbf)
- Fix build step #425 (@valentinpalkovic)
- Remove --prerelease from sb upgrade CI #423 (@JReinhold)
- Support stories with meta id for permalinking #419 (@yannbf)
- Docs: Add remark regarding pnp support #432 (@yannbf)
- docs: replace postRender(deprecated) with postVisit #418 (@junkisai)
- Jeppe Reinhold (@JReinhold)
- Junki Saito (@junkisai)
- Michael Shilman (@shilman)
- Norbert de Langen (@ndelangen)
- Valentin Palkovic (@valentinpalkovic)
- Yann Braga (@yannbf)
- Filter duplicated error messages in browser logs #405 (@yannbf)
- Fix sync issues between tests #404 (@yannbf)
- Refactor: Extract the setup page scripts into a separate file #403 (@yannbf)
- Docs: Adds feedback form to migration documentation #402 (@jonniebigodes)
- Bump
jest-playwright-preset
fromv3.0.1
tov4.0.0
#400 (@kemuridama) - Improve type safety and code quality #383 (@bryanjtc @yannbf)
- Refactor: Improve internal code #378 (@bryanjtc @yannbf)
- @jonniebigodes
- Bryan Thomas (@bryanjtc)
- Ryo Ochiai (@kemuridama)
- Yann Braga (@yannbf)
- Remove Node 14 from engines field #353 (@legobeat @yannbf)
- Docs: Add react native remark to troubleshooting section #398 (@yannbf)
- Fix "Browser has been closed" crash on uncaught page errors #397 (@yannbf)
- Clarify difference between skipped and excluded tags #396 (@IanVS @yannbf)
- Refactor: Rename "render" hooks to "visit" hooks #394 (@yannbf)
- Docs: Update tags documentation #393 (@yannbf)
- fix: switch
checkStorybook
to useGET
method #385 (@stramel) - Chore: update wait-on and lockfile #389 (@yannbf)
- Add storyshots migration guides #380 (@yannbf @shilman @jonniebigodes)
- @jonniebigodes
- Michael Shilman (@shilman)
- Michael Stramel (@stramel)
- Yann Braga (@yannbf)
- Yann Braga (@yannbf)
- Feature: Support .story files #376 (@yannbf)
- BREAKING: Upgrade Jest to v29 #348 (@yannbf @legobeat)
- BREAKING: Bump minimum Node.js version to ^14.15.0 #354 (@legobeat)
- Add waitForPageReady utility #361 (@yannbf)
- Documentation: restructure docs and include more recipes #373 (@yannbf)
- Run nyc with correct packager manager command #364 (@ferdinandhummel-gph @yannbf)
- deps/devDeps: bump semver to latest [CVE-2022-25883] #349 (@legobeat)
- Make userAgent configurable #342 (@jaknas)
- devDeps: Bump auto from v10 to v11 #346 (@legobeat)
- CI: Fix yarn 2 issue #352 (@yannbf)
- chore: set
engines.node
to>=12.0.0
#351 (@legobeat) - Maintenance: Update to yarn berry #344 (@yannbf)
- Maintenance: Remove csf upgrade in nightly check #343 (@yannbf)
- chore: disable yarn telemetry by default #350 (@legobeat)
- chore: dedupe dependency versions in
yarn.lock
#347 (@legobeat)
- @ferdinandhummel-gph
- @legobeat
- Jakub NaskrΔski (@jaknas)
- Yann Braga (@yannbf)
- Add ability to fail on console errors #321 (@work933k @yannbf)
- Support importing stories from separate packages #339 (@yannbf)
- Maintenance: Update storybook example to vite and typescript #340 (@yannbf)
- Add coverage directory option #272 (@ferdinandhummel-gph @yannbf)
- @ferdinandhummel-gph
- @work933k
- Yann Braga (@yannbf)
- maintenance: remove no-manager-cache flag in example storybook #331 (@MH4GF)
- Fix extra args not being passed to jest #322 (@zyulyaev @yannbf)
- Fix empty coverage report #324 (@bryanjtc @yannbf)
- docs: fix github actions example for shard usage #320 (@MH4GF)
- Bryan Thomas (@bryanjtc)
- Hirotaka Miyagi (@MH4GF)
- Nikita Zyulyaev (@zyulyaev)
- Valentin Palkovic (@valentinpalkovic)
- Yann Braga (@yannbf)
- Release 0.11.0 #318 (@bryanjtc @yannbf @ndelangen @unshame @valentinpalkovic @vanessayuenn)
- Bundle with tsup and replace babel-jest #250 (@bryanjtc @yannbf @ndelangen)
- Change dependencies from
future
npm tag tonext
#315 (@yannbf) - fix: nyc command with shard option #257 (@bryanjtc @yannbf)
- Improve ejected config types #297 (@yannbf)
- fix: Remove last reference to regenerator-runtime #303 (@bryanjtc)
- fix(test-storybook): Fix test-runner-jest.config.js file not being found in STORYBOOK_CONFIG_DIR on Windows #296 (@unshame)
- Upgrade glob to v10 #299 (@valentinpalkovic)
- Bryan Thomas (@bryanjtc)
- Norbert de Langen (@ndelangen)
- UnShame (@unshame)
- Valentin Palkovic (@valentinpalkovic)
- Vanessa Yuen (@vanessayuenn)
- Yann Braga (@yannbf)
- Bump @storybook/csf to 0.1.0 #288 (@kasperpeulen)
- support Storybook 7.0.0 #283 (@yannbf)
- Update getStorybookMain to throw an error if stories are not found in main.js #278 (@valentinpalkovic)
- Extend hooks api with
prepare
andgetHttpHeaders
properties #245 (@yannbf) - Use preview api instead of store #273 (@kasperpeulen)
- Support other test-runner config extensions #259 (@yannbf)
- Use ipv4 loopback address #252 (@IanVS)
- Fix safe json stringify code #239 (@hansottowirtz)
- feat: add shard cli option #243 (@Niznikr @yannbf)
- Updating deps to handle TS 4.9 #237 (@kasperpeulen)
- Fix target url in error feedback #233 (@yannbf)
- Remove unused development packages #227 (@yannbf)
- Make setup-page globally available for index.json mode compatibility #217 (@yannbf)
- Upgrade CSF to next #212 (@shilman)
- Fix missing dependencies #209 (@bryanjtc)
- Document index.json mode for Svelte CSF #263 (@JReinhold)
- Docs: add recipe for browser name #221 (@yannbf)
- Bryan Thomas (@bryanjtc)
- Hans Otto Wirtz (@hansottowirtz)
- Ian VanSchooten (@IanVS)
- Jeppe Reinhold (@JReinhold)
- Kasper Peulen (@kasperpeulen)
- Michael Shilman (@shilman)
- Robert Niznik (@Niznikr)
- Valentin Palkovic (@valentinpalkovic)
- Yann Braga (@yannbf)
- Release 0.9.4 #258 (@yannbf)
- Support other test-runner config extensions #259 (@yannbf)
- Use ipv4 loopback address #252 (@IanVS)
- Fix safe json stringify code #239 (@hansottowirtz)
- Hans Otto Wirtz (@hansottowirtz)
- Ian VanSchooten (@IanVS)
- Yann Braga (@yannbf)
- Yann Braga (@yannbf)
- Release 0.9.1 #223 (@yannbf @shilman)
- Fix missing dependencies #209 (@bryanjtc)
- Make setup-page globally available for index.json mode compatibility #217 (@yannbf)
- Upgrade nightly to next instead of future #213 (@shilman)
- feat: add cli option --ci #204 (@italoteix)
- Upgrade preset-env to latest #202 (@shilman)
- Fix nightly check for failures #197 (@yannbf)
- Improve error logging and ensure non-zero exit #201 (@IanVS)
- Ian VanSchooten (@IanVS)
- Γtalo Teixeira (@italoteix)
- Michael Shilman (@shilman)
- Yann Braga (@yannbf)
- Fix StorybookTestRunnerError β length on undefined #194 (@ericclemmons)
- Eric Clemmons (@ericclemmons)
- Ian VanSchooten (@IanVS)
- Yann Braga (@yannbf)
- Support Storybook 7.0 play function exceptions #190 (@tmeasday @yannbf)
- fix snapshots & remove vscode color settings #192 (@ndelangen)
- Michael Shilman (@shilman)
- Norbert de Langen (@ndelangen)
- Tom Coleman (@tmeasday)
- Yann Braga (@yannbf)
- docs(README): Update a11y recipe #186 ([email protected])
- Ian VanSchooten (@IanVS)
- Michael Shilman (@shilman)
- Nagisa Ando (@nagisaando)
- Yann Braga (@yannbf)
Update Jest to 28 (#174)
This release updates the internal version of Jest to version 28. You can now remove jest
and jest-preset-playwright
from your package.json
if you're not using them in other parts of your project!
- Yann Braga (@yannbf)
add --junit flag to test runner (#179)
The test runner now supports JUnit XML test reports out of the box with a --junit
flag:
yarn test-storybook --junit
With that flag, the test runner will add jest-junit
to the reporters list and generate a test report in a JUnit XML format. You can further configure the behavior of jest-junit
by either setting specific JEST_JUNIT_*
environment variables or by defining a jest-junit
field in your package.json with the options you want, which will be respected when generating the report. You can look at all available options here: https://github.com/jest-community/jest-junit#configuration
- Yann Braga (@yannbf)
Support storyStoreV7 in coverage check (#177)
This release fixes an issue where the coverage check was not working for projects using storyStoreV7.
- Yann Braga (@yannbf)
feat: turn Jest into an internal dependency (#175)
The Storybook test runner will now contain Jest as an internal dependency, which means that if you installed Jest just for the purpose of using the Storybook test runner, you can now remove it!
- Yann Braga (@yannbf)
support Storybook 7.0 root selector (#172)
In Storybook 7.0, the root selector changed from #root to #storybook-root. Both selectors are now supported in the internals of the test runner
- Yann Braga (@yannbf)
fix --watch cli option (#168)
The --watch
flag was previously not working, and now it's fixed.
feat: throw error on unconfigured coverage when running with --coverage (#166)
The test runner now throws an error when running yarn test-storybook --coverage
and the coverage is not correctly set up. This could mean that an user might be running --coverage
without instrumenting their code with istanbul, which would lead to problems!
feat: add console logs on test failure (#157)
feat: add console logs on test failure This version adds console logs to the output of failed tests, in order to as provide as much information as possible to help you diagnose your issues.
feat: jest 28 support (#154)
This release updates jest-playwright
to version 2.0.0 which adds support for Jest 28. In order to maintain backwards compatibility with Jest 27, you might have to take a few steps in case you are installing the test runner for the first time, or if you don't keep package locks in your project.
You can find more info at https://github.com/storybookjs/test-runner#jest-27-support
- feat: add console logs on test failure #157 (@yannbf)
- feat: jest 28 support #154 (@andykenward @yannbf)
- Add commit hooks #170 (@yannbf)
- undo Jest 28 support #169 (@yannbf)
- fix --watch cli option #168 (@yannbf)
- feat: throw error on unconfigured coverage when running with --coverage #166 (@yannbf)
- Document new cli options #167 (@yannbf)
- Add nightly check for failures #165 (@yannbf)
- Update stories in example Storybook #164 (@yannbf)
- use storybook@future on nightly script #162 (@yannbf)
- Andy Kenward (@andykenward)
- Yann Braga (@yannbf)
Replace is-localhost-ip with can-bind-to-host (#144)
This release replaces an internal dependency is-localhost-ip
with can-bind-to-host
due to a licensing issue in can-bind-to-host
.
- fix: support index.html URLs #139 (@yannbf)
- Document need for a custom snapshotResolver #131 (@FokkeZB)
- Fokke Zandbergen (@FokkeZB)
- Kaelig Deloumeau-Prigent (@kaelig)
- Tom Coleman (@tmeasday)
- Yann Braga (@yannbf)
Support code coverage (#120)
Support code coverage (#120)
- Yann Braga (@yannbf)
feat: provide global getStoryContext utility (#125)
- chore(DEPS): update jest-playwright-preset #119 (@bodograumann)
- chore(CI): add sb versions to report [skip release] #118 (@yannbf)
- feat: support DOM snapshot testing #117 (@yannbf)
- Add reporting to CI #113 (@yannbf)
- Updates readme to lock Jest to version 27 #115 (@jonniebigodes)
- @jonniebigodes
- Bodo Graumann (@bodograumann)
- Yann Braga (@yannbf)
- Document issue with Jest on Windows CI #105 (@joshwooding)
- Josh Wooding (@joshwooding)
- Yann Braga (@yannbf)
fix: Support Storybook 6.5 (#107)
This version adds support to Storybook 6.5 and drops support for Storybook 6.4. Unfortunately there was a breaking change in an internal API from @storybook/store
which is used by the test runner, which only affects users that use the auto title feature.
Changes included from this pull request (#107)
- fix: Support Storybook 6.5 #107 ([email protected] @yannbf @valentinpalkovic)
- Valentin Palkovic (@valentinpalkovic)
- Valentin PalkoviΔ ([email protected])
- Yann Braga (@yannbf)
- Move storybook packages to peer deps #101 (@IanVS @yannbf)
- Limit jest to version 26 or 27 #98 (@bodograumann)
- Bodo Graumann (@bodograumann)
- Ian VanSchooten (@IanVS)
- Yann Braga (@yannbf)
- Fixup README typo. #93 (@MichaelHatherly)
- Add output limit #94 (@yannbf)
- Michael Hatherly (@MichaelHatherly)
- Yann Braga (@yannbf)
- cleanup page opened log #86 (@yannbf)
- Add ability to test docs pages via VIEW_MODE env var #79 (@shilman)
- cleanup jsdom related code #67 (@yannbf)
- Gert Hengeveld (@ghengeveld)
- Michael Shilman (@shilman)
- Yann Braga (@yannbf)
- Yann Braga (@yannbf)
- fix: reset page between tests #47 (@yannbf)
- feat: add typeahead jest plugin #61 (@yannbf)
- feat: auto detect stories json mode #60 (@yannbf)
- feat: add url flag #58 (@yannbf)
- feat: add browsers flag #55 (@yannbf)
- fix: add file location to eject error message #57 (@yannbf)
- feat: add eject command #54 (@yannbf)
- Test-runner file for hook configuration #53 (@shilman)
- feat: add update snapshot command to cli #52 (@yannbf)
- fix: improve error message in start-storybook #51 (@yannbf)
- Respect stories defined in main.js #46 (@yannbf)
- Add setPreRender/setPostRender hooks & example #38 (@shilman @yannbf)
- Add CLI wrapper #41 (@yannbf)
- Cleanup play function checks #37 (@yannbf)
- Support auto title stories #35 (@yannbf)
- Add stories.json support #31 (@shilman)
- Add test runner to ci #26 (@yannbf @shilman)
- Update ci recipes and timeout feedback #27 (@yannbf)
- fix: move test-runner default configuration location and resolution #25 (@yannbf)