Skip to content

Commit

Permalink
NTR: fix tests for sw 6.6.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Dec 11, 2024
1 parent b60d051 commit b7efee0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/Cypress/cypress/e2e/storefront/cancel/cancel-item.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ context("Cancel Authorized items", () => {
createOrderAndOpenAdmin('Klarna');


orderDetailsRepository.getLineItemActionsButton(1).should('be.visible').click({force: true});
orderDetailsRepository.getLineItemActionsButton(1).should('be.visible').trigger('click');

orderDetailsRepository.getLineItemActionsButtonCancelThroughMollie().should('not.have.class', 'is--disabled');
orderDetailsRepository.getLineItemActionsButtonCancelThroughMollie().click({force: true});
Expand All @@ -55,7 +55,7 @@ context("Cancel Authorized items", () => {
cancelItemRepository.getItemLabel().should('not.be.empty');
cancelItemRepository.getConfirmButton().click({force: true});
orderDetailsRepository.getLineItemCancelled().should('contain.text', 2);
orderDetailsRepository.getLineItemActionsButton(1).click({force: true});
orderDetailsRepository.getLineItemActionsButton(1).trigger('click');
orderDetailsRepository.getLineItemActionsButtonCancelThroughMollie().should('have.class', 'is--disabled');

});
Expand All @@ -64,7 +64,7 @@ context("Cancel Authorized items", () => {
createOrderAndOpenAdmin('PayPal');


orderDetailsRepository.getLineItemActionsButton(1).should('be.visible').click({force: true});
orderDetailsRepository.getLineItemActionsButton(1).should('be.visible').trigger('click');

orderDetailsRepository.getLineItemActionsButtonCancelThroughMollie().should('have.class', 'is--disabled');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export default class AdminOrdersAction {
*
*/
openLastOrder() {
repoOrdersList.getLatestOrderNumber().click(forceOption);
repoOrdersList.getLatestOrderNumber().trigger('click');
cy.wait(2000);
}


Expand Down Expand Up @@ -104,7 +105,7 @@ export default class AdminOrdersAction {

cy.wait(2000);

repoOrdersDetails.getLineItemActionsButton(nthItem).click(forceOption)
repoOrdersDetails.getLineItemActionsButton(nthItem).trigger('click')

repoOrdersDetails.getLineItemActionsButtonShipThroughMollie().should('not.have.class', 'is--disabled');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export default class AdminSettingsAction {
*
*/
openFirstBusinessEvent() {
cy.get('.sw-data-grid__body .sw-data-grid__row.sw-data-grid__row--0 .sw-context-button__button').click({force: true});
cy.get('.sw-context-menu-item.sw-entity-listing__context-menu-edit-action').click({force: true});
cy.get('.sw-data-grid__body .sw-data-grid__row.sw-data-grid__row--0 .sw-context-button__button').trigger('click');
cy.get('.sw-context-menu-item.sw-entity-listing__context-menu-edit-action').trigger('click');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export default class CheckoutAction {
cy.get('.address-form-actions:eq(0) button').click();

//since 6.6.8.0 the edit address modal does not close automatically
if(shopware.isVersionGreaterEqual('6.6.8.0')){
if(shopware.isVersionGreaterEqual('6.6.8.0') && shopware.isVersionLower('6.6.9.0')){
cy.wait(1000);
cy.get('.js-pseudo-modal .modal-dialog .btn-close').click();
}
Expand Down

0 comments on commit b7efee0

Please sign in to comment.