elixir-wallaby / wallaby

Concurrent browser tests for your Elixir web apps.
https://twitter.com/elixir_wallaby
MIT License
1.68k stars 198 forks source link

`at` conflicts with default `count` #641

Closed marcandre closed 2 years ago

marcandre commented 3 years ago

Calling Query.at currently almost never makes sense without having to specify count :any or some minimum/maximum value.

E.g.:

query = Query.css(".some-class", at: 2)
find(page, query) # => "Expected to find 1 visible element that matched the css '.some-class' but 6 visible elements were found."

I feel the query above clearly intends count: :any / nil and it would be better if it wasn't mandatory to specify it.