Open yash49 opened 1 week ago
https://codesandbox.io/p/sandbox/musing-panini-c5399j?file=%2Fsrc%2FApp.test.js
listbox
from - https://testing-library.com/docs/user-event/utility/#-selectoptions-deselectoptions
Select/deselect the given options in an HTMLSelectElement or listbox.
I should be able to deselect options from multiple listbox using deselectOptions
https://github.com/testing-library/user-event/blob/main/src/utility/selectOptions.ts#L28
The deselectOptions function is not checking for aria-multiselectable (for multiple listbox) It does check for multiple though (for multiple select)
deselectOptions
aria-multiselectable
multiple
select
You won't be able to deselct the option(s) from multiple listbox using deselectOptions
14.1.1
The issue is reproducible on codesandbox
I have used the provided codesandbox template
additionally I have used https://mui.com/material-ui/ (mui needs emotion)
"@mui/material": "6.1.7", "@emotion/styled": "11.13.0", "@emotion/react": "11.13.3"
For more context see this thread on MUI repo
https://github.com/mui/material-ui/issues/44417#issuecomment-2479742130
Reproduction example
https://codesandbox.io/p/sandbox/musing-panini-c5399j?file=%2Fsrc%2FApp.test.js
Prerequisites
listbox
listbox
(using deselectOptions)Expected behavior
from - https://testing-library.com/docs/user-event/utility/#-selectoptions-deselectoptions
I should be able to deselect options from multiple
listbox
using deselectOptionshttps://github.com/testing-library/user-event/blob/main/src/utility/selectOptions.ts#L28
The
deselectOptions
function is not checking foraria-multiselectable
(for multiplelistbox
) It does check formultiple
though (for multipleselect
)Actual behavior
You won't be able to deselct the option(s) from multiple
listbox
using deselectOptionsUser-event version
14.1.1
Environment
The issue is reproducible on codesandbox
I have used the provided codesandbox template
additionally I have used https://mui.com/material-ui/ (mui needs emotion)
"@mui/material": "6.1.7", "@emotion/styled": "11.13.0", "@emotion/react": "11.13.3"
Additional context
For more context see this thread on MUI repo
https://github.com/mui/material-ui/issues/44417#issuecomment-2479742130