View Source Bonfire.UI.Common.Testing.Helpers (Bonfire v0.9.10-classic-beta.169)

Summary

Functions

Helper function to test errors in form fields. Compatible with most recent versions of phoenix, unlike deprecated assert_field_error.

Wait for the LiveView to receive any queued PubSub broadcasts

Disconnect all LiveViews associated with current user or account

Stop a specific LiveView

Render stateful Surface or LiveView components

Render stateless Surface or LiveView components

Functions

Link to this function

assert_field_error(doc, name, error)

View Source
Link to this function

assert_field_good(doc, name)

View Source
Link to this function

assert_flash(view, kind, message)

View Source
Link to this function

assert_flash_kind(flash, atom)

View Source
Link to this function

assert_flash_message(flash, r)

View Source
Link to this function

assert_form_field_error(doc, field_qualifiers, error)

View Source

Helper function to test errors in form fields. Compatible with most recent versions of phoenix, unlike deprecated assert_field_error.

Link to this function

assert_form_field_good(doc, field_name, field_qualifiers)

View Source
Link to this function

fake_account!(attrs \\ %{}, opts \\ [])

View Source
Link to this function

fake_admin!(account \\ %{}, attrs \\ %{}, opts \\ [])

View Source
Link to this function

fake_user!(account \\ %{}, attrs \\ %{}, opts \\ [])

View Source
Link to this function

fake_user_and_conn!(account \\ fake_account!())

View Source
Link to this function

fancy_fake_user!(name, opts \\ [])

View Source
Link to this function

fancy_fake_user_on_test_instance(opts \\ [])

View Source
Link to this function

find_form_error(doc, name)

View Source
Link to this function

find_form_field_error(doc, field_qualifier)

View Source
Link to this function

floki_click(conn_or_view \\ conn(), path_or_value \\ %{}, value \\ %{})

View Source
Link to this function

floki_live(conn \\ conn(), path \\ nil)

View Source
Link to this function

floki_redirect(conn \\ conn(), path \\ nil)

View Source
Link to this function

floki_response(conn, code \\ 200)

View Source
Link to this function

floki_submit(conn_or_view \\ conn(), path_or_event, event_or_value \\ %{}, value \\ %{})

View Source
Link to this function

live_pubsub_wait(live_view)

View Source

Wait for the LiveView to receive any queued PubSub broadcasts

Link to this function

live_sockets_disconnect(context)

View Source

Disconnect all LiveViews associated with current user or account

Stop a specific LiveView

Link to this function

qualifiers_to_input_name(list)

View Source
Link to this function

render_stateful(component, assigns \\ %{}, context \\ [])

View Source

Render stateful Surface or LiveView components

Link to this function

render_stateless(component, assigns \\ [], context \\ [])

View Source

Render stateless Surface or LiveView components

Link to this function

session_conn(conn \\ build_conn())

View Source