change CRUD for budget groups and headings

To make it more consistent with the rest of the Admin panel,
the CRUD for budget groups and headings has been changed
from the old "all-in-one" form to a separate form for each resource.
This commit is contained in:
Julian Herrero
2018-12-13 10:34:01 +01:00
parent 8fb8f70efd
commit 6439be44f1
23 changed files with 757 additions and 250 deletions

View File

@@ -161,6 +161,34 @@ feature 'Ballots' do
end
end
scenario "the Map shoud be visible before and after", :js do
investment = create(:budget_investment, :selected, heading: new_york, price: 10000)
visit budget_path(budget)
click_link "States"
click_link "New York"
within("#sidebar") do
expect(page).to have_content "OpenStreetMap"
end
add_to_ballot(investment)
within("#sidebar") do
expect(page).to have_content investment.title
expect(page).to have_content "OpenStreetMap"
end
within("#budget_investment_#{investment.id}") do
click_link "Remove vote"
end
within("#sidebar") do
expect(page).not_to have_content investment.title
expect(page).to have_content "OpenStreetMap"
end
end
end
#Break up or simplify with helpers