test: fix tests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon 2026-03-13 17:07:25 +01:00
parent d54393d80b
commit f12da8a359
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2

View file

@ -70,7 +70,9 @@ defmodule MvWeb.MemberLive.IndexGroupsFilterTest do
# Force LiveView to process {:group_filter_changed, ...} (render triggers mailbox processing) # Force LiveView to process {:group_filter_changed, ...} (render triggers mailbox processing)
_ = render(view) _ = render(view)
assert_patch(view) # Wait for patch; return path so callers can assert URL contains expected filter param
path = assert_patch(view)
{view, path}
end end
test "filter All (default) shows all members", %{ test "filter All (default) shows all members", %{
@ -96,7 +98,8 @@ defmodule MvWeb.MemberLive.IndexGroupsFilterTest do
conn = conn_with_oidc_user(conn) conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members") {:ok, view, _html} = live(conn, "/members")
open_filter_and_set_group(view, group1.id, "in") {view, path} = open_filter_and_set_group(view, group1.id, "in")
assert path =~ "group_#{group1.id}=in", "expected URL to contain group filter param"
html = render(view) html = render(view)
assert html =~ m1.first_name assert html =~ m1.first_name
@ -114,7 +117,7 @@ defmodule MvWeb.MemberLive.IndexGroupsFilterTest do
conn = conn_with_oidc_user(conn) conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members") {:ok, view, _html} = live(conn, "/members")
open_filter_and_set_group(view, group1.id, "not_in") {view, _path} = open_filter_and_set_group(view, group1.id, "not_in")
html = render(view) html = render(view)
refute html =~ m1.first_name refute html =~ m1.first_name
@ -132,7 +135,7 @@ defmodule MvWeb.MemberLive.IndexGroupsFilterTest do
conn = conn_with_oidc_user(conn) conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members") {:ok, view, _html} = live(conn, "/members")
open_filter_and_set_group(view, group1.id, "in") {view, _path} = open_filter_and_set_group(view, group1.id, "in")
html = render(view) html = render(view)
assert html =~ m1.first_name assert html =~ m1.first_name