style: highlight selected table and add tooltip
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
02af136fd9
commit
49fd2181a7
19 changed files with 687 additions and 151 deletions
|
|
@ -304,6 +304,44 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
assert_redirect(view, ~p"/members/#{member}")
|
||||
end
|
||||
|
||||
describe "table row outline (hover and selected)" do
|
||||
@describetag :ui
|
||||
|
||||
test "clickable rows have hover and focus-within ring classes", %{conn: conn} do
|
||||
system_actor = Mv.Helpers.SystemActor.get_system_actor()
|
||||
|
||||
{:ok, _member} =
|
||||
Mv.Membership.create_member(
|
||||
%{first_name: "Hover", last_name: "Test", email: "hover@example.com"},
|
||||
actor: system_actor
|
||||
)
|
||||
|
||||
conn = conn_with_oidc_user(conn)
|
||||
{:ok, _view, html} = live(conn, "/members")
|
||||
|
||||
# CoreComponents table adds hover and focus-within ring when row_click is set
|
||||
assert html =~ "hover:ring-2"
|
||||
assert html =~ "focus-within:ring-2"
|
||||
assert html =~ "hover:ring-base-content/10"
|
||||
end
|
||||
|
||||
test "selected outline only from checkbox selection, not from highlight param", %{conn: conn} do
|
||||
system_actor = Mv.Helpers.SystemActor.get_system_actor()
|
||||
|
||||
{:ok, member} =
|
||||
Mv.Membership.create_member(
|
||||
%{first_name: "Highlight", last_name: "Only", email: "highlight@example.com"},
|
||||
actor: system_actor
|
||||
)
|
||||
|
||||
conn = conn_with_oidc_user(conn)
|
||||
{:ok, view, _html} = live(conn, "/members?highlight=#{member.id}")
|
||||
|
||||
# Outline is only for checkbox selection; highlight param does not set data-selected
|
||||
refute has_element?(view, "tr#row-#{member.id}[data-selected='true']")
|
||||
end
|
||||
end
|
||||
|
||||
describe "copy_emails feature" do
|
||||
setup do
|
||||
system_actor = Mv.Helpers.SystemActor.get_system_actor()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue