Merge pull request #3656 from consul/fix_alert_text
Fix text confirming investment heading support
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
method: "post",
|
||||
remote: (display_support_alert?(investment) ? false : true),
|
||||
data: (display_support_alert?(investment) ? {
|
||||
confirm: t("budgets.investments.investment.confirm_group") } : nil),
|
||||
confirm: t("budgets.investments.investment.confirm_group", count: investment.group.max_votable_headings) } : nil),
|
||||
"aria-hidden" => css_for_aria_hidden(reason) do %>
|
||||
<%= t("budgets.investments.investment.give_support") %>
|
||||
<% end %>
|
||||
|
||||
@@ -137,7 +137,7 @@ en:
|
||||
support_title: Support this project
|
||||
confirm_group:
|
||||
one: "You can only support investments in %{count} district. If you continue you cannot change the election of your district. Are you sure?"
|
||||
other: "You can only support investments in %{count} district. If you continue you cannot change the election of your district. Are you sure?"
|
||||
other: "You can only support investments in %{count} districts. If you continue you cannot change the election of your district. Are you sure?"
|
||||
supports:
|
||||
one: 1 support
|
||||
other: "%{count} supports"
|
||||
|
||||
@@ -191,6 +191,13 @@ describe "Votes" do
|
||||
"Share it!"
|
||||
end
|
||||
|
||||
scenario "Confirm message shows the right text", :js do
|
||||
visit budget_investments_path(budget, heading_id: new_york.id)
|
||||
find(".in-favor a").click
|
||||
|
||||
expect(page.driver.send(:find_modal).text).to match "You can only support investments in 2 districts."
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user