diff --git a/packages/mui-material/src/Select/Select.test.js b/packages/mui-material/src/Select/Select.test.js index 4d6817f9ad0c13..a36065667dc939 100644 --- a/packages/mui-material/src/Select/Select.test.js +++ b/packages/mui-material/src/Select/Select.test.js @@ -468,6 +468,36 @@ describe('); + + expect(getByRole('combobox')).to.have.attribute('aria-required', 'true'); + }); + + it('aria-required is not present if component is not required', () => { + const { getByRole } = render(); + + expect(container.querySelector('input')).to.have.property('required', true); + }); + + it('sets aria-invalid="true" when component is in the error state', () => { + const { getByRole } = render(); + + expect(getByRole('combobox')).not.to.have.attribute('aria-invalid'); + }); + it('indicates that activating the button displays a listbox', () => { const { getByRole } = render(