From 83fe74d530abd7155ecc19a307cfc323e30306e0 Mon Sep 17 00:00:00 2001 From: kikito Date: Mon, 5 Dec 2016 17:33:20 +0100 Subject: [PATCH] Adds .js-class for specs --- app/views/budgets/investments/_votes.html.erb | 2 +- spec/features/management/budget_investments_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/budgets/investments/_votes.html.erb b/app/views/budgets/investments/_votes.html.erb index 7045ff63b..681c1c94c 100644 --- a/app/views/budgets/investments/_votes.html.erb +++ b/app/views/budgets/investments/_votes.html.erb @@ -8,7 +8,7 @@ <%= t("budget.investments.investment.supports", count: investment.total_votes) %> -
+
<% if user_voted_for %>
<%= t("budget.investments.investment.already_supported") %> diff --git a/spec/features/management/budget_investments_spec.rb b/spec/features/management/budget_investments_spec.rb index b7b100cd5..f0f29ae40 100644 --- a/spec/features/management/budget_investments_spec.rb +++ b/spec/features/management/budget_investments_spec.rb @@ -143,7 +143,7 @@ feature 'Budget Investments' do click_link "Support Budget Investments" within("#budget-investments") do - find('.in-favor a').click + find('.js-in-favor a').click expect(page).to have_content "1 support" expect(page).to have_content "You have already supported this. Share it!" @@ -163,7 +163,7 @@ feature 'Budget Investments' do click_link budget_investment.title end - find('.in-favor a').click + find('.js-in-favor a').click expect(page).to have_content "1 support" expect(page).to have_content "You have already supported this. Share it!" expect(current_path).to eq(management_budgets_investment_path(budget_investment))