diff --git a/cypress/e2e/orders/transactionsForOrders.js b/cypress/e2e/orders/transactionsForOrders.js index a14f941c9..f699f95e1 100644 --- a/cypress/e2e/orders/transactionsForOrders.js +++ b/cypress/e2e/orders/transactionsForOrders.js @@ -114,10 +114,12 @@ describe("Orders", () => { }); beforeEach(() => { - cy.clearSessionData().loginUserViaRequest( - "auth", - ONE_PERMISSION_USERS.order, - ); + cy.clearSessionData() + .loginUserViaRequest("auth", ONE_PERMISSION_USERS.order) + .then(() => { + // set notifiedAboutNavigator to make navigator banner gone from the start - banner was covering needed elements during test + window.localStorage.setItem("notifiedAboutNavigator", "true"); + }); }); it( diff --git a/cypress/support/pages/ordersTransactionUtils.js b/cypress/support/pages/ordersTransactionUtils.js index fd6c262fe..2d31b2b4d 100644 --- a/cypress/support/pages/ordersTransactionUtils.js +++ b/cypress/support/pages/ordersTransactionUtils.js @@ -3,6 +3,7 @@ import { ORDER_GRANT_REFUND, ORDER_TRANSACTION_CREATE, ORDERS_SELECTORS, + SHARED_ELEMENTS, } from "../../elements"; export function markAsPaidOrderWithRefNumber(transactionNumber) { @@ -34,6 +35,8 @@ export function grantRefundAllProductsAndShippingWithReason( clickMaxQuantityButton(); typeRefundReason(refundReason); clickRefundShippingCheckbox(); + // this check makes sure no banner covers apply button which was making this action flaky + cy.get(SHARED_ELEMENTS.notificationMessage).should("not.exist"); clickApplyRefundButton(); cy.get(ORDER_GRANT_REFUND.refundAmountInput).should("contain.value", total); clickConfirmRefundButton();