Adapt phases step to single and multiple budget mode

Co-Authored-By: decabeza <alberto@decabeza.es>
This commit is contained in:
Julian Herrero
2020-03-15 06:51:52 +01:00
committed by Javi Martín
parent e3510fc29d
commit 4c6de86a72
6 changed files with 81 additions and 1 deletions

View File

@@ -82,5 +82,18 @@ describe "Budgets wizard, phases step", :admin do
expect(page).to have_css ".creation-timeline"
within_table("Phases") { expect(page).to have_content "Welcoming projects" }
end
scenario "update phase in single heading budget" do
visit admin_budgets_wizard_budget_budget_phases_path(budget, mode: "single")
within("tr", text: "Selecting projects") { click_link "Edit phase" }
fill_in "Name", with: "Choosing projects"
click_button "Save changes"
expect(page).to have_content "Changes saved"
expect(page).to have_css ".creation-timeline"
within_table("Phases") { expect(page).to have_content "Choosing projects" }
expect(page).to have_link "Go back to edit heading"
end
end
end