You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: expect(element).toBeDisabled()
Received element is not disabled:
<div aria-describedby="SpeciesHelperText" aria-disabled="true" aria-expanded="false" aria-haspopup="listbox" aria-labelledby="Species" class="MuiSelect-select MuiSelect-outlined Mui-disabled MuiOutlinedInput-input MuiInputBase-input Mui-disabled css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input" id="Species" role="button" />
Problem description:
This is an issue because there seems to be no workaround other than explicitly inspecting the aria-disabled attribute
Suggested solution:
At the very least, provide an option to customize the global matcher behavior, to customize the logic for determining whether a given component is disabled
The text was updated successfully, but these errors were encountered:
Hello, this behavior was already discussed in this issue and the conclusion was to use the toHaveAttribute matcher as a workaround to check if the element is disabled due to the presence of an aria-disabled attribute.
@testing-library/jest-dom
version: 5.14.3node
version: 16.13.2npm
(oryarn
) version: 8.1.2Relevant code or config:
What you did:
What happened:
Problem description:
This is an issue because there seems to be no workaround other than explicitly inspecting the
aria-disabled
attributeSuggested solution:
At the very least, provide an option to customize the global matcher behavior, to customize the logic for determining whether a given component is disabled
The text was updated successfully, but these errors were encountered: