Skip to content

Commit 1fc564b

Browse files
committed
Fix sandbox ownership errors in post form tests
Add render_async to setup blocks that render post forms, ensuring the SearchSelect assign_async task completes before the test exits.
1 parent 51d56d0 commit 1fc564b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/live_admin/components/container_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ defmodule LiveAdmin.Components.ContainerTest do
165165
describe "new child resource" do
166166
setup %{conn: conn} do
167167
{:ok, view, _} = live(conn, "/live_admin_test_post/new")
168+
render_async(view)
168169

169170
%{view: view}
170171
end
@@ -215,6 +216,7 @@ defmodule LiveAdmin.Components.ContainerTest do
215216
post = Repo.insert!(%Post{title: "test", previous_versions: [%Version{}, %Version{}]})
216217

217218
{:ok, view, _} = live(conn, "/live_admin_test_post/edit/#{post.post_id}")
219+
render_async(view)
218220

219221
%{view: view}
220222
end
@@ -279,6 +281,7 @@ defmodule LiveAdmin.Components.ContainerTest do
279281
describe "new post with custom string field" do
280282
setup %{conn: conn} do
281283
{:ok, view, _} = live(conn, "/live_admin_test_post/new")
284+
render_async(view)
282285

283286
%{view: view}
284287
end

0 commit comments

Comments
 (0)