View Source ExshomeTest.LiveViewHelpers (Exshome - Elixir Smart Home v0.1.7)

API to help testing live views.

Link to this section Summary

Functions

Extracts value from input element by selector.

Renders a preview for app page and returns a view. Raises when something bad happens.

Starts dependencies and renders a preview for app page. Returns a view. Raises when something bad happens.

Renders a live app page and returns a view. Raises when something bad happens.

Link to this section Functions

Link to this function

get_value(view, selector)

View Source

Extracts value from input element by selector.

Link to this function

live_preview(conn, app_module)

View Source
@spec live_preview(Plug.Conn.t(), module()) :: Phoenix.LiveViewTest.View

Renders a preview for app page and returns a view. Raises when something bad happens.

Link to this function

live_preview_with_dependencies(conn, app_module)

View Source
@spec live_preview_with_dependencies(Plug.Conn.t(), module()) ::
  Phoenix.LiveViewTest.View

Starts dependencies and renders a preview for app page. Returns a view. Raises when something bad happens.

Link to this function

live_with_dependencies(conn, app_module, action)

View Source
@spec live_with_dependencies(Plug.Conn.t(), module(), atom()) ::
  Phoenix.LiveViewTest.View

Renders a live app page and returns a view. Raises when something bad happens.

Link to this function

start_dependencies(app_module, action)

View Source
@spec start_dependencies(module(), atom()) :: :ok