-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Show progress of the addons-storyshot run #3590
Comments
I tried my hands a little bit onto this, but any attempts in trying to log something to the terminal from https://github.com/storybooks/storybook/blob/master/addons/storyshots/src/index.js when running the tests failed for me. This seem to involve some irregular longstanding issue at Jest regarding console output being swallowed by the tests output. Maybe @ndelangen you have a bit more insight into a way for this? |
I have no idea how storyshots is implemented under the hood beyond a cursory look now, but I think some way of making separate story files into separate test files would be the best. We collect all results from a single test file before passing the result on to reporters. I don't think we have a way of streaming the results per test. That would also help keep the Not sure how feasible that is, though. |
Hmm I'm guessing a totally alternative route that would make that work, would be to add story-files as test-files themselves and have a transformer applied on them? But that sounds easier then it is, since storybook support global options and decorators.. |
FWIW we've got an issue for reporting tests as completed as they are, rather than wait for the whole suite to complete (jestjs/jest#6616). I'd still recommend looking into splitting it up into multiple test files for better concurrency. |
Re-opening this issue based on the previous comment as the related topic is atm being discussed in Jest itself.
@ndelangen would it make sense to make a note about this in the storyshots documentation? Or hold of to see what happens at Jest's side? |
BTW, with the new feature, It might be much easier |
Interesting @igor-dv ! The splitting into files you mean? Requires a bulk of work on the user's part that way. If we could leverage the component-story files themselves, people would not have to add any files, in fact remove some.. |
Nice! I wonder if that'll fix/help #3286 at the same time |
Yeah possibly |
Update in 2019, one can do this:
|
@verticalgrain I did the same, but without delay |
If storyshots is already separate test cases within a test file (which I believe it is: https://github.com/storybookjs/storybook/blob/0cae839ac299edcdc5e69116913835a769173f1f/addons/storyshots/storyshots-core/src/api/snapshotsTestsTemplate.ts), this should be fixed in Jest 26.3+ if you use Again, separate files for tests are probably better in order to properly utilize parallelization across CPUs, but the originally reported "no feedback until complete" should be solved. |
Bug or support request summary
When executing screenshot tests with addons-storyshot plugin on the large project it shows only initial start message then it looks like it froze when in reality it just has a lot things to do. I'm wondering it it's all possible to show the progress of it?
Steps to reproduce
I suppose default setup of addons-storyshot will do
Please specify which version of Storybook and optionally any affected addons that you're running
@storybook/react@3.2.12
@storybook/addon-storyshots@4.0.0-alpha.6
The text was updated successfully, but these errors were encountered: