PhoenixTestJsdom.Session (PhoenixTestJsdom v0.1.2)

Copy Markdown View Source

The test session struct that implements PhoenixTest.Driver.

Uses a real JSDom instance backed by Node.js. JSDom executes page JavaScript including the LiveView client, connects via WebSocket, and handles LiveView patches — acting as a lightweight headless browser.

session = PhoenixTestJsdom.Session.new(MyApp.Endpoint)

session
|> visit("/counter")
|> click_button("Increment")
|> assert_has("h1", text: "Counter: 1")

Summary

Functions

new(endpoint)