Using getByLabelText
is also returning the hidden value of fieldset
which is not a label.
#1253
Labels
getByLabelText
is also returning the hidden value of fieldset
which is not a label.
#1253
@testing-library/dom
version: 8.10.1Relevant code or config:
What you did:
Testing to make sure a label is visible in the UI
What happened:
Multiple results were returned, including
fieldset
Problem description:
fieldset
is not part of the inputlabel
and shouldn't be included withgetByLabelText
Suggested solution:
Do not return
fieldset
when using a query*ByLabelText
The text was updated successfully, but these errors were encountered: