diff --git a/tests/Cypress/cypress/e2e/storefront/cancel/cancel-item.cy.js b/tests/Cypress/cypress/e2e/storefront/cancel/cancel-item.cy.js index 18042b5e5..04436545d 100644 --- a/tests/Cypress/cypress/e2e/storefront/cancel/cancel-item.cy.js +++ b/tests/Cypress/cypress/e2e/storefront/cancel/cancel-item.cy.js @@ -50,7 +50,8 @@ context("Cancel Authorized items", () => { orderDetailsRepository.getLineItemActionsButtonCancelThroughMollie().should('not.have.class', 'is--disabled'); orderDetailsRepository.getLineItemActionsButtonCancelThroughMollie().click({force: true}); - cancelItemRepository.getQuantityInput().type(2); + cancelItemRepository.getQuantityInput().clear().type(2); + cancelItemRepository.getResetStockToggle().click({force:true}); cancelItemRepository.getItemLabel().should('not.be.empty'); cancelItemRepository.getConfirmButton().click({force: true}); orderDetailsRepository.getLineItemCancelled().should('contain.text', 2); diff --git a/tests/Cypress/cypress/support/repositories/admin/cancel-item/CancelItemRepository.js b/tests/Cypress/cypress/support/repositories/admin/cancel-item/CancelItemRepository.js index d2dee3bd9..c500911ce 100644 --- a/tests/Cypress/cypress/support/repositories/admin/cancel-item/CancelItemRepository.js +++ b/tests/Cypress/cypress/support/repositories/admin/cancel-item/CancelItemRepository.js @@ -22,7 +22,7 @@ export default class CancelItemRepository { * @returns {Cypress.Chainable>} */ getResetStockToggle(){ - return cy.get('.cy-cancel-item-stock .sw-field') + return cy.get('.cy-cancel-item-stock input') } /**