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]: Addon-interactions. Interactions panel does not show steps after error has thrown even if I handle this error. #21746

Open
original001 opened this issue Mar 23, 2023 · 1 comment

Comments

@original001
Copy link

Describe the bug

Intstumented functions always bubble up errors to interactions panel. But in play function I can handle error. After that code will continue to run and all interations will be done. But in my panel I won't see anything after error, which was handled.

image

To Reproduce

MyStory.play = async () => {
  await userEvent.type(getTokenInput(), "newComment");
  try {
    await screen.findByTestId("IdWhichDoesntExist");
  } catch (e) {}
  await userEvent.type(getTokenInput(), ",");
};

This function should type two times in input. But in panel you'll see only one operation and one error.

System

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 AMD Ryzen 7 4700U with Radeon Graphics
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD
    npm: 9.6.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (110.0.1587.57)   
  npmPackages:
    @storybook/addon-actions: ^6.5 => 6.5.16
    @storybook/addon-interactions: ^6.5.16 => 6.5.16
    @storybook/addons: ^6.5 => 6.5.16
    @storybook/builder-webpack5: ^6.5 => 6.5.16
    @storybook/jest: ^0.0.10 => 0.0.10
    @storybook/manager-webpack5: ^6.5 => 6.5.16
    @storybook/react: ^6.5 => 6.5.16
    @storybook/testing-library: ^0.0.13 => 0.0.13
    @storybook/ui: ^6.5 => 6.5.16

Additional context

No response

@original001 original001 changed the title [Bug]: Addon-interactions. Interactions panel does not show steps after error has thrown even if handle this error. [Bug]: Addon-interactions. Interactions panel does not show steps after error has thrown even if I handle this error. Mar 23, 2023
@valentinpalkovic
Copy link
Contributor

cc @yannbf

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