Skip to content

Commit

Permalink
Wait for focus to move
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jan 12, 2024
1 parent 05eb00a commit db5e254
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/components/src/tabs/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,9 @@ describe( 'Tabs', () => {

// Tab key should focus the currently selected tab, which is Beta.
await press.Tab();
expect( await getSelectedTab() ).toHaveFocus();
await waitFor( async () =>
expect( await getSelectedTab() ).toHaveFocus()
);

rerender(
<ControlledTabs
Expand Down

0 comments on commit db5e254

Please sign in to comment.