Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa78f1a

Browse files
committed
Fix storybook
1 parent 37e1701 commit aa78f1a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

site/src/modules/workspaces/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.stories.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ type Story = StoryObj<typeof WorkspaceOutdatedTooltip>;
3434

3535
const Example: Story = {
3636
play: async ({ canvasElement, step }) => {
37-
const screen = within(canvasElement);
37+
const body = within(canvasElement.ownerDocument.body);
3838

3939
await step("activate hover trigger", async () => {
40-
await userEvent.hover(screen.getByRole("button"));
40+
await userEvent.hover(body.getByRole("button"));
4141
await waitFor(() =>
42-
expect(
43-
screen.getByText(MockTemplateVersion.message),
44-
).toBeInTheDocument(),
42+
expect(body.getByText(MockTemplateVersion.message)).toBeInTheDocument(),
4543
);
4644
});
4745
},

0 commit comments

Comments
 (0)