Allow creating a budget in single or multiple mode
Co-Authored-By: decabeza <alberto@decabeza.es>
This commit is contained in:
committed by
Javi Martín
parent
b1b2cfa8b1
commit
0b81f7f621
@@ -4,7 +4,8 @@ describe "Budgets wizard, first step", :admin do
|
||||
describe "New" do
|
||||
scenario "Create budget - Knapsack voting (default)" do
|
||||
visit admin_budgets_path
|
||||
click_link "Create new budget"
|
||||
click_button "Create new budget"
|
||||
click_link "Create multiple headings budget"
|
||||
|
||||
fill_in "Name", with: "M30 - Summer campaign"
|
||||
click_button "Continue to groups"
|
||||
@@ -21,7 +22,8 @@ describe "Budgets wizard, first step", :admin do
|
||||
admin = Administrator.first
|
||||
|
||||
visit admin_budgets_path
|
||||
click_link "Create new budget"
|
||||
click_button "Create new budget"
|
||||
click_link "Create multiple headings budget"
|
||||
|
||||
fill_in "Name", with: "M30 - Summer campaign"
|
||||
select "Approval", from: "Final voting style"
|
||||
@@ -73,7 +75,8 @@ describe "Budgets wizard, first step", :admin do
|
||||
describe "Create" do
|
||||
scenario "A new budget is always created in draft mode" do
|
||||
visit admin_budgets_path
|
||||
click_link "Create new budget"
|
||||
click_button "Create new budget"
|
||||
click_link "Create multiple headings budget"
|
||||
|
||||
fill_in "Name", with: "M30 - Summer campaign"
|
||||
|
||||
|
||||
26
spec/system/admin/budgets_wizard/wizard_spec.rb
Normal file
26
spec/system/admin/budgets_wizard/wizard_spec.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
require "rails_helper"
|
||||
|
||||
describe "Budgets creation wizard", :admin do
|
||||
scenario "Creation of a single-heading budget by steps" do
|
||||
visit admin_budgets_path
|
||||
click_button "Create new budget"
|
||||
click_link "Create single heading budget"
|
||||
|
||||
fill_in "Name", with: "Single heading budget"
|
||||
click_button "Continue to groups"
|
||||
|
||||
expect(page).to have_content "New participatory budget created successfully!"
|
||||
end
|
||||
|
||||
scenario "Creation of a multiple-headings budget by steps" do
|
||||
visit admin_budgets_path
|
||||
click_button "Create new budget"
|
||||
click_link "Create multiple headings budget"
|
||||
|
||||
fill_in "Name", with: "Multiple headings budget"
|
||||
click_button "Continue to groups"
|
||||
|
||||
expect(page).to have_content "New participatory budget created successfully!"
|
||||
expect(page).to have_content "There are no groups."
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user