Excessibility.LiveView (Excessibility v0.5.13)

View Source

LiveView HTML extraction for snapshot testing.

Renders Phoenix.LiveViewTest.View and Phoenix.LiveViewTest.Element structs to HTML for accessibility testing.

This module communicates with the LiveView test proxy to extract the current rendered HTML, including all nested LiveView components.

Usage

This module is used automatically when you call html_snapshot/2 with a LiveView test view or element. You typically don't need to call it directly.

Configuration

Can be mocked via the :live_view_mod config key:

Application.put_env(:excessibility, :live_view_mod, MyMockLiveView)

Summary

Functions

Renders a LiveView test view or element to HTML.

Functions

render_tree(view)

Renders a LiveView test view or element to HTML.

Parameters

Returns

The rendered HTML as a Floki-parsed tree.

render_tree(view_or_element, topic_or_element)