Skip to content

Commit

Permalink
Merge pull request #16596 from storybookjs/docs/update-interactions-r…
Browse files Browse the repository at this point in the history
…eadme

Interactions: Fix README link
  • Loading branch information
shilman authored Nov 4, 2021
2 parents ce26a2d + 73686ed commit 8238d5d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
17 changes: 15 additions & 2 deletions addons/interactions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ module.exports = {

Note that `@storybook/addon-interactions` must be listed **after** `@storybook/addon-actions` or `@storybook/addon-essentials`.

## Experimental step debugging

Step debugging features are experimental and disabled by default. To enable them:

```js
// main.js
module.exports = {
features: {
interactionsDebugger: true,
},
};
```

## Usage

Interactions relies on "instrumented" versions of Jest and Testing Library, that you import from `@storybook/jest` and
Expand All @@ -43,8 +56,8 @@ export const Demo = {
const canvas = within(canvasElement);
await userEvent.click(canvas.getByRole('button'));
await expect(args.onClick).toHaveBeenCalled();
}
}
},
};
```

In order to enable step-through debugging, calls to `userEvent.*`, `fireEvent`, `findBy*`, `waitFor*` and `expect` have to
Expand Down
2 changes: 1 addition & 1 deletion addons/interactions/src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const AddonPanelPure: React.FC<InteractionsPanelProps> = React.memo(
<Placeholder>
No interactions found
<Link
href="https://storybook.js.org/docs/react/essentials/interactions"
href="https://github.com/storybookjs/storybook/blob/next/addons/interactions/README.md"
target="_blank"
withArrow
>
Expand Down

0 comments on commit 8238d5d

Please sign in to comment.