From bc7b4185249c1d822f056a16a99b9fb2854195c3 Mon Sep 17 00:00:00 2001 From: Behrokh Satarnejad Date: Fri, 29 May 2026 11:00:31 +0200 Subject: [PATCH 1/3] Change translation strings for groups --- config/locales/en.yml | 6 +++--- spec/features/types/form_configuration_spec.rb | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 699cc7590dd8..3661a9358bf0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1443,8 +1443,8 @@ en: tab: "Form configuration" label_group: "Group" reset_to_defaults: "Reset to defaults" - add_attribute_group: "Add attribute group" - add_query_group: "Add table of related work packages" + add_attribute_group: "Attribute group" + add_query_group: "Table of related work packages" delete_group: "Delete group" remove_attribute: "Remove from group" drag_to_activate: "Drag fields from here to activate them" @@ -1457,7 +1457,7 @@ en: blankslate_title: "No groups yet" blankslate_description: "Add groups using the button above or drag attributes from the left panel." group_actions: "Group actions" - rename_group: "Rename group" + rename_group: "Rename" confirm_delete_group: "Are you sure you want to delete this group? This action cannot be automatically reversed." group_name_label: "Group name" row_actions: "Row actions" diff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rb index 4d931dabc4b2..88e2a3418e9e 100644 --- a/spec/features/types/form_configuration_spec.rb +++ b/spec/features/types/form_configuration_spec.rb @@ -272,6 +272,10 @@ def persisted_attribute_order(type, group_key) initial_order = form.group_order form.add_button_dropdown.click + + expect(page).to have_text(I18n.t("types.edit.form_configuration.add_attribute_group")) + expect(page).to have_text(I18n.t("types.edit.form_configuration.add_query_group")) + click_on I18n.t("types.edit.form_configuration.add_attribute_group") expect(page.find_test_selector("type-form-configuration-group-name-input", wait: 10).value).to eq("") From 096fc4a7f903dba87e946003c9f1fd5fc944b3b5 Mon Sep 17 00:00:00 2001 From: Behrokh Satarnejad Date: Fri, 29 May 2026 12:25:00 +0200 Subject: [PATCH 2/3] Updates the work package type form configuration labels to use the Figma terminology --- config/locales/en.yml | 22 +++++++++---------- .../types/form_configuration_query_spec.rb | 2 +- .../features/types/form_configuration_spec.rb | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 3661a9358bf0..c572f1d6d428 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1441,12 +1441,12 @@ en: edit: form_configuration: tab: "Form configuration" - label_group: "Group" - reset_to_defaults: "Reset to defaults" - add_attribute_group: "Attribute group" - add_query_group: "Table of related work packages" - delete_group: "Delete group" - remove_attribute: "Remove from group" + label_group: "Section" + reset_to_defaults: "Reset form" + add_attribute_group: "Section" + add_query_group: "Related work packages table" + delete_group: "Delete section" + remove_attribute: "Remove from section" drag_to_activate: "Drag fields from here to activate them" drag_to_reorder: "Drag to reorder" edit_query: "Edit query" @@ -1456,12 +1456,12 @@ en: no_inactive_attributes: "No inactive attributes" blankslate_title: "No groups yet" blankslate_description: "Add groups using the button above or drag attributes from the left panel." - group_actions: "Group actions" - rename_group: "Rename" - confirm_delete_group: "Are you sure you want to delete this group? This action cannot be automatically reversed." - group_name_label: "Group name" + group_actions: "Section actions" + rename_group: "Rename section" + confirm_delete_group: "Are you sure you want to delete this section? This action cannot be automatically reversed." + group_name_label: "Section name" row_actions: "Row actions" - query_group_label: "Work packages table" + query_group_label: "Related work packages table" empty_group_hint: "Drag attributes here" invalid_attribute_groups: "The form configuration payload is invalid." invalid_query: "The embedded query configuration is invalid." diff --git a/spec/features/types/form_configuration_query_spec.rb b/spec/features/types/form_configuration_query_spec.rb index fc43620ce01c..744ae87f1ed4 100644 --- a/spec/features/types/form_configuration_query_spec.rb +++ b/spec/features/types/form_configuration_query_spec.rb @@ -97,7 +97,7 @@ form.expect_group("Empty test", "Empty test") end - it "can edit a query group by clicking the Work packages table link" do + it "can edit a query group by clicking the related work packages table link" do form.add_query_group("Link test", :children, expect: false) form.expect_group("Link test", "Link test") diff --git a/spec/features/types/form_configuration_spec.rb b/spec/features/types/form_configuration_spec.rb index 88e2a3418e9e..fb93b9075d07 100644 --- a/spec/features/types/form_configuration_spec.rb +++ b/spec/features/types/form_configuration_spec.rb @@ -156,7 +156,7 @@ def persisted_attribute_order(type, group_key) form.drag_and_drop(form.find_attribute_handle(:version), form.inactive_group) form.expect_inactive(:version) - # Rename group + # Rename section form.rename_group("Details", "Whatever") form.rename_group("People", "Cool Stuff") From cffc7c39865d35d0d9704b0e3d1945205bfb1d02 Mon Sep 17 00:00:00 2001 From: Behrokh Satarnejad Date: Fri, 29 May 2026 13:13:06 +0200 Subject: [PATCH 3/3] fix failing spec --- .../components/admin/type_configuration_form.rb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/spec/support/components/admin/type_configuration_form.rb b/spec/support/components/admin/type_configuration_form.rb index 56fb2e1a7ed2..71aae9de6648 100644 --- a/spec/support/components/admin/type_configuration_form.rb +++ b/spec/support/components/admin/type_configuration_form.rb @@ -126,8 +126,7 @@ def drag_and_drop(handle, target) def add_query_group(name, relation_filter, expect: true) SeleniumHubWaiter.wait unless using_cuprite? - add_button_dropdown.click - click_on I18n.t("types.edit.form_configuration.add_query_group") + click_add_menu_item(I18n.t("types.edit.form_configuration.add_query_group")) modal = ::Components::WorkPackages::TableConfigurationModal.new expect(page).to have_css(".wp-table--configuration-modal", wait: 10) @@ -191,8 +190,7 @@ def edit_query_group_via_link(name) end def add_attribute_group(name, expect: true) - add_button_dropdown.click - click_on I18n.t("types.edit.form_configuration.add_attribute_group") + click_add_menu_item(I18n.t("types.edit.form_configuration.add_attribute_group")) fill_group_name(name) save_group @@ -343,6 +341,16 @@ def click_menu_action(open_menu_callback, label) end end + def click_add_menu_item(label) + menu_button = add_button_dropdown + menu_id = menu_button[:"aria-controls"] + menu_button.click + + page.find("##{menu_id}", visible: :all) + .first("[role='menuitem']", text: /\A#{Regexp.escape(label)}\z/, visible: :all) + .click + end + def save_group page.find_test_selector("type-form-configuration-group-save", wait: 10).click expect(page).to have_no_selector(page.test_selector("type-form-configuration-group-name-input"))