Do not use the wizard component when edit phases

Currently we were using the wizard component to edit a
phase when we were no longer in the wizard.

This was a bit strange, as it took us out of the context
and showed us information such as the
CreationTimelineComponent or the HelpComponent
that is meant for when navigating the Wizard.
This commit is contained in:
taitus
2022-04-12 11:26:11 +02:00
parent 2464b517c1
commit bdf4d6a79c
2 changed files with 8 additions and 2 deletions

View File

@@ -1 +1,7 @@
<%= render Admin::BudgetsWizard::Phases::EditComponent.new(@phase) %>
<%= back_link_to admin_budget_path(@budget) %>
<h2><%= @budget.name %></h2>
<h3><%= "#{t("admin.budget_phases.edit.title")} - #{@phase.name}" %></h3>
<%= render "form" %>

View File

@@ -37,7 +37,7 @@ describe "Admin budget phases" do
within("tr", text: "Accepting projects") { click_link "Edit" }
end
expect(page).to have_css "h2", exact_text: "Edit phase - Accepting projects"
expect(page).to have_css "h3", exact_text: "Edit phase - Accepting projects"
fill_in "Name", with: "My phase custom name"
click_button "Save changes"