Skip to content

Commit

Permalink
[Menu][base-ui] Fix improperly merged tests (#40896)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored Feb 2, 2024
1 parent 5f1fd2d commit be0ef2d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/mui-base/src/Menu/Menu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('<Menu />', () => {
});
});

it('highlights first item when down arrow key opens the menu', () => {
it('highlights first item when down arrow key opens the menu', async () => {
const context: DropdownContextValue = {
...testContext,
state: {
Expand All @@ -99,7 +99,7 @@ describe('<Menu />', () => {
} as React.KeyboardEvent,
},
};
const { getAllByRole } = render(
const { getAllByRole } = await render(
<DropdownContext.Provider value={context}>
<Menu>
<MenuItem>1</MenuItem>
Expand All @@ -116,7 +116,7 @@ describe('<Menu />', () => {
});
});

it('highlights last item when up arrow key opens the menu', () => {
it('highlights last item when up arrow key opens the menu', async () => {
const context: DropdownContextValue = {
...testContext,
state: {
Expand All @@ -128,7 +128,7 @@ describe('<Menu />', () => {
} as React.KeyboardEvent,
},
};
const { getAllByRole } = render(
const { getAllByRole } = await render(
<DropdownContext.Provider value={context}>
<Menu>
<MenuItem>1</MenuItem>
Expand All @@ -146,7 +146,7 @@ describe('<Menu />', () => {
});
});

it('highlights last non-disabled item when disabledItemsFocusable is set to false', () => {
it('highlights last non-disabled item when disabledItemsFocusable is set to false', async () => {
const CustomMenu = React.forwardRef(function CustomMenu(
props: React.ComponentPropsWithoutRef<'ul'>,
ref: React.Ref<HTMLUListElement>,
Expand Down Expand Up @@ -180,7 +180,7 @@ describe('<Menu />', () => {
} as React.KeyboardEvent,
},
};
const { getAllByRole } = render(
const { getAllByRole } = await render(
<DropdownContext.Provider value={context}>
<CustomMenu>
<MenuItem>1</MenuItem>
Expand Down

0 comments on commit be0ef2d

Please sign in to comment.