test: fix for transaction orders test - set local storage to hide navigator banner (#3649)
This commit is contained in:
parent
0d690ff414
commit
dc45c3d090
2 changed files with 9 additions and 4 deletions
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue