feat: add groups to search vector
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3f07de1276
commit
f6575319f7
6 changed files with 878 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue