Address review feedback for dashboard outflows investment contributions

Agent-Logs-Url: https://github.com/we-promise/sure/sessions/81bb8eeb-1c0b-4a7f-b939-187061c41f22

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-29 10:13:11 +00:00
parent b1ec33da01
commit 64cd8c72e7
2 changed files with 20 additions and 10 deletions

View File

@@ -55,7 +55,15 @@ class PagesControllerTest < ActionDispatch::IntegrationTest
get root_path
assert_response :ok
assert_select "#outflows-donut-section", text: /#{Regexp.escape(Category.investment_contributions_name)}/
expected_name = Category.investment_contributions_name
assert_select "#outflows-donut-section", text: /#{Regexp.escape(expected_name)}/
donut_node = Nokogiri::HTML(response.body).at_css("[data-controller='donut-chart']")
segments = JSON.parse(donut_node["data-donut-chart-segments-value"])
contribution_segment = segments.find { |segment| segment["name"] == expected_name }
assert_not_nil contribution_segment
assert_equal 300.0, contribution_segment["amount"]
end
test "changelog" do