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(() => {
|
beforeEach(() => {
|
||||||
cy.clearSessionData().loginUserViaRequest(
|
cy.clearSessionData()
|
||||||
"auth",
|
.loginUserViaRequest("auth", ONE_PERMISSION_USERS.order)
|
||||||
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(
|
it(
|
||||||
|
|
|
@ -3,6 +3,7 @@ import {
|
||||||
ORDER_GRANT_REFUND,
|
ORDER_GRANT_REFUND,
|
||||||
ORDER_TRANSACTION_CREATE,
|
ORDER_TRANSACTION_CREATE,
|
||||||
ORDERS_SELECTORS,
|
ORDERS_SELECTORS,
|
||||||
|
SHARED_ELEMENTS,
|
||||||
} from "../../elements";
|
} from "../../elements";
|
||||||
|
|
||||||
export function markAsPaidOrderWithRefNumber(transactionNumber) {
|
export function markAsPaidOrderWithRefNumber(transactionNumber) {
|
||||||
|
@ -34,6 +35,8 @@ export function grantRefundAllProductsAndShippingWithReason(
|
||||||
clickMaxQuantityButton();
|
clickMaxQuantityButton();
|
||||||
typeRefundReason(refundReason);
|
typeRefundReason(refundReason);
|
||||||
clickRefundShippingCheckbox();
|
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();
|
clickApplyRefundButton();
|
||||||
cy.get(ORDER_GRANT_REFUND.refundAmountInput).should("contain.value", total);
|
cy.get(ORDER_GRANT_REFUND.refundAmountInput).should("contain.value", total);
|
||||||
clickConfirmRefundButton();
|
clickConfirmRefundButton();
|
||||||
|
|
Loading…
Reference in a new issue