diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb index e520ec3cc..c2924b990 100644 --- a/app/views/budgets/investments/_votes.html.erb +++ b/app/views/budgets/investments/_votes.html.erb @@ -8,7 +8,7 @@ <%= t("budgets.investments.investment.supports", count: investment.total_votes) %> -
+
<% if user_voted_for %>
<%= t("budgets.investments.investment.already_supported") %> diff --git a/spec/system/management/budget_investments_spec.rb b/spec/system/management/budget_investments_spec.rb index f9273a49c..82fb60c6f 100644 --- a/spec/system/management/budget_investments_spec.rb +++ b/spec/system/management/budget_investments_spec.rb @@ -277,7 +277,7 @@ describe "Budget Investments" do expect(page).to have_content(budget_investment.title) within("#budget-investments") do - find(".js-in-favor a").click + find("in-favor a").click expect(page).to have_content "1 support" expect(page).to have_content "You have already supported this investment project. Share it!" @@ -302,7 +302,7 @@ describe "Budget Investments" do expect(page).to have_css "h1", exact_text: budget_investment.title - find(".js-in-favor a").click + find(".in-favor a").click expect(page).to have_content "1 support" expect(page).to have_content "You have already supported this investment project. Share it!" @@ -325,7 +325,7 @@ describe "Budget Investments" do expect(page).to have_css "h1", exact_text: "Default heading investment" - accept_confirm { find(".js-in-favor a").click } + accept_confirm { find(".in-favor a").click } expect(page).to have_content "1 support" expect(page).to have_content "You have already supported this investment project. Share it!"