Skip to content

Commit

Permalink
[test] Ensure Portal is used in MenuItem test (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks authored Jan 7, 2025
1 parent 1908c94 commit c13d778
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/react/src/menu/item/MenuItem.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,14 @@ describe('<Menu.Item />', () => {
<LocationDisplay />

<Menu.Root open>
<Menu.Positioner>
<Menu.Popup>
<Menu.Item render={<Link to="/" />}>link 1</Menu.Item>
<Menu.Item render={<Link to="/two" />}>link 2</Menu.Item>
</Menu.Popup>
</Menu.Positioner>
<Menu.Portal>
<Menu.Positioner>
<Menu.Popup>
<Menu.Item render={<Link to="/" />}>link 1</Menu.Item>
<Menu.Item render={<Link to="/two" />}>link 2</Menu.Item>
</Menu.Popup>
</Menu.Positioner>
</Menu.Portal>
</Menu.Root>
</MemoryRouter>,
);
Expand Down

0 comments on commit c13d778

Please sign in to comment.