We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3037c60 commit 88a6cd2Copy full SHA for 88a6cd2
src/components/dialog/dialog.interactions.stories.tsx
@@ -68,15 +68,17 @@ export const FocusManagement: Story = {
68
const closeButton = within(dialog).getByRole("button", { name: /close/i });
69
const firstInput = within(dialog).getByLabelText(/name/i);
70
71
- (closeButton as HTMLElement).focus();
72
- await expect(closeButton).toHaveFocus();
+ await expect(dialog).toBeVisible();
73
74
await userEvent.tab();
+ await userEvent.tab();
75
+
76
await expect(firstInput).toHaveFocus();
77
78
79
80
81
82
await expect(closeButton).toHaveFocus();
83
},
84
};
0 commit comments