From f7ed8c55f33c6f2435d66e715d32208d6ad64ce5 Mon Sep 17 00:00:00 2001 From: Aleksey Belan Date: Mon, 28 Sep 2026 09:10:16 +0100 Subject: [PATCH 1/2] select2 --- .../list/product-attribute-visibility-list-repository.ts | 3 ++- .../list/product-management-list-repository.ts | 3 ++- .../product-offer/create/product-offer-create-repository.ts | 3 ++- .../ssp-asset-management/add/ssp-asset-add-repository.ts | 2 +- .../ssp-asset-management/update/ssp-asset-update-repository.ts | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts b/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts index 311ae4c75..9aa11e43c 100644 --- a/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts +++ b/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts @@ -8,7 +8,8 @@ export class ProductAttributeVisibilityListRepository { getVisibilityFilterSelector = (): string => '#table_filter_form_visibilityTypes'; getVisibilityFilterContainerSelector = (): string => '#table_filter_form_visibilityTypes + .select2-container'; getFilterDropdownOptionSelector = (): string => '.select2-results__option'; - getFilterSubmitButtonSelector = (): string => '#product-attribute-gui-filter-form button'; + getFilterSubmitButtonSelector = (): string => + '#product-attribute-gui-filter-form button:not(.select2-selection__choice__remove)'; getSearchInputSelector = (): string => 'input[type="search"][data-qa="table-search"]'; getTableBodyRowsSelector = (): string => '.dataTable tbody tr'; getDisplayAtColumnIndex = (): number => 4; diff --git a/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts b/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts index 19d6f6505..9b5dbe989 100644 --- a/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts +++ b/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts @@ -13,7 +13,8 @@ export class ProductManagementListRepository { getFilterStatusSelect = (): Cypress.Chainable => cy.get('#select2-table_filter_form_status-container'); getFilterStoresSelect = (): Cypress.Chainable => cy.get('#table_filter_form_stores').next(); getSelectOption = (): Cypress.Chainable => cy.get('.select2-results__option'); - getFilterButton = (): Cypress.Chainable => cy.get('#product-management-filter-form button'); + getFilterButton = (): Cypress.Chainable => + cy.get('#product-management-filter-form button:not(.select2-selection__choice__remove)'); getTableRows = (): Cypress.Chainable => cy.get('.dataTable tbody tr'); getFilterSearchInput = (): Cypress.Chainable => cy.get('.dt-search [type=search]'); getResetButton = (): Cypress.Chainable => cy.get('#product-management-filter-form a[href="/product-management"]'); diff --git a/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts b/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts index 1aa4ce849..676ec224c 100644 --- a/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts +++ b/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts @@ -16,7 +16,8 @@ export class ProductOfferCreateRepository { getIsNeverOfStockCheckbox = (): Cypress.Chainable => cy.get('[name="create_offer_form[isNeverOutOfStock]"]'); getShipmentTypesField = (): Cypress.Chainable => cy.get('[name="create_offer_form[shipmentTypes][]"]'); - getSaveButton = (): Cypress.Chainable => cy.get('[name="create_offer_form"]').find('button'); + getSaveButton = (): Cypress.Chainable => + cy.get('[name="create_offer_form"]').find('button:not(.select2-selection__choice__remove)'); getSuccessMessageBox = (): Cypress.Chainable => cy.get('.alert-success', { timeout: 10000 }); diff --git a/cypress/support/pages/backoffice/ssp-asset-management/add/ssp-asset-add-repository.ts b/cypress/support/pages/backoffice/ssp-asset-management/add/ssp-asset-add-repository.ts index 629d0760d..3e87c6c05 100644 --- a/cypress/support/pages/backoffice/ssp-asset-management/add/ssp-asset-add-repository.ts +++ b/cypress/support/pages/backoffice/ssp-asset-management/add/ssp-asset-add-repository.ts @@ -9,7 +9,7 @@ export class SspAssetAddRepository { getStatusSelect = (): Cypress.Chainable => cy.get('select[name="assetForm[status]"]'); getNoteTextarea = (): Cypress.Chainable => cy.get('textarea[name="assetForm[note]"]'); - getSearchFieldSelector = (): string => 'input.select2-search__field'; + getSearchFieldSelector = (): string => '.select2-search__field'; getBusinessUnitOwnerSearchField = (): Cypress.Chainable => cy.get('[aria-controls="select2-assetForm_companyBusinessUnit-results"]'); getDropdownOption = (): Cypress.Chainable => cy.get('.select2-results__option'); diff --git a/cypress/support/pages/backoffice/ssp-asset-management/update/ssp-asset-update-repository.ts b/cypress/support/pages/backoffice/ssp-asset-management/update/ssp-asset-update-repository.ts index 41940edfd..b55dda611 100644 --- a/cypress/support/pages/backoffice/ssp-asset-management/update/ssp-asset-update-repository.ts +++ b/cypress/support/pages/backoffice/ssp-asset-management/update/ssp-asset-update-repository.ts @@ -16,7 +16,7 @@ export class SspAssetUpdateRepository { getSelectContainer = (): string => '.select2'; // Select2 helper selectors - getSearchFieldSelector = (): string => 'input.select2-search__field'; + getSearchFieldSelector = (): string => '.select2-search__field'; getDropdownOptionSelector = (): string => '.select2-results__option'; getSelectContainerSelector = (): string => '.select2-container--open'; getSelectionChoiceRemoveSelector = (): string => '.select2-selection__choice__remove'; From 5a07be7853a7ac56e32f70c89f6e4559049f3e1a Mon Sep 17 00:00:00 2001 From: Aleksey Belan Date: Mon, 28 Sep 2026 12:41:22 +0100 Subject: [PATCH 2/2] fix --- .../list/product-attribute-visibility-list-repository.ts | 2 +- .../list/product-management-list-repository.ts | 4 +++- .../product-offer/create/product-offer-create-repository.ts | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts b/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts index 9aa11e43c..cfc3cffe6 100644 --- a/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts +++ b/cypress/support/pages/backoffice/product-attribute-visibility/list/product-attribute-visibility-list-repository.ts @@ -9,7 +9,7 @@ export class ProductAttributeVisibilityListRepository { getVisibilityFilterContainerSelector = (): string => '#table_filter_form_visibilityTypes + .select2-container'; getFilterDropdownOptionSelector = (): string => '.select2-results__option'; getFilterSubmitButtonSelector = (): string => - '#product-attribute-gui-filter-form button:not(.select2-selection__choice__remove)'; + '#product-attribute-gui-filter-form button:not(.select2-selection__choice__remove):not(.select2-selection__clear)'; getSearchInputSelector = (): string => 'input[type="search"][data-qa="table-search"]'; getTableBodyRowsSelector = (): string => '.dataTable tbody tr'; getDisplayAtColumnIndex = (): number => 4; diff --git a/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts b/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts index 9b5dbe989..ad2ea4997 100644 --- a/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts +++ b/cypress/support/pages/backoffice/product-management/list/product-management-list-repository.ts @@ -14,7 +14,9 @@ export class ProductManagementListRepository { getFilterStoresSelect = (): Cypress.Chainable => cy.get('#table_filter_form_stores').next(); getSelectOption = (): Cypress.Chainable => cy.get('.select2-results__option'); getFilterButton = (): Cypress.Chainable => - cy.get('#product-management-filter-form button:not(.select2-selection__choice__remove)'); + cy.get( + '#product-management-filter-form button:not(.select2-selection__choice__remove):not(.select2-selection__clear)' + ); getTableRows = (): Cypress.Chainable => cy.get('.dataTable tbody tr'); getFilterSearchInput = (): Cypress.Chainable => cy.get('.dt-search [type=search]'); getResetButton = (): Cypress.Chainable => cy.get('#product-management-filter-form a[href="/product-management"]'); diff --git a/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts b/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts index 676ec224c..130bee75a 100644 --- a/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts +++ b/cypress/support/pages/backoffice/product-offer/create/product-offer-create-repository.ts @@ -17,7 +17,9 @@ export class ProductOfferCreateRepository { getShipmentTypesField = (): Cypress.Chainable => cy.get('[name="create_offer_form[shipmentTypes][]"]'); getSaveButton = (): Cypress.Chainable => - cy.get('[name="create_offer_form"]').find('button:not(.select2-selection__choice__remove)'); + cy + .get('[name="create_offer_form"]') + .find('button:not(.select2-selection__choice__remove):not(.select2-selection__clear)'); getSuccessMessageBox = (): Cypress.Chainable => cy.get('.alert-success', { timeout: 10000 });