diff --git a/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx b/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx index 4f473204247567..e08ed63fe1ee08 100644 --- a/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx +++ b/packages/mui-joy/src/Autocomplete/Autocomplete.test.tsx @@ -1409,6 +1409,10 @@ describe('Joy ', () => { // three option is added and autocomplete re-renders, restore the highlight setProps({ options: [{ label: 'one' }, { label: 'two' }, { label: 'three' }] }); checkHighlightIs(listbox, 'two'); + + fireEvent.keyDown(textbox, { key: 'ArrowDown' }); // goes to 'three' + + checkHighlightIs(listbox, 'three'); }); it("should reset the highlight when previously highlighted option doesn't exists in new options", () => { diff --git a/packages/mui-material/src/Autocomplete/Autocomplete.test.js b/packages/mui-material/src/Autocomplete/Autocomplete.test.js index 4a7a90935dbd4e..57bf88e2dea692 100644 --- a/packages/mui-material/src/Autocomplete/Autocomplete.test.js +++ b/packages/mui-material/src/Autocomplete/Autocomplete.test.js @@ -1839,6 +1839,10 @@ describe('', () => { // three option is added and autocomplete re-renders, restore the highlight setProps({ options: [{ label: 'one' }, { label: 'two' }, { label: 'three' }] }); checkHighlightIs(listbox, 'two'); + + fireEvent.keyDown(textbox, { key: 'ArrowDown' }); // goes to 'three' + + checkHighlightIs(listbox, 'three'); }); it('should reset the highlight when the input changed', () => {