Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix storyshots renderer and serializer options #3252

Merged
merged 2 commits into from
Mar 21, 2018

Conversation

theneva
Copy link
Contributor

@theneva theneva commented Mar 21, 2018

What I did

Fixed passthrough of options from initStoryshotsto snapshotWithOptions. In practice, this makes it possible to send renderer and serializer as options in the intended way (as documented in storyshots' README).

How to test

I've updated the snapshots from storyshot.enzyme.test.js which uses a custom renderer (enzyme's mount) and serializer (enzyme-to-json).

Edit: CI is red due to some kind of versioning errors. I don't know what causes that, since my branch is not behind master. I'll be happy to fix it if someone points me in the right direction :)

@theneva theneva force-pushed the fix-storyshots-renderer-option branch from a4869c3 to b41ffb6 Compare March 21, 2018 14:38
@codecov
Copy link

codecov bot commented Mar 21, 2018

Codecov Report

Merging #3252 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3252   +/-   ##
=======================================
  Coverage   35.86%   35.86%           
=======================================
  Files         440      440           
  Lines        9682     9682           
  Branches      909      899   -10     
=======================================
  Hits         3472     3472           
- Misses       5621     5628    +7     
+ Partials      589      582    -7
Impacted Files Coverage Δ
addons/storyshots/src/index.js 85.71% <100%> (ø) ⬆️
app/react/src/server/utils.js 0% <0%> (-100%) ⬇️
.../src/modules/ui/components/stories_panel/header.js 28.57% <0%> (ø) ⬆️
...-native/src/preview/components/OnDeviceUI/style.js 0% <0%> (ø) ⬆️
...s/actions/src/lib/types/function/createFunction.js 53.33% <0%> (ø) ⬆️
lib/ui/src/modules/shortcuts/actions/shortcuts.js 18.84% <0%> (ø) ⬆️
addons/info/src/components/types/PropertyLabel.js 78.94% <0%> (ø) ⬆️
addons/actions/src/lib/util/typeReplacer.js 54.54% <0%> (ø) ⬆️
lib/core/src/client/preview/reducer.js 37.5% <0%> (ø) ⬆️
addons/knobs/src/components/types/Button.js 11.9% <0%> (ø) ⬆️
... and 62 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28bd444...5d05062. Read the comment docs.

@Hypnosphi Hypnosphi added bug addon: storyshots patch:yes Bugfix & documentation PR that need to be picked to main branch labels Mar 21, 2018
@Hypnosphi Hypnosphi requested a review from igor-dv March 21, 2018 16:21
Copy link
Member

@igor-dv igor-dv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@igor-dv igor-dv merged commit 6066967 into storybookjs:master Mar 21, 2018
@theneva theneva deleted the fix-storyshots-renderer-option branch March 21, 2018 17:59
@theneva
Copy link
Contributor Author

theneva commented Mar 21, 2018

Thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: storyshots bug patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants