Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
o

DisconnectedRender

object DisconnectedRender

Runs serverless tests against the first, disconnected HTTP render.

A disconnected render executes finalized routes directly. For a Scalive Live route this exercises the production HTTP lifecycle, including routing, mount aspects, disconnected mount, initial handleParams, layouts, components, nested LiveViews, session metadata, and CSRF response handling. It does not start a server, join a LiveSocket, perform the separate connected mount, dispatch events, or run connected asynchronous work. Ordinary GET and POST forms can be submitted explicitly through submit.

Defined by scalive.testing.DisconnectedRender. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:24-55)

Methods1

run

def run[R](routes: zio.http.Routes[R, Nothing], request: zio.http.Request): zio.ZIO[R, Throwable, testing.RenderedPage]

Executes request against routes and captures the returned page.

The body is fully consumed before the route scope closes, then replaced on response with a replayable string body. HTTP responses of every status are successful results, and redirects are never followed.

Defined by scalive.testing.DisconnectedRender.run. View source (scalive/testing/src/scalive/testing/DisconnectedRender.scala:31-35)