# `PhxDemo.LiveView`
[🔗](https://github.com/thenatespack/phoenix_demo/blob/main/lib/phx_demo/live_view.ex#L1)

Waits for LiveView to settle so recordings don't capture half-updated pages
and steps don't fire before the socket is connected.

"Settled" means either there's no LiveView on the page, or `window.liveSocket`
exists, the main LiveView root has `phx-connected`, no element has a
`phx-*-loading` class, and no file upload is in flight.

An upload is in flight while a file input's `data-phx-preflighted-refs`
differs from its `data-phx-done-refs`: LiveView's own test for "entries are
still uploading". This covers `auto_upload: true` uploads and uploads
started by submitting the form.

# `await`

Blocks until LiveView has settled, or raises with a diagnosis.

Options:
  * `:timeout`: milliseconds (default: PhoenixTest.Playwright's timeout)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
