feat: add groups to search vector
Some checks reported errors
continuous-integration/drone/push Build was killed

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Simon 2026-02-18 12:47:23 +01:00
parent 3f07de1276
commit f6575319f7
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
6 changed files with 878 additions and 5 deletions

View file

@ -8,6 +8,7 @@ defmodule MvWeb.MemberLive.IndexGroupsIntegrationTest do
- Groups sorting works with other sortings
- Groups work with Membership Fee Status filter
- Groups work with existing search (but not testing search integration itself)
- Member index search by group name returns members in that group (Issue #375)
"""
# async: false to prevent PostgreSQL deadlocks when creating members and groups
use MvWeb.ConnCase, async: false
@ -212,6 +213,25 @@ defmodule MvWeb.MemberLive.IndexGroupsIntegrationTest do
# (that's part of Issue #5 - Search Integration)
end
test "member index search by group name returns members in that group", %{
conn: conn,
member1: member1,
member2: member2,
group1: group1
} do
# member1 is in group1 "Board Members", member2 is not
conn = conn_with_oidc_user(conn)
{:ok, view, _html} = live(conn, "/members")
view
|> element("form[phx-submit='search']")
|> render_submit(%{"query" => group1.name})
html = render(view)
assert html =~ member1.first_name
refute html =~ member2.first_name
end
test "all filters and sortings work together", %{
conn: conn,
member1: member1,