Is there a way we can write a LivewViewTest against the HTML form?

Is there a way we can write a LivewViewTest against the HTML form? for example:

    <form id="form1" phx-submit="search">
      <input name="search" id="search" phx-debounce="1000" value=""  />
    </form>

I want to write a simple test:
1/ input some value in input#search
2/ render_sumit()

Most example codes suggest (1) defining changeset and (2) using form helper.

Is it the way or there is an alternative for this simple use case?

Ah, my bad. Turn out I can just do this:

view |> form("#form1", %{search: "testing"}) |> render_submit()
1 Like