Skip to content
This repository has been archived by the owner on Dec 13, 2017. It is now read-only.

Incompatible with storyshots #17

Closed
bjankord opened this issue Nov 7, 2017 · 6 comments
Closed

Incompatible with storyshots #17

bjankord opened this issue Nov 7, 2017 · 6 comments

Comments

@bjankord
Copy link

bjankord commented Nov 7, 2017

We have a project we are using storyshots with storybook-addon-a11y. While we can run storybook in the browser without issue, when we run the tests based on the storyshots, we are getting multiple Invariant Violation: getNodeFromInstance: Invalid argument. errors.

Doing a quick google search on this error message led me to facebook/react#8324

It makes me think the use of findDomNode here is what is causing compatibility issues with storyshots.

@bjankord
Copy link
Author

bjankord commented Nov 8, 2017

@zinserjan Are you able to run this with storyshots, I saw your commit for updating WrapStory.js from using refs to findDomNode was to help with testing against the original html structure with storyshot’s snapshot testing.

@bjankord
Copy link
Author

bjankord commented Nov 8, 2017

I tried downgrading the version of storybook-addon-a11y to v3.0.0 which uses refs instead of findDOMNode and snapshot tests worked, though they had the extra span element which I believe is was @zinserjan was working to remove in his commit with switching to using findDOMNode.

@ndelangen
Copy link
Collaborator

@bjankord Is there some way you could help us with bringing back compatibility?

@bjankord
Copy link
Author

I'd really like to, I think this is a valuable addon for storybook, but at this time I don't foresee having the capacity to achieve this.

@ndelangen
Copy link
Collaborator

I'll be achieving this repo soon, after merging this into the monorepo.

Whilst doing this I was actually able to run storyshots just fine, maybe I fixed the problem?
storybookjs/storybook@862d4cf

@ndelangen
Copy link
Collaborator

FYI I have merged this repo into the monorepo!

Please do not open any issues or PR's directly on this repo, but instead open them here:
https://github.com/storybooks/storybook

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants