feat(overview): add point-in-time, suspended, OR-group and count-range filters

This commit is contained in:
Simon 2026-07-10 16:27:15 +02:00
parent c547ca19af
commit c0d1550401
23 changed files with 1116 additions and 117 deletions

View file

@ -69,4 +69,25 @@ defmodule MvWeb.MemberLive.IndexPaymentWiringTest do
{:ok, all_time, _} = live(ctx.conn, "/members?pay_filter=unpaid_1")
assert has_element?(all_time, "#row-#{member.id}")
end
describe "period indicator badge (§1.28)" do
test "no badge in the default all-outstanding scope", ctx do
{:ok, view, _} = live(ctx.conn, "/members")
refute has_element?(view, "[data-testid='payment-period-badge']")
end
test "a full year renders the compact year short code", ctx do
{:ok, view, _} = live(ctx.conn, "/members?pay_from=2026-01-01&pay_to=2026-12-31")
assert has_element?(view, "[data-testid='payment-period-badge']", "2026")
end
test "an arbitrary period falls back to a 'filtered' badge with a period tooltip", ctx do
{:ok, view, _} = live(ctx.conn, "/members?pay_from=2026-02-03&pay_to=2026-08-17")
badge = view |> element("[data-testid='payment-period-badge']") |> render()
assert badge =~ "03.02.2026"
assert badge =~ "17.08.2026"
end
end
end