-
Notifications
You must be signed in to change notification settings - Fork 467
Closed
Description
Describe the feature you'd like:
To get an element from the dom, we have 6 variants viz. getBy, getAllBy, queryBy, queryAllBy, findBy, and findAllBy.
More often than I like to admit I would visit cheatsheet to find the method I'm looking for.
Suggested implementation:
A sample usage for react(can be adopted for rest)
fetchByText(/text/, { allowEmpty: true, allowMultiple: false });This would be able to combine get* and query* queries. We would still need to consider find* because of thats the only async query.
Proposal for findBy* is
asyncFetchByText(/text/, { allowMultiple: false });
fetchByTextAsync(/text/, { allowMultiple: false });Describe alternatives you've considered:
Visit cheatsheet when you forget what does what
Teachability, Documentation, Adoption, Migration Strategy:
We should be able to include this along with the rest of the variants.
Would be happy to implement it myself 😀
balavishnuvj, hannadrehman, raul-saez, buddharajuprithvi and EvHaussmeijer, gnapse, kentcdodds and delca85Aprillion
Metadata
Metadata
Assignees
Labels
No labels