New rule: force waitForElementToBeRemoved
when waitFor
is used to wait for disappearance
#411
Labels
enhancement
New feature or request
new rule
New rule to be included in the plugin
pinned
Pinned for different reasons. Issues with this label won't be flagged as stale by stalebot
We could have a new rule that reports
waitFor
in cases wherewaitForElementToBeRemoved
could be used. Could be namedprefer-waiting-for-disappearance
or something similar.From the implementational side, it'd probably make sense to look for RTL queries inside
waitFor
and some specific matchers, such as.not.toBeInTheDocument()
,.toBeFalsy()
, etc.I am also curious about the fact that if this rule is enabled, it doesn't make too much sense to have
query*
queries inwaitFor
, even when waiting for appearance. Hence, the rule could either report by default or have an option to report this case:WDYT?
The text was updated successfully, but these errors were encountered: