storybookjs/storybook

[Bug]: Addon-interactions. Interactions panel does not show steps after error has thrown even if I handle this error.

Ouverte

#21 746 ouverte le 23 mars 2023

 (3 commentaires) (0 réaction) (0 personne assignée)TypeScript (10 058 forks)batch import
addon: interactionsbuggood first issuehelp wantedsev:S3

Métriques du dépôt

Stars
 (89 909 étoiles)
Métriques de merge PR
 (Merge moyen 7j 22h) (184 PRs mergées en 30 j)

Description

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

Guide contributeur