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

Interactions: Fix README link #16596

Merged
merged 2 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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