Wallaby allows you to write end-to-end tests as though you're operating a browser session. A test looks like this:
|> fill_in(text_field("user[name]"), with: "Bob")
|> fill_in(text_field("user[email]"), with: "[email protected]")
|> fill_in(text_field("user[password]"), with: "password")
|> click(button("Create account"))
You can see the full test in
Wallaby tests don't run by default as they can be slow. We have hidden them behind a "feature" flag.
# Run all tests, including wallaby:
mix test --include feature
# Run only wallaby
mix test --only feature
We're sorry to report that since Live View 0.17.7, wallaby has stopped working properly. See the write-up here on how to fix it. We will be fixing this in the next version. Apologies about this.
If you really want e2e tests then we suggest either following the instructions in the link above or downgrading phoenix_live_view => 0.17.6.