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

Added snapshotWithOptions to configure storyshots rendering options #1090

Merged
merged 3 commits into from
May 23, 2017

Conversation

tmeasday
Copy link
Member

Issue:

See for instance #896 -- it's a common problem to need mocked nodes.

This solution is probably a bit of a bandaid, as large projects would probably want to set options per-story, this is a lot better than nothing in the meantime.

Fixes #1085, and to some degree #881 and #876

What I did

Added a snapshotWithOptions test body, and an example of usage in the test-cra app.

How to test

Run npm test. Try removing the test option and it should fail with an undefined access issue.

See for instance #896 -- it's a common problem to need mocked nodes. 

This solution is probably a bit of a bandaid, as large projects would probably want to set options per-story, this is a lot better than nothing in the meantime.
@tmeasday tmeasday requested a review from ndelangen May 22, 2017 05:29
@tmeasday tmeasday changed the title Added a snapshotWithOptions test body and example Added a snapshotWithOptions to allow configuring rendering options in Storyshots May 22, 2017
@tmeasday tmeasday changed the title Added a snapshotWithOptions to allow configuring rendering options in Storyshots Added snapshotWithOptions to allow configuring rendering options in Storyshots May 22, 2017
@tmeasday tmeasday mentioned this pull request May 22, 2017
@tmeasday tmeasday merged commit 52cffb8 into master May 23, 2017
@shilman shilman added the misc label May 27, 2017
@ndelangen ndelangen deleted the component-with-ref-example branch May 27, 2017 22:54
@shilman shilman changed the title Added snapshotWithOptions to allow configuring rendering options in Storyshots Added snapshotWithOptions to configure Storyshots rendering options May 28, 2017
@shilman shilman changed the title Added snapshotWithOptions to configure Storyshots rendering options Added snapshotWithOptions to configure storyshots rendering options May 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants