It seems that LiveViewTest
’s render/1
and friends always truncate the output when being passed to dbg/2
, even if limit: :infinity
is provided. I feel like this wasn’t always the case (well, previously with IO.inspect/2
, which I also did try here) but maybe not? I know I don’t have a typo since other steps of the pipeline—one of which includes raw image data—are definitely not being truncated. There are no caveats about this in the docs.
Pls send help!?
Code for good measure:
test "send a picture message", %{conn: conn, room: room} do
{:ok, lv, _html} = live(conn, ~p"/chat/#{room}")
lv
|> file_input("form", :image, [
%{
name: "calvin.jpg",
content: File.read!("test/support/images/calvin.jpg"),
type: "image/jpeg"
}
])
|> render_upload("calvin.jpg")
|> dbg(limit: :infinity) # <- Shows a ton of image data but html ending in ye olde "<> ..."
dbg(render(lv), limit: :infinity) # <- No different
assert render(lv) =~ ~r/<img.+data-test-id="uploaded-image"/s
end