View Source Bonfire.UI.Common.Testing.Helpers (Bonfire v0.9.11-social-beta.6)

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

assert_field_error(doc, name, error)

assert_field_good(doc, name)

assert_flash(view, kind, message)

assert_flash_kind(flash, atom)

assert_flash_message(flash, r)

assert_form_field_error(doc, field_qualifiers, error)

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

assert_form_field_good(doc, field_name, field_qualifiers)

conn()

conn(conn)

conn(conn, filters)

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

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

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

fake_user_and_conn!(account \\ fake_account!())

fancy_fake_user!(name, opts \\ [])

fancy_fake_user_on_test_instance(opts \\ [])

find_flash(view_or_doc)

find_form_error(doc, name)

find_form_field_error(doc, field_qualifier)

floki_attr(elem, attr)

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

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

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

floki_response(conn, code \\ 200)

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

live_async_wait(liveview)

live_pubsub_wait(liveview)

Wait for the LiveView to receive any queued PubSub broadcasts

live_sockets_disconnect(context)

Disconnect all LiveViews associated with current user or account

live_view_stop(view)

Stop a specific LiveView

qualifiers_to_input_name(list)

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

Render stateful Surface or LiveView components

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

Render stateless Surface or LiveView components

session_conn(conn \\ build_conn())