Open
Description
Describe the feature you'd like:
A common pattern that I've been using is:
const element = getByText(...);
expect(element).toBeVisible();
However, it may be the case that there are invisible elements that match the first selector, leading to a thrown error since multiple elements were found. It would be much nicer to be able to write something like:
const element = getByText(..., {filter: isVisible}); // It would also be nice for jest-dom to export `isVisible`
Describe alternatives you've considered:
If theisVisible
use-case is by far the most common, then it could be sufficient to export queryVisibleBy*
methods directly.