OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Split Child vs Relation and Create vs Edit
Aaron Contrerasbdad2afe8c68
diff --git a/app/components/work_package_relations_tab/edit_work_package_relation_dialog_component.html.erb b/app/components/work_package_relations_tab/add_work_package_child_dialog_component.html.erbsimilarity index 68%rename from app/components/work_package_relations_tab/edit_work_package_relation_dialog_component.html.erbrename to app/components/work_package_relations_tab/add_work_package_child_dialog_component.html.erbindex ff850592a2d..6d087862780 100644--- a/app/components/work_package_relations_tab/edit_work_package_relation_dialog_component.html.erb+++ b/app/components/work_package_relations_tab/add_work_package_child_dialog_component.html.erb@@ -4,13 +4,8 @@id: DIALOG_ID)) do |d|d.with_header(variant: :large)d.with_body do- # render(WorkPackageMeetingsTab::AddWorkPackageToMeetingFormComponent.new(- # work_package: @work_package,- # meeting_agenda_item: @meeting_agenda_item- # ))- render(WorkPackageRelationsTab::EditWorkPackageRelationFormComponent.new(- work_package: @work_package,- relation: @relation+ render(WorkPackageRelationsTab::AddWorkPackageChildFormComponent.new(+ work_package: @work_package))endd.with_footer dodiff --git a/app/components/work_package_relations_tab/add_work_package_child_dialog_component.rb b/app/components/work_package_relations_tab/add_work_package_child_dialog_component.rbnew file mode 100644index 00000000000..8f3ae85e92d--- /dev/null+++ b/app/components/work_package_relations_tab/add_work_package_child_dialog_component.rb@@ -0,0 +1,54 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class WorkPackageRelationsTab::AddWorkPackageChildDialogComponent < ApplicationComponent+ include ApplicationHelper+ include OpTurbo::Streamable+ include OpPrimer::ComponentHelpers++ I18N_NAMESPACE = "work_package_relations_tab"+ DIALOG_ID = "add-work-package-child-dialog"+ FORM_ID = "add-work-package-child-form"++ attr_reader :work_package++ def initialize(work_package:)+ super()++ @work_package = work_package+ end++ private++ def dialog_title+ child_label = t("#{I18N_NAMESPACE}.relations.label_child_singular")+ t("#{I18N_NAMESPACE}.label_add_x", x: child_label)+ end+enddiff --git a/app/components/work_package_relations_tab/add_work_package_child_form_component.html.erb b/app/components/work_package_relations_tab/add_work_package_child_form_component.html.erbnew file mode 100644index 00000000000..b0f47d609a1--- /dev/null+++ b/app/components/work_package_relations_tab/add_work_package_child_form_component.html.erb@@ -0,0 +1,38 @@+<%= component_wrapper do %>+ <%= primer_form_with(+ id: FORM_ID,+ model: WorkPackage.new,+ **submit_url_options,+ data: { turbo: true }+ ) do |f| %>+ <%# Form fields section %>+ <%= flex_layout(my: 3) do |flex|+ flex.with_row do+ if @base_errors&.any?+ render(Primer::Alpha::Banner.new(mb: 3, icon: :stop, scheme: :danger)) { @base_errors.join("\n") }+ end+ end+ flex.with_row do+ i18n_namespace = I18N_NAMESPACE+ dialog_id = DIALOG_ID+ id_field_test_selector = ID_FIELD_TEST_SELECTOR+ render_inline_form(f) do |my_form|+ my_form.work_package_autocompleter(+ name: :id,+ label: WorkPackage.model_name.human,+ visually_hide_label: false,+ autocomplete_options: {+ resource: 'work_packages',+ searchKey: 'subjectOrId',+ openDirectly: false,+ focusDirectly: false,+ dropdownPosition: 'bottom',+ appendTo: "##{dialog_id}",+ data: { test_selector: id_field_test_selector }+ }+ )+ end+ end+ end %>+ <% end %>+<% end %>diff --git a/app/components/work_package_relations_tab/add_work_package_child_form_component.rb b/app/components/work_package_relations_tab/add_work_package_child_form_component.rbnew file mode 100644index 00000000000..f9f4d6863b1--- /dev/null+++ b/app/components/work_package_relations_tab/add_work_package_child_form_component.rb@@ -0,0 +1,52 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See COPYRIGHT and LICENSE files for more details.+#++++class WorkPackageRelationsTab::AddWorkPackageChildFormComponent < ApplicationComponent+ include ApplicationHelper+ include OpTurbo::Streamable+ include OpPrimer::ComponentHelpers++ DIALOG_ID = "add-work-package-child-dialog"+ FORM_ID = "add-work-package-child-form"+ ID_FIELD_TEST_SELECTOR = "work-package-child-form-id"+ I18N_NAMESPACE = "work_package_relations_tab"++ def initialize(work_package:, base_errors: nil)+ super()++ @work_package = work_package+ @base_errors = base_errors+ end++ def submit_url_options+ { method: :post,+ url: work_package_children_path(@work_package) }+ end+enddiff --git a/app/components/work_package_relations_tab/index_component.html.erb b/app/components/work_package_relations_tab/index_component.html.erbindex 338ed8a43dd..b9590e55c42 100644--- a/app/components/work_package_relations_tab/index_component.html.erb+++ b/app/components/work_package_relations_tab/index_component.html.erb@@ -27,6 +27,17 @@item.with_description.with_content(t("#{I18N_NAMESPACE}.relations.#{relation_type}_description"))endend++ menu.with_item(+ label: t("#{I18N_NAMESPACE}.relations.label_child_singular").capitalize,+ href: new_work_package_child_path(@work_package),+ test_selector: new_button_test_selector(relation_type: :child),+ content_arguments: {+ data: { turbo_stream: true }+ }+ ) do |item|+ item.with_description.with_content(t("#{I18N_NAMESPACE}.relations.child_description"))+ endendendenddiff --git a/app/components/work_package_relations_tab/relation_component.rb b/app/components/work_package_relations_tab/relation_component.rbindex 8890b6e78b3..6d80d2a4b5c 100644--- a/app/components/work_package_relations_tab/relation_component.rb+++ b/app/components/work_package_relations_tab/relation_component.rb@@ -44,7 +44,7 @@ class WorkPackageRelationsTab::RelationComponent < ApplicationComponentdef destroy_pathif parent_child_relationship?- work_package_child_path(@child)+ work_package_child_path(@work_package, @child)elsework_package_relation_path(@work_package, @relation)enddiff --git a/app/components/work_package_relations_tab/work_package_relation_dialog_component.html.erb b/app/components/work_package_relations_tab/work_package_relation_dialog_component.html.erbnew file mode 100644index 00000000000..373f197de3f--- /dev/null+++ b/app/components/work_package_relations_tab/work_package_relation_dialog_component.html.erb@@ -0,0 +1,29 @@+<%=+ render(Primer::Alpha::Dialog.new(title: dialog_title,+ size: :xlarge,+ id: DIALOG_ID)) do |d|+ d.with_header(variant: :large)+ d.with_body do+ render(WorkPackageRelationsTab::WorkPackageRelationFormComponent.new(+ work_package: @work_package,+ relation: @relation+ ))+ end+ d.with_footer do+ component_collection do |buttons|+ buttons.with_component(Primer::ButtonComponent.new(+ data: { 'close-dialog-id': DIALOG_ID }+ )) do+ t(:button_cancel)+ end+ buttons.with_component(Primer::ButtonComponent.new(+ scheme: :primary,+ form: FORM_ID,+ data: { turbo: true },+ type: :submit)) do+ t(:button_save)+ end+ end+ end+ end+%>diff --git a/app/components/work_package_relations_tab/edit_work_package_relation_dialog_component.rb b/app/components/work_package_relations_tab/work_package_relation_dialog_component.rbsimilarity index 84%rename from app/components/work_package_relations_tab/edit_work_package_relation_dialog_component.rbrename to app/components/work_package_relations_tab/work_package_relation_dialog_component.rbindex 793883f936d..c56edcd2ba9 100644--- a/app/components/work_package_relations_tab/edit_work_package_relation_dialog_component.rb+++ b/app/components/work_package_relations_tab/work_package_relation_dialog_component.rb@@ -28,14 +28,14 @@# See COPYRIGHT and LICENSE files for more details.#++-class WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent < ApplicationComponent+class WorkPackageRelationsTab::WorkPackageRelationDialogComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpersI18N_NAMESPACE = "work_package_relations_tab"- DIALOG_ID = "edit-work-package-relation-dialog"- FORM_ID = "edit-work-package-relation-form"+ DIALOG_ID = "work-package-relation-dialog"+ FORM_ID = "work-package-relation-form"attr_reader :relation, :work_package@@ -49,7 +49,9 @@ class WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent < Applicatprivatedef dialog_title- relation_label = t("#{I18N_NAMESPACE}.relations.#{relation.label_for(work_package)}_singular")+ relative_label = relation.label_for(work_package)+ relation_label = t("#{I18N_NAMESPACE}.relations.#{relative_label}_singular")+if relation.persisted?t("#{I18N_NAMESPACE}.label_edit_x", x: relation_label)elsediff --git a/app/components/work_package_relations_tab/edit_work_package_relation_form_component.html.erb b/app/components/work_package_relations_tab/work_package_relation_form_component.html.erbsimilarity index 84%rename from app/components/work_package_relations_tab/edit_work_package_relation_form_component.html.erbrename to app/components/work_package_relations_tab/work_package_relation_form_component.html.erbindex df414b26bfa..1ff439ae8c7 100644--- a/app/components/work_package_relations_tab/edit_work_package_relation_form_component.html.erb+++ b/app/components/work_package_relations_tab/work_package_relation_form_component.html.erb@@ -15,12 +15,13 @@endendflex.with_row do+ # These are not available inside the render_inline_form block+ # so we need to re-define them here. Figure out solution for this.relation = @relationtarget_work_package = related_work_packagestimulus_controller = STIMULUS_CONTROLLERi18n_namespace = I18N_NAMESPACEdialog_id = DIALOG_ID- not_parent_child_relation = not_parent_child_relation?to_id_field_test_selector = TO_ID_FIELD_TEST_SELECTORto_id_field_value = relation.to.present? ? "#{target_work_package.type.name.upcase} ##{target_work_package.id} - #{target_work_package.subject}" : nilrender_inline_form(f) do |my_form|@@ -54,21 +55,19 @@)end- if not_parent_child_relation- my_form.text_field(- name: :description,- label: Relation.human_attribute_name(:description),- hidden: relation.description.blank?,- data: { "#{stimulus_controller}-target": "descriptionField" }- )- end+ my_form.text_field(+ name: :description,+ label: Relation.human_attribute_name(:description),+ hidden: relation.description.blank?,+ data: { "#{stimulus_controller}-target": "descriptionField" }+ )endendend %><%# Actions section %><%= flex_layout(my: 3) do |flex|flex.with_row do- if not_parent_child_relation? && @relation.description.blank?+ if @relation.description.blank?render(Primer::Beta::Button.new(scheme: :secondary,title: I18n.t("#{I18N_NAMESPACE}.label_add_description"),diff --git a/app/components/work_package_relations_tab/edit_work_package_relation_form_component.rb b/app/components/work_package_relations_tab/work_package_relation_form_component.rbsimilarity index 79%rename from app/components/work_package_relations_tab/edit_work_package_relation_form_component.rbrename to app/components/work_package_relations_tab/work_package_relation_form_component.rbindex f1a28e88d30..2233e0b0f7a 100644--- a/app/components/work_package_relations_tab/edit_work_package_relation_form_component.rb+++ b/app/components/work_package_relations_tab/work_package_relation_form_component.rb@@ -28,13 +28,13 @@# See COPYRIGHT and LICENSE files for more details.#++-class WorkPackageRelationsTab::EditWorkPackageRelationFormComponent < ApplicationComponent+class WorkPackageRelationsTab::WorkPackageRelationFormComponent < ApplicationComponentinclude ApplicationHelperinclude OpTurbo::Streamableinclude OpPrimer::ComponentHelpers- DIALOG_ID = "edit-work-package-relation-dialog"- FORM_ID = "edit-work-package-relation-form"+ DIALOG_ID = "work-package-relation-dialog"+ FORM_ID = "work-package-relation-form"TO_ID_FIELD_TEST_SELECTOR = "work-package-relation-form-to-id"STIMULUS_CONTROLLER = "work-packages--relations-tab--relation-form"I18N_NAMESPACE = "work_package_relations_tab"@@ -47,17 +47,8 @@ class WorkPackageRelationsTab::EditWorkPackageRelationFormComponent < Applicatio@base_errors = base_errorsend- def not_parent_child_relation?- @relation.is_a?(Relation)- end-def related_work_package- @related_work_package ||= case @relation- when Relation- @relation.to- when WorkPackage- @relation- end+ @related_work_package ||= @relation.toenddef submit_url_optionsdiff --git a/app/controllers/work_package_children_controller.rb b/app/controllers/work_package_children_controller.rbindex f5e80be75a1..27c17135d7c 100644--- a/app/controllers/work_package_children_controller.rb+++ b/app/controllers/work_package_children_controller.rb@@ -30,18 +30,46 @@class WorkPackageChildrenController < ApplicationControllerinclude OpTurbo::ComponentStream+ include OpTurbo::DialogStreamHelper- before_action :set_childbefore_action :set_work_packagebefore_action :authorize # Short-circuit early if not authorized- before_action :set_relations+ before_action :set_child, except: %i[new create]+ before_action :set_relations, except: %i[new create]++ def new+ component = WorkPackageRelationsTab::AddWorkPackageChildDialogComponent+ .new(work_package: @work_package)+ respond_with_dialog(component)+ end++ def create+ target_work_package_id = params[:work_package][:id]+ target_child_work_package = WorkPackage.find(target_work_package_id)++ target_child_work_package.parent = @work_package++ if target_child_work_package.save+ @children = @work_package.children.visible+ @relations = @work_package.relations.visible++ component = WorkPackageRelationsTab::IndexComponent.new(+ work_package: @work_package,+ relations: @relations,+ children: @children+ )+ replace_via_turbo_stream(component:)+ respond_with_turbo_streams+ end+ enddef destroy@child.parent = nilif @child.save+ @work_package.reload@children = @work_package.children.visiblecomponent = WorkPackageRelationsTab::IndexComponent.new(work_package: @work_package,@@ -56,12 +84,13 @@ class WorkPackageChildrenController < ApplicationControllerprivate- def set_child- @child = WorkPackage.find(params[:id])+ def set_work_package+ @work_package = WorkPackage.find(params[:work_package_id])+ @project = @work_package.projectend- def set_work_package- @work_package = @child.parent+ def set_child+ @child = WorkPackage.find(params[:id])enddef set_relationsdiff --git a/app/controllers/work_package_relations_controller.rb b/app/controllers/work_package_relations_controller.rbindex 5d5c6b60fc4..98f3c8f71c2 100644--- a/app/controllers/work_package_relations_controller.rb+++ b/app/controllers/work_package_relations_controller.rb@@ -43,14 +43,14 @@ class WorkPackageRelationsController < ApplicationController)respond_with_dialog(- WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent+ WorkPackageRelationsTab::WorkPackageRelationDialogComponent.new(work_package: @work_package, relation: @relation))enddef editrespond_with_dialog(- WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent+ WorkPackageRelationsTab::WorkPackageRelationDialogComponent.new(work_package: @work_package, relation: @relation))enddiff --git a/config/initializers/permissions.rb b/config/initializers/permissions.rbindex 672643b8c9e..87f571f46a9 100644--- a/config/initializers/permissions.rb+++ b/config/initializers/permissions.rb@@ -326,7 +326,7 @@ Rails.application.reloader.to_prepare dowpt.permission :manage_subtasks,{- work_package_children: %i[destroy]+ work_package_children: %i[new create destroy]},permissible_on: :project,dependencies: :view_work_packagesdiff --git a/config/routes.rb b/config/routes.rbindex 8df31ef1219..548dc0f13b8 100644--- a/config/routes.rb+++ b/config/routes.rb@@ -595,6 +595,8 @@ Rails.application.routes.draw doendend+ resources :children, only: %i[new create destroy], controller: "work_package_children"+resource :progress, only: %i[new edit update], controller: "work_packages/progress"collection doresource :progress,@@ -621,8 +623,6 @@ Rails.application.routes.draw doget "/edit" => "work_packages#show", on: :member, as: "edit"end- resources :work_package_children, only: %i[destroy]-resources :versions, only: %i[show edit update destroy] domember doget :status_bydiff --git a/spec/controllers/work_package_children_controller_spec.rb b/spec/controllers/work_package_children_controller_spec.rbindex d9d4db28084..57d87f2995d 100644--- a/spec/controllers/work_package_children_controller_spec.rb+++ b/spec/controllers/work_package_children_controller_spec.rb@@ -35,13 +35,27 @@ RSpec.describe WorkPackageChildrenController doshared_let(:project) { create(:project) }shared_let(:work_package) { create(:work_package, project:) }shared_let(:child_work_package) { create(:work_package, parent: work_package, project:) }- shared_let(:children) do- create_list(:work_package, 2, parent: work_package, project:)- endcurrent_user { user }- describe "DELETE /work_package_children/:id" do+ describe "GET /work_packages/:work_package_id/children/new" do+ before do+ allow(WorkPackageRelationsTab::AddWorkPackageChildDialogComponent)+ .to receive(:new)+ .with(work_package:)+ .and_call_original+ end++ it "renders the new template" do+ get("new", params: { work_package_id: work_package.id }, as: :turbo_stream)+ expect(response).to be_successful+ expect(WorkPackageRelationsTab::AddWorkPackageChildDialogComponent)+ .to have_received(:new)+ .with(work_package:)+ end+ end++ describe "DELETE /work_packages/:work_package_id/children/:id" dobefore doallow(WorkPackageRelationsTab::IndexComponent).to receive(:new).and_call_originalallow(controller).to receive(:replace_via_turbo_stream).and_call_original@@ -56,7 +70,7 @@ RSpec.describe WorkPackageChildrenController doexpect(response).to be_successfulexpect(WorkPackageRelationsTab::IndexComponent).to have_received(:new)- .with(work_package:, relations: [], children:)+ .with(work_package:, relations: [], children: [])expect(controller).to have_received(:replace_via_turbo_stream).with(component: an_instance_of(WorkPackageRelationsTab::IndexComponent))expect(child_work_package.reload.parent).to be_nildiff --git a/spec/controllers/work_package_relations_controller_spec.rb b/spec/controllers/work_package_relations_controller_spec.rbindex 423d0a4d98d..f6f8b36b2d8 100644--- a/spec/controllers/work_package_relations_controller_spec.rb+++ b/spec/controllers/work_package_relations_controller_spec.rb@@ -57,7 +57,7 @@ RSpec.describe WorkPackageRelationsController doendbefore do- allow(WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent)+ allow(WorkPackageRelationsTab::WorkPackageRelationDialogComponent).to receive(:new).and_call_originalallow(controller).to receive(:respond_with_dialog).and_call_original@@ -69,7 +69,7 @@ RSpec.describe WorkPackageRelationsController dorelation_type: Relation::TYPE_RELATES },as: :turbo_stream)- expect(WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent)+ expect(WorkPackageRelationsTab::WorkPackageRelationDialogComponent).to have_received(:new)expect(controller).to have_received(:respond_with_dialog)end@@ -77,7 +77,7 @@ RSpec.describe WorkPackageRelationsController dodescribe "GET /work_packages/:work_package_id/relations/:id/edit" dobefore do- allow(WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent)+ allow(WorkPackageRelationsTab::WorkPackageRelationDialogComponent).to receive(:new).and_call_originalallow(controller).to receive(:respond_with_dialog).and_call_original@@ -88,12 +88,12 @@ RSpec.describe WorkPackageRelationsController doparams: { work_package_id: work_package.id, id: relation.id },as: :turbo_stream)- expect(WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent)+ expect(WorkPackageRelationsTab::WorkPackageRelationDialogComponent).to have_received(:new).with(work_package:, relation:)expect(controller).to have_received(:respond_with_dialog)- .with(an_instance_of(WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent))+ .with(an_instance_of(WorkPackageRelationsTab::WorkPackageRelationDialogComponent))expect(response).to be_successfulenddiff --git a/spec/features/work_packages/details/relations/primerized_relations_spec.rb b/spec/features/work_packages/details/relations/primerized_relations_spec.rbindex 4d6eaf3de47..1c6a93ca95f 100644--- a/spec/features/work_packages/details/relations/primerized_relations_spec.rb+++ b/spec/features/work_packages/details/relations/primerized_relations_spec.rb@@ -186,7 +186,7 @@ RSpec.describe "Primerized work package relations tab",page.find("[data-test-selector='op-relation-row-#{relation1.id}-edit-button']").clickend- within "##{WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent::DIALOG_ID}" do+ within "##{WorkPackageRelationsTab::WorkPackageRelationDialogComponent::DIALOG_ID}" dowait_for_network_idleexpect(page).to have_text("Edit successor (after)")expect(page).to have_field("Work package", readonly: true)@@ -214,7 +214,7 @@ RSpec.describe "Primerized work package relations tab",page.find("[data-test-selector='op-relation-row-#{relation1.id}-edit-button']").clickend- within "##{WorkPackageRelationsTab::EditWorkPackageRelationDialogComponent::DIALOG_ID}" do+ within "##{WorkPackageRelationsTab::WorkPackageRelationDialogComponent::DIALOG_ID}" dowait_for_network_idleexpect(page).to have_text("Edit successor (after)")expect(page).to have_field("Work package", readonly: true)@@ -257,7 +257,7 @@ RSpec.describe "Primerized work package relations tab",wait_for_reload- within "##{WorkPackageRelationsTab::EditWorkPackageRelationFormComponent::DIALOG_ID}" do+ within "##{WorkPackageRelationsTab::WorkPackageRelationFormComponent::DIALOG_ID}" doexpect(page).to have_text("Add successor (after)")expect(page).to have_button("Add description")