Phoenix.LiveViewTest.render_keyup
You're seeing just the function
render_keyup
, go back to Phoenix.LiveViewTest module for more information.
Sends a keyup event given by element
and returns the rendered result.
The element
is created with element/3
and must point to a single
element on the page with a phx-keyup
or phx-window-keyup
attribute
in it. The event name given set on phx-keyup
is then sent to the
appropriate LiveView (or component if phx-target
is set accordingly).
All phx-value-*
entries in the element are sent as values. Extra values
can be given with the value
argument.
It returns the contents of the whole LiveView or an {:error, redirect}
tuple.
Examples
{:ok, view, html} = live(conn, "/thermo")
assert html =~ "The temp is: 30℉"
assert view |> element("#inc") |> render_keyup() =~ "The temp is: 31℉"
Sends a keyup event to the view and returns the rendered result.
It returns the contents of the whole LiveView or an {:error, redirect}
tuple.
Examples
{:ok, view, html} = live(conn, "/thermo")
assert html =~ "The temp is: 30℉"
assert render_keyup(view, :inc) =~ "The temp is: 31℉"