hide more ammo group table fields when not viewing historical information

This commit is contained in:
2023-03-19 14:11:01 -04:00
parent ca81924ebe
commit 2987e4ff37
25 changed files with 246 additions and 192 deletions

View File

@ -116,7 +116,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
assert html =~ dgettext("prompts", "Ammo added successfully")
assert html =~ "42"
assert html =~ "\n42\n"
end
test "saves multiple new ammo_groups", %{conn: conn, current_user: current_user} do
@ -202,7 +202,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
assert html =~ dgettext("prompts", "Ammo updated successfully")
assert html =~ "43"
assert html =~ "\n43\n"
end
test "clones ammo_group in listing", %{conn: conn, ammo_group: ammo_group} do
@ -229,7 +229,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
assert html =~ dgettext("prompts", "Ammo added successfully")
assert html =~ "42"
assert html =~ "\n42\n"
assert html =~ gettext("$%{amount}", amount: display_currency(120.5))
end
@ -257,7 +257,7 @@ defmodule CanneryWeb.AmmoGroupLiveTest do
|> follow_redirect(conn, Routes.ammo_group_index_path(conn, :index))
assert html =~ dgettext("prompts", "Ammo added successfully")
assert html =~ "43"
assert html =~ "\n43\n"
assert html =~ gettext("$%{amount}", amount: display_currency(120.5))
end

View File

@ -273,7 +273,7 @@ defmodule CanneryWeb.ContainerLiveTest do
{:ok, _show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ ammo_type_name
assert html =~ "some ammo group"
assert html =~ "\n20\n"
end
test "displays ammo group in table",
@ -286,7 +286,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|> render_click()
assert html =~ ammo_type_name
assert html =~ "some ammo group"
assert html =~ "\n20\n"
end
end
@ -298,7 +298,7 @@ defmodule CanneryWeb.ContainerLiveTest do
{:ok, show_live, html} = live(conn, Routes.container_show_path(conn, :show, container))
assert html =~ dgettext("actions", "Show used")
refute html =~ "some ammo group"
refute html =~ "\n20\n"
html =
show_live
@ -306,7 +306,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|> render_click()
assert html =~ ammo_type_name
assert html =~ "some ammo group"
assert html =~ "\n20\n"
assert html =~ "Empty"
end
@ -320,7 +320,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|> render_click()
assert html =~ dgettext("actions", "Show used")
refute html =~ "some ammo group"
refute html =~ "\n20\n"
html =
show_live
@ -328,7 +328,7 @@ defmodule CanneryWeb.ContainerLiveTest do
|> render_click()
assert html =~ ammo_type_name
assert html =~ "some ammo group"
assert html =~ "\n20\n"
assert html =~ "Empty"
end
end