We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Problem: Storyshots screenshot is sometimes a white image.
The components being tested are Angular 5 components.
I am using latest version of storybook and addons.
storybook
I am initializing storyshots using the following:
storyshots
initStoryshots({ suite: "Image storyshots", test: imageSnapshot({ storybookUrl: `file://${path.join(process.cwd(), "storybook-static")}`, getGotoOptions: ({ context, url }) => ({ waitUntil: "domcontentloaded" }) }) });
I tried all puppeteer waitUntil parameters from https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options however nothing worked.
waitUntil
Puppeteer has an open issue to add a waitUntilTime api, however the issue is still open and unanswered: puppeteer/puppeteer#2238
waitUntilTime
In the meantime, could storyshots implement something similar to guarantee that a component is fully rendered before a screenshot is taken?
The text was updated successfully, but these errors were encountered:
You can use this approach: https://github.com/storybooks/storybook/tree/master/addons/storyshots#specifying-options-to-jest-image-snapshots
But maybe we could implement a more explicit API for delays, @thomasbertet WDYT?
Sorry, something went wrong.
@Hypnosphi I think beforeScreenshot is good enough till waitUntilTime or similar is implemented by Puppeteer.
beforeScreenshot
Things are working correctly now, thanks!
You can use this approach: https://github.com/storybooks/storybook/tree/master/addons/storyshots#specifying-options-to-jest-image-snapshots But maybe we could implement a more explicit API for delays, @thomasbertet WDYT?
This link doesn't exist and now is at https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-puppeteer#specifying-options-to-jest-image-snapshots
No branches or pull requests
Problem: Storyshots screenshot is sometimes a white image.
The components being tested are Angular 5 components.
I am using latest version of
storybook
and addons.I am initializing
storyshots
using the following:I tried all puppeteer
waitUntil
parameters from https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options however nothing worked.Puppeteer has an open issue to add a
waitUntilTime
api, however the issue is still open and unanswered: puppeteer/puppeteer#2238In the meantime, could
storyshots
implement something similar to guarantee that a component is fully rendered before a screenshot is taken?The text was updated successfully, but these errors were encountered: