Extract LiveView async test helper

This commit is contained in:
Claudio Ortolina
2026-05-16 22:27:46 +01:00
parent 4fa05d6ad1
commit 90ac4fa23a
10 changed files with 90 additions and 49 deletions
@@ -33,7 +33,7 @@ defmodule MusicLibraryWeb.ScrobbleLive.ReleaseShowTest do
test "renders the scrobble UI for the release", %{conn: conn} do
conn
|> visit(~p"/scrobble/#{@rg_id}/releases/#{@release_id}")
|> unwrap(&render_async/1)
|> render_async()
|> assert_has("h2", text: "Marbles")
end
@@ -46,7 +46,7 @@ defmodule MusicLibraryWeb.ScrobbleLive.ReleaseShowTest do
test "sets the page title once the release loads", %{conn: conn} do
conn
|> visit(~p"/scrobble/#{@rg_id}/releases/#{@release_id}")
|> unwrap(&render_async/1)
|> render_async()
|> assert_has("title", text: "Marillion - Marbles")
end
end