Skip to content

Instantly share code, notes, and snippets.

@FrankApiyo
Last active April 28, 2025 04:57
Show Gist options
  • Save FrankApiyo/25a3f980fef210450d2e88291294ca84 to your computer and use it in GitHub Desktop.
Save FrankApiyo/25a3f980fef210450d2e88291294ca84 to your computer and use it in GitHub Desktop.
Sample LV test
defmodule AppNameWeb.LvLiveTest do
use UrlshortenerWeb.ConnCase, async: true
import Phoenix.LiveViewTest
describe "LV test" do
test "we can render the view", %{conn: conn} do
{:ok, _lv, html} = live(conn, ~p"/")
# open_browser(lv)
# html= lv |> element("form") |> render_submit(%{})
assert html =~ "Original URL"
assert html =~ "Shorten!"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment