Skip to content

Commit

Permalink
remove testid
Browse files Browse the repository at this point in the history
  • Loading branch information
SaidMarar committed Jan 29, 2023
1 parent d8cfd08 commit 1a5c1ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/mui-base/src/MenuUnstyled/MenuUnstyled.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ describe('MenuUnstyled', () => {

return (
<MenuUnstyled {...defaultProps}>
<MenuItemUnstyled data-testid="item-1">1</MenuItemUnstyled>
<MenuItemUnstyled data-testid="item-2">2</MenuItemUnstyled>
<MenuItemUnstyled data-testid="item-3">3</MenuItemUnstyled>
<MenuItemUnstyled>1</MenuItemUnstyled>
<MenuItemUnstyled>2</MenuItemUnstyled>
<MenuItemUnstyled>3</MenuItemUnstyled>
</MenuUnstyled>
);
}

it('when menu is opened it highlights one item and it must be the first one', () => {
const { getAllByTestId } = render(<Test />);
const [firstItem, ...otherItems] = getAllByTestId(/^item-/);
it('highlights the first item when the menu is opened', () => {
const { getAllByRole } = render(<Test />);
const [firstItem, ...otherItems] = getAllByRole('menuitem');

expect(firstItem.tabIndex).to.equal(0);
otherItems.forEach((item) => {
Expand Down

0 comments on commit 1a5c1ce

Please sign in to comment.