Skip to content

Commit

Permalink
Remove unnecessary hidden option in test queries
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Sep 22, 2023
1 parent 9f0e07d commit 7e3539c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/mui-material/src/Select/Select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ describe('<Select />', () => {
describe('prop: defaultOpen', () => {
it('should be open on mount', () => {
const { getByRole } = render(<Select defaultOpen value="" />);
expect(getByRole('combobox', { hidden: true })).to.have.attribute('aria-expanded', 'true');
expect(getByRole('combobox')).to.have.attribute('aria-expanded', 'true');
});
});

Expand Down Expand Up @@ -439,7 +439,7 @@ describe('<Select />', () => {
// technically matter. This is only here in case we keep the rest accessible
const { getByRole } = render(<Select open value="" />);

expect(getByRole('combobox', { hidden: true })).to.have.attribute('aria-expanded', 'true');
expect(getByRole('combobox')).to.have.attribute('aria-expanded', 'true');
});

specify('ARIA 1.2: aria-expanded="false" if the listbox isn\'t displayed', () => {
Expand Down Expand Up @@ -482,7 +482,7 @@ describe('<Select />', () => {
const { getByRole } = render(<Select open value="" />);
const listboxId = getByRole('listbox').id;

expect(getByRole('combobox', { hidden: true })).to.have.attribute('aria-controls', listboxId);
expect(getByRole('combobox')).to.have.attribute('aria-controls', listboxId);
});

specify('the listbox is focusable', () => {
Expand Down Expand Up @@ -856,7 +856,7 @@ describe('<Select />', () => {
);

const paper = getByTestId('paper');
const selectButton = getByRole('combobox', { hidden: true });
const selectButton = getByRole('combobox');

expect(paper.style).to.have.property('minWidth', `${selectButton.clientWidth}px`);
});
Expand Down

0 comments on commit 7e3539c

Please sign in to comment.