From bdf4d6a79c781051e5f0025aa5cc0f523b704236 Mon Sep 17 00:00:00 2001 From: taitus Date: Tue, 12 Apr 2022 11:26:11 +0200 Subject: [PATCH] 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. --- app/views/admin/budget_phases/edit.html.erb | 8 +++++++- spec/system/admin/budget_phases_spec.rb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/views/admin/budget_phases/edit.html.erb b/app/views/admin/budget_phases/edit.html.erb index 27fbdd585..39df36274 100644 --- a/app/views/admin/budget_phases/edit.html.erb +++ b/app/views/admin/budget_phases/edit.html.erb @@ -1 +1,7 @@ -<%= render Admin::BudgetsWizard::Phases::EditComponent.new(@phase) %> +<%= back_link_to admin_budget_path(@budget) %> + +

<%= @budget.name %>

+ +

<%= "#{t("admin.budget_phases.edit.title")} - #{@phase.name}" %>

+ +<%= render "form" %> diff --git a/spec/system/admin/budget_phases_spec.rb b/spec/system/admin/budget_phases_spec.rb index 0ea1dd612..03de1cbdd 100644 --- a/spec/system/admin/budget_phases_spec.rb +++ b/spec/system/admin/budget_phases_spec.rb @@ -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"