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

Fixing issue where upon completion of async Mocha tests the specifications panel re-renders with new results regardless of the current story in Storybook #52

Merged

Conversation

therealparmesh
Copy link
Contributor

@therealparmesh therealparmesh commented Jul 24, 2017

This pull request aims to finish what was started in #47 by fixing a bug where the specifications panel always renders the results of the last component with asynchronous mocha tests on the initial load of a Storybook instance.

Let's say you have three components with stories and tests - A, B, and C. And let's say that component B has an asynchronous test. The current behavior is such that if you open a new tab in your web browser and initially land on either component A or component C, the test results of component B will show up in the specifications panel.

This bug exists because the specifications panel re-renders regardless of the current story in Storybook upon the completion of an asynchronous test.

Please let me know your thoughts on my proposed solution. Thank you!

@therealparmesh therealparmesh force-pushed the async_mocha_tests_render_to_panel_fix branch from 462f57a to ef2801f Compare July 24, 2017 15:35
@therealparmesh therealparmesh force-pushed the async_mocha_tests_render_to_panel_fix branch from ef2801f to a8e861c Compare July 24, 2017 15:53
@therealparmesh therealparmesh changed the title Fixing issue where upon completion of async mocha tests the specifications panel re-renders with new results regardless of the current story in Storybook Fixing issue where upon completion of async Mocha tests the specifications panel re-renders with new results regardless of the current story in Storybook Jul 24, 2017
@therealparmesh therealparmesh force-pushed the async_mocha_tests_render_to_panel_fix branch 2 times, most recently from dbd5f73 to 8cf0f73 Compare July 24, 2017 16:16
…tions panel re-renders with new results regardless of the current story in Storybook
@therealparmesh therealparmesh force-pushed the async_mocha_tests_render_to_panel_fix branch from 8cf0f73 to 7b2aa21 Compare July 24, 2017 16:19
@mthuret
Copy link
Owner

mthuret commented Jul 26, 2017

Seems like a good way to fix this @therealparmesh. I'll merge this and release it soon. Thank you!

@mthuret mthuret merged commit a2b5259 into mthuret:master Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants