Merge branch 'main' into issue/mitgliederverwaltung-420
Integrate current main (CSV import, GDPR join-form description, dependency and tooling bumps) into the bulk-actions-dropdown feature. Gettext catalogs were reconciled with mix gettext.extract --merge; the CHANGELOG Unreleased entries of both sides were combined.
This commit is contained in:
commit
6a6099659b
48 changed files with 3541 additions and 148 deletions
|
|
@ -220,4 +220,59 @@ defmodule MvWeb.MemberLive.ShowTest do
|
|||
assert html =~ "private@example.com"
|
||||
end
|
||||
end
|
||||
|
||||
describe "custom field join_description tooltip" do
|
||||
test "shows a tooltip on the custom field label when join_description is set", %{
|
||||
conn: conn,
|
||||
member: member,
|
||||
actor: actor
|
||||
} do
|
||||
{:ok, custom_field} =
|
||||
CustomField
|
||||
|> Ash.Changeset.for_create(:create, %{
|
||||
name: "DSGVO",
|
||||
value_type: :boolean,
|
||||
join_description: "Accept the privacy policy"
|
||||
})
|
||||
|> Ash.create(actor: actor)
|
||||
|
||||
conn = conn_with_oidc_user(conn)
|
||||
{:ok, view, html} = live(conn, ~p"/members/#{member}")
|
||||
|
||||
assert has_element?(view, "[data-tip*='Accept the privacy policy']")
|
||||
# Tooltip content conveys both the join-form context and the description text.
|
||||
assert has_element?(view, "[data-tip*='Join form:']")
|
||||
assert html =~ "Accept the privacy policy"
|
||||
assert html =~ custom_field.name
|
||||
|
||||
# The info-icon wrapper must center the icon vertically with the label,
|
||||
# matching the flex-items-center idiom used elsewhere (e.g. custom field edit),
|
||||
# so the icon is flush with the label text and not offset downward.
|
||||
assert has_element?(
|
||||
view,
|
||||
"[data-tip*='Accept the privacy policy'].inline-flex.items-center"
|
||||
)
|
||||
end
|
||||
|
||||
test "shows no tooltip on the custom field label when join_description is nil", %{
|
||||
conn: conn,
|
||||
member: member,
|
||||
actor: actor
|
||||
} do
|
||||
{:ok, _custom_field} =
|
||||
CustomField
|
||||
|> Ash.Changeset.for_create(:create, %{
|
||||
name: "Plain field",
|
||||
value_type: :string
|
||||
})
|
||||
|> Ash.create(actor: actor)
|
||||
|
||||
conn = conn_with_oidc_user(conn)
|
||||
{:ok, view, _html} = live(conn, ~p"/members/#{member}")
|
||||
|
||||
assert has_element?(view, "dt", "Plain field")
|
||||
# The info-icon tooltip beside the label is only rendered when join_description is set.
|
||||
refute has_element?(view, "[data-testid='join-description-tooltip']")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue