feat(member-live): default the overview to comfortable density with folded-in email
This commit is contained in:
parent
0a23d03d9d
commit
4d100aef22
10 changed files with 58 additions and 44 deletions
|
|
@ -174,7 +174,9 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
# those tests additionally opt out via `non_compact/1`. Either way a `fields`
|
||||
# param rides on every push_patch, hence the relaxed substring assertions.
|
||||
test "clicking a column header toggles sort order and updates the URL", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
# Email is folded into the Member cell by default; unfold it to a separate
|
||||
# sortable column for this column-sort test.
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
{:ok, view, _html} = live(conn, "/members?fields=email")
|
||||
|
||||
# The component data test ids are built with the name of the field
|
||||
|
|
@ -247,7 +249,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
end
|
||||
|
||||
test "sorting works with search query", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
{:ok, view, _html} = live(conn, "/members?fields=email&query=test")
|
||||
|
||||
view
|
||||
|
|
@ -261,7 +263,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
end
|
||||
|
||||
test "sorting maintains search query when toggling order", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
|
||||
{:ok, view, _html} =
|
||||
live(conn, "/members?fields=email&query=test&sort_field=email&sort_order=asc")
|
||||
|
|
@ -280,7 +282,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
describe "URL param handling" do
|
||||
@describetag :ui
|
||||
test "handle_params reads sort query and applies it", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
|
||||
{:ok, view, _html} =
|
||||
live(conn, "/members?fields=email&query=&sort_field=email&sort_order=desc")
|
||||
|
|
@ -300,7 +302,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
end
|
||||
|
||||
test "handle_params preserves search query with sort params", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
|
||||
{:ok, view, _html} =
|
||||
live(conn, "/members?fields=email&query=test&sort_field=email&sort_order=desc")
|
||||
|
|
@ -313,7 +315,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
describe "search and sort integration" do
|
||||
@describetag :ui
|
||||
test "search maintains sort state", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
|
||||
{:ok, view, _html} =
|
||||
live(conn, "/members?fields=email&query=&sort_field=email&sort_order=desc")
|
||||
|
|
@ -328,7 +330,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
end
|
||||
|
||||
test "sort maintains search state", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
|
||||
{:ok, view, _html} =
|
||||
live(conn, "/members?fields=email&query=test&sort_field=email&sort_order=asc")
|
||||
|
|
@ -1607,7 +1609,7 @@ defmodule MvWeb.MemberLive.IndexTest do
|
|||
end
|
||||
|
||||
test "boolean filters are preserved during navigation actions", %{conn: conn} do
|
||||
conn = conn_with_oidc_user(conn)
|
||||
conn = conn |> conn_with_oidc_user() |> non_compact()
|
||||
boolean_field = create_boolean_custom_field()
|
||||
|
||||
{:ok, view, _html} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue