fix: adress review comments
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2026-02-18 13:05:31 +01:00
parent f6575319f7
commit 63b8e70e62
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
4 changed files with 83 additions and 77 deletions

View file

@ -15,10 +15,12 @@ defmodule MvWeb.MemberLive.IndexGroupsIntegrationTest do
import Phoenix.LiveViewTest
require Ash.Query
alias Mv.Membership.{Group, MemberGroup, CustomField, CustomFieldValue}
alias Mv.Helpers.SystemActor
alias Mv.Membership.{CustomField, CustomFieldValue, Group, MemberGroup}
alias Mv.MembershipFees.{MembershipFeeCycle, MembershipFeeType}
setup do
system_actor = Mv.Helpers.SystemActor.get_system_actor()
system_actor = SystemActor.get_system_actor()
# Create test members
{:ok, member1} =
@ -81,15 +83,10 @@ defmodule MvWeb.MemberLive.IndexGroupsIntegrationTest do
conn = conn_with_oidc_user(conn)
{:ok, _view, html} = live(conn, "/members")
# Verify groups column is visible by default
# Verify groups column is visible by default (header and content)
assert html =~ group1.name
assert html =~ member1.first_name
# Hide groups column via field visibility dropdown
# (This tests integration with field visibility feature)
# Note: Actual implementation depends on how field visibility works
# For now, we verify the column exists and can be toggled
assert html
assert html =~ "Groups"
end
test "groups filter works with custom field filters", %{
@ -141,11 +138,11 @@ defmodule MvWeb.MemberLive.IndexGroupsIntegrationTest do
member1: member1,
group1: group1
} do
system_actor = Mv.Helpers.SystemActor.get_system_actor()
system_actor = SystemActor.get_system_actor()
# Create a membership fee type and cycle for member1
{:ok, fee_type} =
Mv.MembershipFees.MembershipFeeType
MembershipFeeType
|> Ash.Changeset.for_create(:create, %{
name: "Test Fee",
amount: Decimal.new("50.00"),
@ -160,7 +157,7 @@ defmodule MvWeb.MemberLive.IndexGroupsIntegrationTest do
)
{:ok, _cycle} =
Mv.MembershipFees.MembershipFeeCycle
MembershipFeeCycle
|> Ash.Changeset.for_create(:create, %{
member_id: member1.id,
membership_fee_type_id: fee_type.id,