Anatomy of a LiveView test
This is how I like to write most of my LiveView tests:
-
mount LiveView with
live/2, -
target an element (with
element/3orform/3) and perform a render action -
make an assertion with
has_element?/3
The familiar setup-exercise-verify testing pattern. 🥳
Check it out 👉 https://youtu.be/PGGhL9Votig
Read next The glory of scripting in Elixir
