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

chore(storybook): waitForPageReady for CI #1554

Merged
merged 6 commits into from
Jan 30, 2025

Conversation

vtsvetkov-splunk
Copy link
Contributor

@vtsvetkov-splunk vtsvetkov-splunk commented Jan 28, 2025

Issue number:

PR Type

What kind of change does this PR introduce?

  • Feature
  • Bug Fix
  • Refactoring (no functional or API changes)
  • Documentation Update
  • Maintenance (dependency updates, CI, etc.)

Summary

Sometimes Storybook takes a screenshot before the font is loaded. That results in the screen without any text on it. Then it commits this screenshot.
The problem is that the font loads far after the page load finish

Changes

I added waitForPageReady that includes networkidle. I am not sure if this solve the problem, but let's see.

User experience

No changes

Checklist

If an item doesn't apply to your changes, leave it unchecked.

@vtsvetkov-splunk vtsvetkov-splunk added the javascript Pull requests that update Javascript code label Jan 28, 2025
Signed-off-by: Viktor Tsvetkov <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 28, 2025
Signed-off-by: Viktor Tsvetkov <[email protected]>
Signed-off-by: Viktor Tsvetkov <[email protected]>
Signed-off-by: Viktor Tsvetkov <[email protected]>
@vtsvetkov-splunk vtsvetkov-splunk marked this pull request as ready for review January 28, 2025 14:25
@vtsvetkov-splunk vtsvetkov-splunk requested a review from a team as a code owner January 28, 2025 14:25
@vtsvetkov-splunk vtsvetkov-splunk changed the title chore(storybook): fix wait fonts to load before taking screenshot chore(storybook): waitForPageReady for CI Jan 28, 2025
Copy link
Contributor

@soleksy-splunk soleksy-splunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls fill description before merging

@vtsvetkov-splunk vtsvetkov-splunk self-assigned this Jan 29, 2025
@vtsvetkov-splunk vtsvetkov-splunk enabled auto-merge (squash) January 30, 2025 07:21
@vtsvetkov-splunk vtsvetkov-splunk merged commit 81a2666 into develop Jan 30, 2025
123 checks passed
@vtsvetkov-splunk vtsvetkov-splunk deleted the feature/storbyook-wait-fonts branch January 30, 2025 07:40
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript Pull requests that update Javascript code size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants