Foundry.TestScenario.LiveViewHook (foundry v0.1.6)

Copy Markdown

Phoenix LiveView on_mount hook that registers the LiveView channel PID with its associated test process PID during test execution.

Reads the test PID from the Phoenix session if present (set by test helpers). The PID is then used by AshTracer to forward action events back to the test. Also records the page mount as an entry event in the scenario trace.

Add to router via: live_session :default, on_mount: [Foundry.TestScenario.LiveViewHook]

Summary

Functions

on_mount(name, params, session, socket)