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