Merge branch 'master' into polls

This commit is contained in:
Alberto
2017-04-06 14:16:49 +02:00
committed by GitHub
118 changed files with 1294 additions and 748 deletions

View File

@@ -252,6 +252,21 @@ feature 'Admin budget investments' do
expect(page).to have_content("More schools")
end
scenario "Filtering by tag, display only valuation tags" do
investment1 = create(:budget_investment, budget: @budget, tag_list: 'Education')
investment2 = create(:budget_investment, budget: @budget, tag_list: 'Health')
investment1.set_tag_list_on(:valuation, 'Teachers')
investment2.set_tag_list_on(:valuation, 'Hospitals')
investment1.save
investment2.save
visit admin_budget_budget_investments_path(budget_id: @budget.id)
expect(page).to have_select("tag_name", options: ["All tags", "Hospitals", "Teachers"])
end
end
scenario 'Show' do

View File

@@ -84,7 +84,7 @@ feature 'Admin budgets' do
fill_in 'budget_name', with: 'M30 - Summer campaign'
fill_in 'budget_description_accepting', with: 'Budgeting for summer 2017 maintenance and improvements of the road M-30'
select 'Accepting proposals', from: 'budget[phase]'
select 'Accepting projects', from: 'budget[phase]'
click_button 'Create Participatory budget'

View File

@@ -19,20 +19,42 @@ feature 'Signature sheets' do
end
end
scenario 'Create' do
proposal = create(:proposal)
visit new_admin_signature_sheet_path
context 'Create' do
scenario 'Proposal' do
proposal = create(:proposal)
visit new_admin_signature_sheet_path
select "Citizen proposal", from: "signature_sheet_signable_type"
fill_in "signature_sheet_signable_id", with: proposal.id
fill_in "signature_sheet_document_numbers", with: "12345678Z, 99999999Z"
click_button "Create signature sheet"
select "Citizen proposal", from: "signature_sheet_signable_type"
fill_in "signature_sheet_signable_id", with: proposal.id
fill_in "signature_sheet_document_numbers", with: "12345678Z, 99999999Z"
click_button "Create signature sheet"
expect(page).to have_content "Signature sheet created successfully"
expect(page).to have_content "Signature sheet created successfully"
visit proposal_path(proposal)
visit proposal_path(proposal)
expect(page).to have_content "1 support"
end
scenario 'Budget Investment' do
investment = create(:budget_investment)
budget = investment.budget
budget.update(phase: 'selecting')
visit new_admin_signature_sheet_path
select "Investment", from: "signature_sheet_signable_type"
fill_in "signature_sheet_signable_id", with: investment.id
fill_in "signature_sheet_document_numbers", with: "12345678Z, 99999999Z"
click_button "Create signature sheet"
expect(page).to have_content "Signature sheet created successfully"
visit budget_investment_path(budget, investment)
expect(page).to have_content "1 support"
end
expect(page).to have_content "1 support"
end
scenario 'Errors on create' do