Skip to content

Commit

Permalink
chore(forms): Rename 'Add strategy' button to 'Combine with another o…
Browse files Browse the repository at this point in the history
…ption' for clarity
  • Loading branch information
ccailly committed Jan 6, 2025
1 parent 740191e commit 6c69bd8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@
<button
type="button"
class="btn btn-outline"
aria-label="{{ __('Add strategy') }}"
aria-label="{{ __('Combine with another option') }}"
data-glpi-itildestination-add-field-config
>
<i class="ti ti-plus me-2"></i>
{{ __('Add another strategy') }}
{{ __('Combine with another option') }}
</button>
{% endif %}
{% else %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
4 changes: 2 additions & 2 deletions tests/cypress/e2e/form/form_destination.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,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
Expand Down Expand Up @@ -178,7 +178,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');

Expand Down

0 comments on commit 6c69bd8

Please sign in to comment.