-
-
Notifications
You must be signed in to change notification settings - Fork 207
Closed
Description
I wrote a test like this:
session
|> refute_has(css(".my-element"))The element is becomes hidden via JS executing on the page.
My expectation was that if the element was present when refute_has first runs, it would wait for the async timeout and keep testing the DOM before raising an error. This turns out not to be true, which lead to flakey test failures.
We can do this instead:
session
|> assert_has(css(".my-element", count: 0))But I find the behaviour of refute_has surprising. Is this deliberate? If not, perhaps it can be changed?
Metadata
Metadata
Assignees
Labels
No labels