I haven’t used a library for this in Elixir, but it’s possible to get similar expressiveness with just functions using tools like Phoenix.LiveViewTest.element
You’d write a helper function like:
def shiny_magic_button(view, name_filter \\ nil) do
element(view, "button.shiny.magic", name_filter)
end
Then you could write assertions like:
assert view
|> shiny_magic_button(~r{[wat]+})
|> render_focus() =~ "Some message"
Alternatively, I’ve also written helpers that took arguments and build a large “selector”, since functions like has_element? expect that.


















