test: restore deleted tests with dynamic field visibility support
Adapts icon distribution test for dynamic fields, restores empty cell test
This commit is contained in:
parent
b9bd5882e7
commit
ecc6522571
2 changed files with 45 additions and 0 deletions
|
|
@ -241,4 +241,26 @@ defmodule MvWeb.MemberLive.IndexCustomFieldsDisplayTest do
|
|||
|
||||
assert html =~ "alice.private@example.com"
|
||||
end
|
||||
|
||||
test "shows empty cell for members without custom field values", %{
|
||||
conn: conn,
|
||||
member2: _member2,
|
||||
field_show_string: field
|
||||
} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
{:ok, _view, html} = live(conn, "/members")
|
||||
|
||||
# The custom field column should exist
|
||||
assert html =~ field.name
|
||||
|
||||
# Member2 should exist in the table (first_name and last_name are in separate columns)
|
||||
assert html =~ "Bob"
|
||||
assert html =~ "Brown"
|
||||
|
||||
# The value from member1 should appear (phone number)
|
||||
assert html =~ "+49123456789"
|
||||
|
||||
# Note: Member2 doesn't have this custom field value, so the cell is empty
|
||||
# The implementation shows "" for missing values, which is the expected behavior
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue