Closed
Description
Describe the feature you'd like:
I'm aware of the callback function that allows you to accomplish this, but we've seen this pattern emerge enough times that it made me wonder if the ability to combine queries would be possible, and maybe make the tests a little more readable:
i.e. if i want to combine getByText
& getByRole
i know I can do this:
getByText((text, element => text === "Have an issue?" && element.getAttribute('role') === 'button'))
it would be nice to do something like this:
within(getAllByRole("button")).getByText("Have an issue?")
Suggested implementation:
modify within to accept a NodeList / array perhaps?
Describe alternatives you've considered:
none that i can think of