- ErrorHTML: explicit 400 path + 401/403/999 delegation.
- Layouts.body_class/1 returns the expected light/dark theme classes.
- MapLive.Components: map_container + slideover_panel exercising all
connection_status variants, loading state, tracked_callsign clear
button, and view-mode radios.
- CoreComponents: icon (found + fallback), button, label, error,
flash (info + error + close=false), checkbox input, JS composers.
- Accounts: get_user_by_email{_and_password}, get_user!, register_user
happy-path + error paths, change_* changesets, session-token
round-trip.
Refactor: DeviceIdentification.maybe_refresh_devices splits its nested
logic into fetch_most_recent_device/0, to_datetime/1, and
refresh_if_stale/2 — each a multi-clause function matching on shape.
Coverage 68.28 → 69.56%.
23 lines
694 B
Elixir
23 lines
694 B
Elixir
defmodule AprsmeWeb.LayoutsTest do
|
|
use ExUnit.Case, async: true
|
|
|
|
alias AprsmeWeb.Layouts
|
|
|
|
describe "body_class/1" do
|
|
test "returns the default light/dark-aware class list" do
|
|
result = Layouts.body_class(%{})
|
|
assert is_list(result)
|
|
[classes] = result
|
|
assert classes =~ "bg-white"
|
|
assert classes =~ "dark:bg-gray-900"
|
|
assert classes =~ "text-gray-900"
|
|
assert classes =~ "dark:text-white"
|
|
assert classes =~ "antialiased"
|
|
end
|
|
|
|
test "ignores assigns content" do
|
|
assert Layouts.body_class(%{theme: "dark"}) == Layouts.body_class(%{})
|
|
assert Layouts.body_class(%{whatever: 42}) == Layouts.body_class(%{})
|
|
end
|
|
end
|
|
end
|