Open universal search modal instantly via client-side JS
Replace phx-click server event with Fluxon.open_dialog for zero-latency modal opening. The modal DOM is now always present (no :if conditional) so it can be shown instantly; the server syncs state in the background. Fix test selectors that now match the always-present modal form by scoping to forms without phx-target (which the modal form always has).
This commit is contained in:
@@ -56,7 +56,7 @@ defmodule MusicLibraryWeb.ScrobbledTracksLiveTest do
|
||||
session
|
||||
|> unwrap(fn view ->
|
||||
view
|
||||
|> form("form[phx-submit='search']", %{query: "Unique Track"})
|
||||
|> form("form[phx-submit='search']:not([phx-target])", %{query: "Unique Track"})
|
||||
|> render_submit()
|
||||
end)
|
||||
|> assert_has("p", "Unique Track Title")
|
||||
|
||||
Reference in New Issue
Block a user