From 5f0c53c0cdc95c4d9bb6291b2b2b848f1ee60eb6 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 c7828e391619..ea37d445ea86 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 a60334373f899f886f830d3d38e70d5c389b48d1 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 ea37d445ea86..6795b806eb7f 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 74183943d5123f8195625b0239df40060a1143f9 Mon Sep 17 00:00:00 2001 From: Behrokh Satarnejad Date: Mon, 1 Jun 2026 18:58:47 +0200 Subject: [PATCH 3/3] Use test selectors instead of text selector --- .../form_configuration/main_content_component.html.erb | 3 ++- spec/support/components/admin/type_configuration_form.rb | 4 ++-- .../pages/work_packages/embedded_work_packages_table.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/components/work_package_types/form_configuration/main_content_component.html.erb b/app/components/work_package_types/form_configuration/main_content_component.html.erb index 2c6a832a94a2..b54e4e5f80db 100644 --- a/app/components/work_package_types/form_configuration/main_content_component.html.erb +++ b/app/components/work_package_types/form_configuration/main_content_component.html.erb @@ -45,7 +45,8 @@ label: t("types.edit.form_configuration.add_query_group"), tag: :button, content_arguments: { - data: { action: "click->admin--type-form-configuration--main#addQueryGroup" } + data: { action: "click->admin--type-form-configuration--main#addQueryGroup", + test_selector: "admin--type-form-configuration--add-query-group" } } ) do |item| item.with_leading_visual_icon(icon: :table) diff --git a/spec/support/components/admin/type_configuration_form.rb b/spec/support/components/admin/type_configuration_form.rb index 56fb2e1a7ed2..f55c15cab514 100644 --- a/spec/support/components/admin/type_configuration_form.rb +++ b/spec/support/components/admin/type_configuration_form.rb @@ -37,7 +37,7 @@ class TypeConfigurationForm include Rails.application.routes.url_helpers def add_button_dropdown - page.find(:test_id, "type-form-configuration-add-button", text: /\A#{Regexp.escape(I18n.t(:button_add))}\z/) + page.find_test_selector("type-form-configuration-add-button") end def reset_button @@ -127,7 +127,7 @@ 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") + page.find_test_selector("admin--type-form-configuration--add-query-group").click modal = ::Components::WorkPackages::TableConfigurationModal.new expect(page).to have_css(".wp-table--configuration-modal", wait: 10) diff --git a/spec/support/pages/work_packages/embedded_work_packages_table.rb b/spec/support/pages/work_packages/embedded_work_packages_table.rb index dc29b84abfde..16325f8063b6 100644 --- a/spec/support/pages/work_packages/embedded_work_packages_table.rb +++ b/spec/support/pages/work_packages/embedded_work_packages_table.rb @@ -44,7 +44,7 @@ def initialize(container, project = nil) end def table_container - container.first(".work-package-table", wait: 10) + container.find("table.work-package-table", wait: 10) end def click_reference_inline_create