Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Menu][base-ui] Fix improperly merged tests #40896

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading