From b757e5e58d6d180dce0f617978e3b07b4e54d5e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Cailly?= Date: Thu, 2 Jan 2025 09:41:29 +0100 Subject: [PATCH] chore(forms): Rename 'Add strategy' button to 'Combine with another option' for clarity --- .../admin/form/form_destination_commonitil_config.html.twig | 4 ++-- .../e2e/form/destination_config_fields/associated_items.cy.js | 2 +- tests/cypress/e2e/form/form_destination.cy.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/pages/admin/form/form_destination_commonitil_config.html.twig b/templates/pages/admin/form/form_destination_commonitil_config.html.twig index 481f86c66d8..d79836d20af 100644 --- a/templates/pages/admin/form/form_destination_commonitil_config.html.twig +++ b/templates/pages/admin/form/form_destination_commonitil_config.html.twig @@ -167,11 +167,11 @@ {% endif %} {% else %} diff --git a/tests/cypress/e2e/form/destination_config_fields/associated_items.cy.js b/tests/cypress/e2e/form/destination_config_fields/associated_items.cy.js index 0f9c5b2d129..f0a8d79c335 100644 --- a/tests/cypress/e2e/form/destination_config_fields/associated_items.cy.js +++ b/tests/cypress/e2e/form/destination_config_fields/associated_items.cy.js @@ -280,7 +280,7 @@ describe('Associated items configuration', () => { }); // Add strategy - cy.get('@config').findByRole('button', {'name': 'Add strategy'}).click(); + cy.get('@config').findByRole('button', {'name': 'Combine with another option'}).click(); cy.get('@config').find('[data-glpi-itildestination-field-config]').eq(1).getDropdownByLabelText('Select strategy...').as('specific_associated_items_strategy_dropdown'); cy.get('@specific_associated_items_strategy_dropdown').selectDropdownValue('Answer from specific questions'); diff --git a/tests/cypress/e2e/form/form_destination.cy.js b/tests/cypress/e2e/form/form_destination.cy.js index 92a2760f37a..0601250ffd6 100644 --- a/tests/cypress/e2e/form/form_destination.cy.js +++ b/tests/cypress/e2e/form/form_destination.cy.js @@ -146,7 +146,7 @@ describe('Form destination', () => { it('can define multiple strategies for the same field', () => { cy.findByRole('region', {name: 'Requesters configuration'}).as('requesters_config'); - cy.get('@requesters_config').findByRole('button', {name: 'Add strategy'}).should('exist').as('add_strategy_button'); + cy.get('@requesters_config').findByRole('button', {name: 'Combine with another option'}).should('exist').as('add_strategy_button'); cy.getDropdownByLabelText('Requesters').as('first_strategy_dropdown'); // Define first strategy @@ -177,7 +177,7 @@ describe('Form destination', () => { }); // Add a fourth strategy - cy.get('@requesters_config').findByRole('button', {name: 'Add strategy'}).click(); + cy.get('@requesters_config').findByRole('button', {name: 'Combine with another option'}).click(); cy.findByRole('combobox', {name: '-----'}).as('fourth_strategy_dropdown'); cy.get('@fourth_strategy_dropdown').selectDropdownValue('User who filled the form');