Merge pull request #744 from alessiocappa/FT-UpdateReportPageUI

feat: Improve report page UI
This commit is contained in:
soky srm
2026-01-23 09:19:17 +01:00
committed by GitHub
11 changed files with 264 additions and 227 deletions

View File

@@ -82,7 +82,9 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest
get reports_path(period_type: :monthly)
assert_response :ok
assert_select "h2", text: I18n.t("reports.trends.title")
assert_select "th", text: I18n.t("reports.trends.month")
assert_select '[role="columnheader"]' do
assert_select "div", text: I18n.t("reports.trends.month")
end
end
test "index handles invalid date parameters gracefully" do
@@ -236,6 +238,12 @@ class ReportsControllerTest < ActionDispatch::IntegrationTest
get reports_path(period_type: :monthly)
assert_response :ok
assert_select "table.w-full"
# Parent category
assert_select "div[data-category='category-#{parent_category.id}']", text: /^Entertainment/
# Subcategories
assert_select "div[data-category='category-#{subcategory_movies.id}']", text: /^Movies/
assert_select "div[data-category='category-#{subcategory_games.id}']", text: /^Games/
end
end