prop/test/microwaveprop_web/live/map_live_test.exs
Graham McIntire 1e205cb471
Add propagation context, grid worker, and fix merge issues
- Replace stub propagation.ex with real implementation (score_grid_point,
  upsert_scores, latest_scores, latest_valid_time)
- Add PropagationGridWorker (hourly Oban cron) for CONUS grid scoring
- Add mix propagation_grid task for manual triggering
- Fix duplicate extract_grid/2 from parallel merges
- Fix extract_grid to skip outside-grid points instead of erroring
- Add propagation queue to Oban config
2026-03-30 17:18:05 -05:00

46 lines
1.2 KiB
Elixir

defmodule MicrowavepropWeb.MapLiveTest do
use MicrowavepropWeb.ConnCase, async: true
import Phoenix.LiveViewTest
describe "mount" do
test "renders the propagation map page", %{conn: conn} do
{:ok, _lv, html} = live(conn, ~p"/map")
assert html =~ "Propagation Map"
assert html =~ "propagation-map"
end
test "renders all band selector buttons", %{conn: conn} do
{:ok, _lv, html} = live(conn, ~p"/map")
assert html =~ "10 GHz"
assert html =~ "24 GHz"
assert html =~ "47 GHz"
assert html =~ "75 GHz"
end
test "defaults to 10 GHz band selected", %{conn: conn} do
{:ok, _lv, html} = live(conn, ~p"/map")
assert html =~ "btn-primary"
end
test "includes map container with data-scores", %{conn: conn} do
{:ok, _lv, html} = live(conn, ~p"/map")
assert html =~ ~s(id="propagation-map")
assert html =~ "data-scores"
assert html =~ "phx-hook"
end
end
describe "select_band" do
test "updates selected band on click", %{conn: conn} do
{:ok, lv, _html} = live(conn, ~p"/map")
html =
lv
|> element("button[value='24000']")
|> render_click()
assert html =~ "24 GHz"
end
end
end