Skip to content

Commit addc54d

Browse files
committed
changed to screen
1 parent 41d1398 commit addc54d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/lib/src/file-input/FileInput.stories.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/react";
22
import ExampleContainer from "../../.storybook/components/ExampleContainer";
33
import Title from "../../.storybook/components/Title";
44
import DxcFileInput from "./FileInput";
5-
import { userEvent, within } from "@storybook/test";
5+
import { screen, userEvent, within } from "@storybook/test";
66

77
export default {
88
title: "File Input",
@@ -534,8 +534,7 @@ export const Chromatic: Story = {
534534
export const FileInputEllipsisInError: Story = {
535535
render: EllipsisError,
536536
play: async ({ canvasElement }) => {
537-
const canvas = within(canvasElement);
538-
await userEvent.hover(canvas.getByText(/^This error message/));
539-
await userEvent.hover(canvas.getByText(/^This error message/));
537+
await userEvent.hover(screen.getByText(/^This error message/));
538+
await userEvent.hover(screen.getByText(/^This error message/));
540539
},
541540
};

0 commit comments

Comments
 (0)