Merge pull request #5927 from cyrillefr/ReplaceLinkWithButtonInInvestmentComponent
Replace link with button in ballot investment component
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
.remove-budget-investment {
|
||||
@include has-fa-icon(times, solid);
|
||||
cursor: pointer;
|
||||
font-size: $close-icon-size;
|
||||
position: absolute;
|
||||
right: $close-icon-margin;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<%= investment_price %>
|
||||
|
||||
<% if budget.balloting? %>
|
||||
<%= link_to delete_path,
|
||||
<%= button_to delete_path,
|
||||
title: t("budgets.ballots.show.remove"),
|
||||
class: "remove-budget-investment",
|
||||
method: :delete,
|
||||
|
||||
@@ -379,7 +379,7 @@ describe "Ballots" do
|
||||
expect(page).to have_content("You have voted one investment")
|
||||
|
||||
within("#budget_investment_#{investment.id}") do
|
||||
click_link "Remove vote"
|
||||
click_button "Remove vote"
|
||||
end
|
||||
|
||||
expect(page).to have_current_path(budget_ballot_path(budget))
|
||||
@@ -406,7 +406,7 @@ describe "Ballots" do
|
||||
end
|
||||
|
||||
within("#sidebar #budget_investment_#{investment1.id}_sidebar") do
|
||||
click_link "Remove vote"
|
||||
click_button "Remove vote"
|
||||
end
|
||||
|
||||
expect(page).to have_css("#total_amount", text: "€20,000")
|
||||
@@ -436,7 +436,7 @@ describe "Ballots" do
|
||||
expect(page).to have_content("You have voted one investment")
|
||||
|
||||
within(".ballot-list li", text: "Sully monument") do
|
||||
click_link "Remove vote"
|
||||
click_button "Remove vote"
|
||||
end
|
||||
|
||||
expect(page).to have_content("You have voted 0 investments")
|
||||
@@ -623,7 +623,7 @@ describe "Ballots" do
|
||||
end
|
||||
|
||||
within("#budget_investment_#{bi1.id}_sidebar") do
|
||||
click_link "Remove vote"
|
||||
click_button "Remove vote"
|
||||
end
|
||||
|
||||
expect(page).not_to have_css "#budget_investment_#{bi1.id}_sidebar"
|
||||
|
||||
Reference in New Issue
Block a user