Extract stats data grid component

This commit is contained in:
Claudio Ortolina
2024-10-30 08:37:49 +00:00
parent f23031821c
commit 432f09cf6f
5 changed files with 259 additions and 247 deletions
@@ -35,15 +35,15 @@ defmodule MusicLibraryWeb.StatsIndexTest do
collection
|> Enum.frequencies_by(& &1.format)
|> Enum.each(fn {format, count} ->
assert html =~ "\n#{count}\n"
assert html =~ "\n#{Record.format_long_label(format)}\n"
assert html =~ "#{count}\n"
assert html =~ "#{Record.format_long_label(format)}\n"
end)
collection
|> Enum.frequencies_by(& &1.type)
|> Enum.each(fn {type, count} ->
assert html =~ "\n#{count}\n"
assert html =~ "\n#{Record.type_long_label(type)}\n"
assert html =~ "#{count}\n"
assert html =~ "#{Record.type_long_label(type)}\n"
end)
end