From fb9c8df7ea179116c858c403a22ed38dc4cb7280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Wed, 15 Mar 2023 18:18:33 +0100 Subject: [PATCH] Fix tests on windows --- test/livebook_web/live/home_live_test.exs | 3 +++ test/livebook_web/live/hub/edit_live_test.exs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/test/livebook_web/live/home_live_test.exs b/test/livebook_web/live/home_live_test.exs index 751470a4f..f7107a52a 100644 --- a/test/livebook_web/live/home_live_test.exs +++ b/test/livebook_web/live/home_live_test.exs @@ -2,6 +2,7 @@ defmodule LivebookWeb.HomeLiveTest do use LivebookWeb.ConnCase, async: true import Phoenix.LiveViewTest + import Livebook.SessionHelpers alias Livebook.{Sessions, Session} @@ -145,6 +146,8 @@ defmodule LivebookWeb.HomeLiveTest do Session.set_file(session.pid, file) Session.set_notebook_name(session.pid, "Special notebook") + wait_for_session_update(session.pid) + {:ok, view, _} = live(conn, ~p"/") view diff --git a/test/livebook_web/live/hub/edit_live_test.exs b/test/livebook_web/live/hub/edit_live_test.exs index fe2f81032..312aed561 100644 --- a/test/livebook_web/live/hub/edit_live_test.exs +++ b/test/livebook_web/live/hub/edit_live_test.exs @@ -230,6 +230,8 @@ defmodule LivebookWeb.Hub.EditLiveTest do assert_hub(view, %{hub | hub_emoji: attrs["hub_emoji"]}) refute Hubs.fetch_hub!(hub.id) == hub + + Hubs.delete_hub(hub.id) end end