Closed DarkTrick closed 1 year ago
Hi @DarkTrick, thanks for opening this one.
Testing-library doesn't offer a way to query for every type of element, we aim to query elements by anything which isn't an implementation detail. The type of the input is an implementation detail.
Since <input type="datetime-local"/>
doesn't have an implicit role, in this case I'd suggest to add a label to that input and query the element by it's label and check if the value matches what you're expecting.
I'm closing this one as this isn't something we'd like to support.
Thanks again :)
Describe the feature you'd like:
Add support for querying what
datetime-local
fields are showing. Goal: Tests like this should be possible:Describe alternatives you've considered:
Currently you can do:
Teachability, Documentation, Adoption, Migration Strategy:
As stated above:
Note however, that
getByText
is just an example. There might be better calling methods.