Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
c

ConnectedView

class ConnectedView[-Msg]

A semantic handle to one connected root or nested LiveView.

Actions resolve bindings from the latest committed HTML and wait for the correlated lifecycle reply. Runtime connection objects and protocol frames remain private implementation details.

Defined by scalive.testing.ConnectedView. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:126-226)

Methods12

awaitDiff

def awaitDiff: zio.package.Task[Unit]

Waits for the next uncorrelated async, subscription, or component output.

Defined by scalive.testing.ConnectedView.awaitDiff. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:164-164)

changeForm

def changeForm(selector: String, fields: Vector[(String, String)], target: Option[String] = ...): zio.package.Task[Unit]

Dispatches the selected form's phx-change binding.

Defined by scalive.testing.ConnectedView.changeForm. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:149-154)

click

def click(selector: String): zio.package.Task[Unit]

Dispatches the phx-click binding on exactly one matching element.

Defined by scalive.testing.ConnectedView.click. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:141-142)

clickButton

def clickButton(label: String): zio.package.Task[Unit]

Dispatches the phx-click binding on exactly one button with the given text.

Defined by scalive.testing.ConnectedView.clickButton. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:145-146)

html

def html: zio.package.UIO[String]

Returns the latest committed semantic HTML projection.

Defined by scalive.testing.ConnectedView.html. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:134-134)

isJoined

def isJoined: zio.package.UIO[Boolean]

Reports whether this exact topic is still installed in the production supervisor.

Defined by scalive.testing.ConnectedView.isJoined. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:181-181)

joinNested

def joinNested(instanceId: String): zio.package.RIO[zio.Scope, testing.ConnectedView[Nothing]]

Joins a nested LiveView registered in this view's latest committed HTML.

Defined by scalive.testing.ConnectedView.joinNested. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:167-168)

leave

def leave: zio.package.UIO[Unit]

Leaves this lifecycle through the production supervisor.

Defined by scalive.testing.ConnectedView.leave. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:184-184)

send

def send(message: Msg): zio.package.Task[Unit]

Sends one typed server message and waits for its committed output.

Defined by scalive.testing.ConnectedView.send. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:161-161)

submitForm

def submitForm(selector: String, fields: Vector[(String, String)]): zio.package.Task[Unit]

Dispatches the selected form's phx-submit binding.

Defined by scalive.testing.ConnectedView.submitForm. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:157-158)

text

def text(selector: String): zio.package.Task[String]

Returns the text of exactly one element matching selector.

Defined by scalive.testing.ConnectedView.text. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:137-138)

upload

def upload(uploadRef: String, entryRef: String, fileName: String, mediaType: String, bytes: zio.Chunk[Byte]): zio.package.Task[Unit]

Runs hosted upload preflight and streams one complete entry to the lifecycle.

Defined by scalive.testing.ConnectedView.upload. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:171-178)

Values1

topic

val topic: String

Stable protocol topic text for diagnostics. It is not a runtime handle.

Defined by scalive.testing.ConnectedView.topic. View source (scalive/testing/src/scalive/testing/ConnectedRender.scala:131-131)