Replace test-runner with vitest for storybook (#17187)

This commit is contained in:
Abdullah.
2026-01-18 08:25:45 +05:00
committed by GitHub
parent c737028dd6
commit 92eff62523
56 changed files with 4999 additions and 715 deletions
@@ -91,8 +91,8 @@ export const Empty: Story = {
</DropdownContent>
),
},
play: async () => {
const canvas = within(document.body);
play: async ({ canvasElement }) => {
const canvas = within(canvasElement.ownerDocument.body);
const buttons = await canvas.findAllByRole('button');
await userEvent.click(buttons[0]);
@@ -222,8 +222,8 @@ const optionsMock = [
// );
// };
const playInteraction: PlayFunction<any, any> = async () => {
const canvas = within(document.body);
const playInteraction: PlayFunction<any, any> = async ({ canvasElement }) => {
const canvas = within(canvasElement.ownerDocument.body);
const buttons = await canvas.findAllByRole('button');
await userEvent.click(buttons[0]);
@@ -279,8 +279,8 @@ export const SearchWithLoadingMenu: Story = {
</DropdownContent>
),
},
play: async () => {
const canvas = within(document.body);
play: async ({ canvasElement }) => {
const canvas = within(canvasElement.ownerDocument.body);
const buttons = await canvas.findAllByRole('button');