Skip to content

[Feature request]: implement equivalent to Playwright’s .toPass or .poll #533

@ihsib

Description

@ihsib

Is your feature request related to a problem? Please describe.

We are currently facing issues with Storybook runner visual tests failing due to incomplete hydration. We’ve experimented with both the mask feature , waitForPageReady and the waitFor method using Promise.all and custom polling, but the results remain inconsistent. Additionally, we’ve noticed that sometimes the masked elements seem to shift, causing tests to fail.

Describe the solution you'd like

Given that the Playwright package is already used in the Storybook runner, we suggest integrating the .toPass or .toPoll method. This could help improve the reliability of our visual tests by providing more consistent and readable assertions.

https://playwright.dev/docs/test-assertions#expecttopass

https://playwright.dev/docs/test-assertions#expectpoll

Describe alternatives you've considered

No response

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

no

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions