Excessibility.CaptureHTML (excessibility v0.4.0)
Functionality to capture LiveView screenshots for debugging.
Link to this section Summary
Functions
Captures an HTML snapshot of a LiveView (View or Element), EuUnit Conn, or Wallaby Session under test.
Link to this section Functions
Link to this function
capture_html!(conn_or_session, env, module, opts)
Captures an HTML snapshot of a LiveView (View or Element), EuUnit Conn, or Wallaby Session under test.
examples
Examples
defmodule MyAppWeb.PageLiveTest do
use MyAppWeb, :live_view
import Excessibility.CaptureHTML
test "does the thing", %{conn: conn} end
{:ok, view, _} = live(conn, "/")
assert view
|> capture_html!()
|> render() =~ "The thing is done!"
end
end