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

[Bug]: Play function results carry over from story to story when navigating #29575

Open
yannbf opened this issue Nov 8, 2024 · 0 comments
Open

Comments

@yannbf
Copy link
Member

yannbf commented Nov 8, 2024

Describe the bug

Report from Storybook test EAP:

When switching from a story that includes a component test to another story without one, the test results are incorrectly carried over and displayed in the wrong story.

Reproduction link

https://github.com/AlmarAubel/sb-playground

Reproduction steps

  1. Start Storybook.
  2. Go to story Case 1.
  3. Then click the Default story (don’t wait for Case 1 to finish the component test).
    It will always show failures, even when Case 1 normally succeeds.

Side note: Adding sleep in the test didn’t trigger this bug. I suspect that the waitFor function (const text = await waitFor(() => canvas.getByText(/slurp/i), { timeout: 10000 })) is suspicious and causing issues.

System

Additional context

No response

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

2 participants