From 48593a19ea453fafc8e0de01cf344e35572e35b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 2 Apr 2025 14:57:19 +0200 Subject: [PATCH] Remove redundant test to vote an investment This is already tested in the "Add an investment" test. --- spec/system/budgets/ballots_spec.rb | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/spec/system/budgets/ballots_spec.rb b/spec/system/budgets/ballots_spec.rb index 2be0cdd0f..3eed8412a 100644 --- a/spec/system/budgets/ballots_spec.rb +++ b/spec/system/budgets/ballots_spec.rb @@ -103,15 +103,17 @@ describe "Ballots" do end context "Adding and Removing Investments" do - scenario "Add a investment" do + scenario "Add an investment" do create(:budget_investment, :selected, heading: new_york, price: 10000, title: "Bring back King Kong") create(:budget_investment, :selected, heading: new_york, price: 20000, title: "Paint cabs black") visit budget_investments_path(budget, heading_id: new_york) add_to_ballot("Bring back King Kong") - expect(page).to have_css("#total_amount", text: "€10,000") - expect(page).to have_css("#amount_available", text: "€990,000") + within("#progress_bar") do + expect(page).to have_css("#total_amount", text: "€10,000") + expect(page).to have_css("#amount_available", text: "€990,000") + end within("#sidebar") do expect(page).to have_content "Bring back King Kong" @@ -268,18 +270,6 @@ describe "Ballots" do expect(page).to have_content("You have active votes in another heading: District 1") end end - - scenario "Display progress bar after first vote" do - create(:budget_investment, :selected, heading: new_york, price: 10000, title: "Park expansion") - - visit budget_investments_path(budget, heading_id: new_york.id) - - add_to_ballot("Park expansion") - - within("#progress_bar") do - expect(page).to have_css("#total_amount", text: "€10,000") - end - end end context "Groups" do