Closed germsvel closed 5 months ago
Resolves https://github.com/germsvel/phoenix_test/issues/27
We add an at option to assert_has/3 and refute_has/3 to assert against a specific position.
at
assert_has/3
refute_has/3
This is helpful if, for example, you want to assert what is the text of the second element in a list:
assert_has("li", at: 2, text: "Hello world")
@germsvel Just wanted to say I'm super happy with where you landed here! 🥳
Thanks @sodapopcan! 🎉 Love to hear that.
Resolves https://github.com/germsvel/phoenix_test/issues/27
What changed?
We add an
at
option toassert_has/3
andrefute_has/3
to assert against a specific position.This is helpful if, for example, you want to assert what is the text of the second element in a list: