Closed
Description
The rule no-get-by-for-checking-element-not-present
is giving false positives for some matchers when it shouldn't.
If you are getting an element with getBy
query and asserting something with a negated matcher, it should not complain unless the matcher is toBeInTheDocument
(or additional ones checking the element itself is not present).
But if you are asserting something like expect(getByText('Submit')).not.toBeDisabled()
the rule should complain about as it's not checking element absence but something else from the element.