Merge branch 'main' into feat/299_plz
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
commit
9a7608f9a1
16 changed files with 573 additions and 88 deletions
|
|
@ -56,6 +56,14 @@ defmodule MvWeb.MemberLive.Index.FieldVisibilityTest do
|
|||
assert field in result
|
||||
end)
|
||||
end
|
||||
|
||||
test "includes pseudo member fields (membership_fee_status, membership_fee_type, groups)" do
|
||||
result = FieldVisibility.get_all_available_fields([])
|
||||
|
||||
assert :membership_fee_status in result
|
||||
assert :membership_fee_type in result
|
||||
assert :groups in result
|
||||
end
|
||||
end
|
||||
|
||||
describe "merge_with_global_settings/3" do
|
||||
|
|
@ -278,6 +286,20 @@ defmodule MvWeb.MemberLive.Index.FieldVisibilityTest do
|
|||
test "handles invalid input" do
|
||||
assert FieldVisibility.get_visible_member_fields(nil) == []
|
||||
end
|
||||
|
||||
test "returns membership_fee_type when visible in selection" do
|
||||
selection = %{
|
||||
"first_name" => true,
|
||||
"membership_fee_type" => true,
|
||||
"groups" => false
|
||||
}
|
||||
|
||||
result = FieldVisibility.get_visible_member_fields(selection)
|
||||
|
||||
assert :membership_fee_type in result
|
||||
assert :first_name in result
|
||||
refute :groups in result
|
||||
end
|
||||
end
|
||||
|
||||
describe "get_visible_custom_fields/1" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue