diff --git a/test/microwaveprop_web/live/contact_live_test.exs b/test/microwaveprop_web/live/contact_live_test.exs index e701b1cc..bee3d0f2 100644 --- a/test/microwaveprop_web/live/contact_live_test.exs +++ b/test/microwaveprop_web/live/contact_live_test.exs @@ -383,7 +383,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - html = render_async(lv) + html = render_async(lv, 2_000) assert html =~ "Atmospheric Profile" assert html =~ "NARR" # Collapsed summary shows HPBL / PWAT / lat,lon from the injected NARR row. @@ -441,7 +441,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do |> Repo.insert() {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - html = render_async(lv) + html = render_async(lv, 2_000) assert html =~ "HRRR native" # 300 mb comes from the native profile — pressure-level data capped at 700. @@ -719,7 +719,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - html = render_async(lv) + html = render_async(lv, 2_000) # Surface Observations section is present; actual rows may or may # not render depending on internal proximity/time filters. The # render pass itself exercises the with-data code path either way. @@ -758,7 +758,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - html = render_async(lv) + html = render_async(lv, 2_000) assert html =~ "KFWD" end @@ -915,7 +915,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do contact = seed_fully_hydrated() {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - html = render_async(lv) + html = render_async(lv, 2_000) # Headers / enrichment labels visible when data is present. assert html =~ contact.station1 @@ -932,7 +932,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do contact = seed_fully_hydrated() {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - _ = render_async(lv) + _ = render_async(lv, 2_000) # Simulate the TerrainProfileWorker broadcast — the listener # recomputes elevation_profile and propagation_analysis and @@ -946,7 +946,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do contact = seed_fully_hydrated() {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - _ = render_async(lv) + _ = render_async(lv, 2_000) send(lv.pid, {:terrain_ready, Ecto.UUID.generate()}) assert Process.alive?(lv.pid) @@ -956,7 +956,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do contact = seed_fully_hydrated() {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - _ = render_async(lv) + _ = render_async(lv, 2_000) send(lv.pid, {:sounding_fetched, %{contact_id: contact.id}}) html = render(lv) @@ -967,7 +967,7 @@ defmodule MicrowavepropWeb.ContactLiveTest do contact = seed_fully_hydrated() {:ok, lv, _html} = live(conn, ~p"/contacts/#{contact.id}") - _ = render_async(lv) + _ = render_async(lv, 2_000) send(lv.pid, {:sounding_fetched, %{contact_id: Ecto.UUID.generate()}}) assert Process.alive?(lv.pid) diff --git a/test/microwaveprop_web/telemetry_test.exs b/test/microwaveprop_web/telemetry_test.exs index 00c72a10..7036c49d 100644 --- a/test/microwaveprop_web/telemetry_test.exs +++ b/test/microwaveprop_web/telemetry_test.exs @@ -9,7 +9,7 @@ defmodule MicrowavepropWeb.TelemetryTest do metrics = Telemetry.metrics() assert is_list(metrics) - assert metrics != [] + assert Enum.any?(metrics) for m <- metrics do assert is_struct(m)