Alternera.Resource.UI.Test.Harness (alternera_resource_ui v0.9.0)

Copy Markdown View Source

The LiveView that plays the host in a package's UI tests: it mounts the component under test (id "subject") and an action runner, does what the component asks the host (put_params, notify, subscribe, …) and tells the test process each request as {:resource_ui, request}. Mounted by Alternera.Resource.UI.Test.live_ui/3.

Notifications are drawn in #harness-notifications (one [data-kind] element each), so a test can find them. A surface with load/2 (Alternera.Resource.UI.Surface) is loaded first, as the Workbench loads its tab, and gets the result as state; title/1 names #harness-title.