From 959f3a3f69ea9e39f32421e7d9f37065f9b69c54 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 1 Aug 2026 09:26:47 -0500 Subject: [PATCH] Fix LiveView crashes and stabilize test suite --- Makefile | 3 --- .../live/admin/contact_edit_live.ex | 6 ++++++ .../live/admin/monitor_live/index.ex | 2 +- .../live/rover_locations_live.ex | 6 +++++- .../beacons/range_estimate_test.exs | 4 ++-- test/microwaveprop/logger_format_test.exs | 2 -- test/microwaveprop/prom_ex_test.exs | 4 ++-- test/microwaveprop/propagation/eme_test.exs | 2 +- .../propagation/recalibrator_test.exs | 1 - test/microwaveprop/radio/contact_edit_test.exs | 10 ++++++---- .../weather/grid_cache_valkey_test.exs | 10 ++++++---- .../weather/nexrad_client_test.exs | 4 ++-- .../workers/ionosphere_fetch_worker_test.exs | 2 +- .../user_settings_controller_test.exs | 2 +- .../weather_tile_controller_test.exs | 3 +++ .../microwaveprop_web/live/about_live_test.exs | 2 -- .../live/contact_live/index_test.exs | 2 -- .../live/contact_live/show_coverage_test.exs | 1 - .../live/contact_live/show_hydration_test.exs | 2 -- .../live/import_live_test.exs | 18 ++++++++++++++---- .../live/status_live_test.exs | 2 +- .../live/user_profile_live_test.exs | 2 +- .../plugs/remote_ip_property_test.exs | 4 ++-- test/microwaveprop_web/telemetry_test.exs | 1 - 24 files changed, 54 insertions(+), 41 deletions(-) diff --git a/Makefile b/Makefile index 032b0004..19f50c00 100644 --- a/Makefile +++ b/Makefile @@ -25,9 +25,6 @@ deps-audit: cargo-audit: cargo audit --file rust/prop_grid_rs/Cargo.lock -sobelow: - MIX_ENV=test mix sobelow --config --quiet - format: MIX_ENV=test mix format --check-formatted diff --git a/lib/microwaveprop_web/live/admin/contact_edit_live.ex b/lib/microwaveprop_web/live/admin/contact_edit_live.ex index 36f1b924..0942a551 100644 --- a/lib/microwaveprop_web/live/admin/contact_edit_live.ex +++ b/lib/microwaveprop_web/live/admin/contact_edit_live.ex @@ -118,6 +118,12 @@ defmodule MicrowavepropWeb.Admin.ContactEditLive do end end + # Swoosh's test adapter delivers the email back to the calling process. + # Approval/rejection notifications are sent from this LiveView process, + # so consume the adapter message instead of crashing on an unknown info. + @impl true + def handle_info({:email, %Swoosh.Email{}}, socket), do: {:noreply, socket} + defp normalize_note(""), do: nil defp normalize_note(note), do: String.trim(note) diff --git a/lib/microwaveprop_web/live/admin/monitor_live/index.ex b/lib/microwaveprop_web/live/admin/monitor_live/index.ex index f0dbdfcb..6d9bc6a8 100644 --- a/lib/microwaveprop_web/live/admin/monitor_live/index.ex +++ b/lib/microwaveprop_web/live/admin/monitor_live/index.ex @@ -109,7 +109,7 @@ defmodule MicrowavepropWeb.Admin.MonitorLive.Index do - + {monitor.name} <%= if monitor.hardware_type do %> diff --git a/lib/microwaveprop_web/live/rover_locations_live.ex b/lib/microwaveprop_web/live/rover_locations_live.ex index ef9a544b..7f914583 100644 --- a/lib/microwaveprop_web/live/rover_locations_live.ex +++ b/lib/microwaveprop_web/live/rover_locations_live.ex @@ -433,7 +433,11 @@ defmodule MicrowavepropWeb.RoverLocationsLive do -
+