feat(web): add tooltips to icon-only action buttons
This commit is contained in:
parent
bec49f0771
commit
035edae522
10 changed files with 144 additions and 44 deletions
|
|
@ -300,4 +300,31 @@ defmodule MvWeb.GlobalSettingsLiveTest do
|
|||
"Single Sign-On"
|
||||
end
|
||||
end
|
||||
|
||||
describe "Vereinfacht sync control tooltip (§1.9)" do
|
||||
setup %{conn: conn} do
|
||||
user = create_test_user(%{email: "admin@example.com"})
|
||||
conn = conn_with_oidc_user(conn, user)
|
||||
|
||||
System.put_env("VEREINFACHT_API_URL", "https://example.test/api/v1")
|
||||
System.put_env("VEREINFACHT_API_KEY", "test-key")
|
||||
System.put_env("VEREINFACHT_CLUB_ID", "club-1")
|
||||
|
||||
on_exit(fn ->
|
||||
System.delete_env("VEREINFACHT_API_URL")
|
||||
System.delete_env("VEREINFACHT_API_KEY")
|
||||
System.delete_env("VEREINFACHT_CLUB_ID")
|
||||
end)
|
||||
|
||||
{:ok, conn: conn}
|
||||
end
|
||||
|
||||
test "global Vereinfacht sync control carries a tooltip and accessible label", %{conn: conn} do
|
||||
{:ok, view, _html} = live(conn, ~p"/settings")
|
||||
|
||||
# The sync button is wrapped in a <.tooltip> (data-tip) and carries an aria-label
|
||||
assert has_element?(view, ".tooltip[data-tip] button[phx-click=sync_vereinfacht_contacts]")
|
||||
assert has_element?(view, "button[phx-click=sync_vereinfacht_contacts][aria-label]")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue