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

Need a reliable way to test if storybook page is ready programatically #14216

Open
ywongau opened this issue Mar 12, 2021 · 3 comments
Open

Need a reliable way to test if storybook page is ready programatically #14216

ywongau opened this issue Mar 12, 2021 · 3 comments

Comments

@ywongau
Copy link

ywongau commented Mar 12, 2021

Is your feature request related to a problem? Please describe
Start-server-and-test is very reliable with storybook <= 5 because the HTTP endpoint isn't available until everything is built, but stop working with storybook 6 because the webserver is up before it is ready and shows a building n/m modules screen, therefore the endpoint test doesn't work anymore

image

Then in my CI, the timeout error happens a lot

TimeoutError: page.goto: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "http://localhost:5002/iframe.html?id=taskfilterlist--story&viewMode=story", waiting until "domcontentloaded"
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.page.goto: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "http://localhost:5002/iframe.html?id=taskfilterlist--story&viewMode=story", waiting until "domcontentloaded"
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.:
15 |
16 | const gotoStory = async (page: Page, id) => {
> 17 | await page.goto(http://${hostname}:5002/iframe.html?id=${id}&viewMode=story, {
| ^
18 | waitUntil: 'domcontentloaded',
19 | });

Describe the solution you'd like
A cli option to disable the progress screen

Describe alternatives you've considered
noo

Are you able to assist to bring the feature to reality?
no

Additional context

This ticket for Playwright was most likely caused by the same issue

@EddyVinck
Copy link

I just stumbled on this issue when Googling "storybook in ci page.goto timeout"

have you found a fix for this yet @ywongau ?

@ywongau
Copy link
Author

ywongau commented Jan 26, 2023

I just stumbled on this issue when Googling "storybook in ci page.goto timeout"

have you found a fix for this yet @ywongau ?

Either set navigation timeout to a very big number or run with a static build

@AngelosTzetzias
Copy link

Either set navigation timeout to a very big number or run with a static build
@ywongau how do you set a navigation timeout? (explanation or a link to the docs would be very helpfull )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants