Skip to content

Commit 88a6cd2

Browse files
committed
test(dialog): review comments addressed
1 parent 3037c60 commit 88a6cd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/dialog/dialog.interactions.stories.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,17 @@ export const FocusManagement: Story = {
6868
const closeButton = within(dialog).getByRole("button", { name: /close/i });
6969
const firstInput = within(dialog).getByLabelText(/name/i);
7070

71-
(closeButton as HTMLElement).focus();
72-
await expect(closeButton).toHaveFocus();
71+
await expect(dialog).toBeVisible();
7372

7473
await userEvent.tab();
74+
await userEvent.tab();
75+
7576
await expect(firstInput).toHaveFocus();
7677

7778
await userEvent.tab();
7879
await userEvent.tab();
7980
await userEvent.tab();
81+
8082
await expect(closeButton).toHaveFocus();
8183
},
8284
};

0 commit comments

Comments
 (0)