Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix: Render "Uncategorized" option as badge in transaction category selector (#3641)

Alessio Cappa85ec852cf3e9
diff --git a/app/components/DS/category_select.html.erb b/app/components/DS/category_select.html.erb
index c1203f2cd6..a2095419d1 100644
--- a/app/components/DS/category_select.html.erb
+++ b/app/components/DS/category_select.html.erb
@@ -76,7 +76,8 @@
<%= helpers.icon("check") %>
</span>
- <span><%= blank_label %></span>
+ <%= render partial: "categories/badge",
+ locals: { category: Category.uncategorized } %>
</button>
<% end %>
diff --git a/test/system/transaction_category_select_test.rb b/test/system/transaction_category_select_test.rb
index 1ae2b9fc07..c1dabdfaee 100644
--- a/test/system/transaction_category_select_test.rb
+++ b/test/system/transaction_category_select_test.rb
@@ -45,7 +45,7 @@ class TransactionCategorySelectTest < ApplicationSystemTestCase
within "[data-controller='category-select']" do
find("button", match: :first).click
- click_button "(uncategorized)"
+ find("button[data-category-id='']").click
end
end