Fixes budgets/votes_spec
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
|
<% voting_allowed = true unless reason.presence == :not_voting_allowed %>
|
||||||
<% user_voted_for = voted_for?(investment_votes, investment) %>
|
<% user_voted_for = voted_for?(investment_votes, investment) %>
|
||||||
|
|
||||||
<div class="supports">
|
<div class="supports js-supports">
|
||||||
|
|
||||||
<span class="total-supports <%= 'no-button' unless voting_allowed || user_voted_for %>">
|
<span class="total-supports <%= 'no-button' unless voting_allowed || user_voted_for %>">
|
||||||
<%= t("budget.investments.investment.supports", count: investment.total_votes) %>
|
<%= t("budget.investments.investment.supports", count: investment.total_votes) %>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if reason.present? && !user_voted_for %>
|
<% if reason.present? && !user_voted_for %>
|
||||||
<div class="no-supports-allowed" style='display:none' aria-hidden="false">
|
<div class="js-supports-not-allowed" style='display:none' aria-hidden="false">
|
||||||
<p>
|
<p>
|
||||||
<%= t("votes.budget_investments.#{reason}",
|
<%= t("votes.budget_investments.#{reason}",
|
||||||
verify_account: link_to(t("votes.verify_account"), verification_path),
|
verify_account: link_to(t("votes.verify_account"), verification_path),
|
||||||
|
|||||||
@@ -599,6 +599,12 @@ en:
|
|||||||
organization: Organisations are not permitted to vote
|
organization: Organisations are not permitted to vote
|
||||||
unfeasible: Unfeasible investment projects can not be supported
|
unfeasible: Unfeasible investment projects can not be supported
|
||||||
not_voting_allowed: Voting phase is closed
|
not_voting_allowed: Voting phase is closed
|
||||||
|
budget_investments:
|
||||||
|
not_logged_in: You must %{signin} or %{signup} to continue.
|
||||||
|
not_verified: Only verified users can vote on proposals; %{verify_account}.
|
||||||
|
organization: Organisations are not permitted to vote
|
||||||
|
unfeasible: Unfeasible investment projects can not be supported
|
||||||
|
not_voting_allowed: Selecting phase is closed
|
||||||
welcome:
|
welcome:
|
||||||
debates:
|
debates:
|
||||||
description: For meeting, discussing and sharing the things that matter to us in our city.
|
description: For meeting, discussing and sharing the things that matter to us in our city.
|
||||||
|
|||||||
@@ -94,16 +94,16 @@ feature 'Votes' do
|
|||||||
visit budget_investments_path(budget, heading_id: heading.id)
|
visit budget_investments_path(budget, heading_id: heading.id)
|
||||||
|
|
||||||
within("#budget_investment_#{investment.id}") do
|
within("#budget_investment_#{investment.id}") do
|
||||||
find("div.supports").hover
|
find("div.js-supports").hover
|
||||||
expect_message_selecting_not_allowed
|
expect(page).to have_content 'No Selecting Allowed'
|
||||||
end
|
end
|
||||||
|
|
||||||
visit budget_investment_path(budget, investment)
|
visit budget_investment_path(budget, investment)
|
||||||
|
|
||||||
within("#budget_investment_#{investment.id}") do
|
within("#budget_investment_#{investment.id}") do
|
||||||
find("div.supports").hover
|
find("div.js-supports").hover
|
||||||
expect_message_selecting_not_allowed
|
expect(page).to have_content 'No Selecting Allowed'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user