Skip to content

Commit

Permalink
NTR: fix pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Dec 5, 2024
1 parent 91f8291 commit 9e01d74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
14 changes: 0 additions & 14 deletions tests/Cypress/cypress/e2e/storefront/refund/refund.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ context("Order Refunds", () => {
// now start the partial refund
refundManager.fullRefund(REFUND_DESCRIPTION, REFUND_INTERNAL_DESCRIPTION);

cy.wait(5000); // wait for the page to reload

adminOrders.openRefundManager();

cy.wait(1500);

// // verify that our refund now exists
repoRefundManager.getFirstRefundStatusLabel().contains('Pending');
Expand Down Expand Up @@ -114,9 +110,6 @@ context("Order Refunds", () => {
// now start the partial refund
refundManager.partialAmountRefund(2, REFUND_DESCRIPTION);

cy.wait(5000); // wait for the page to reload

adminOrders.openRefundManager();

// verify that our refund now exists
repoRefundManager.getFirstRefundStatusLabel().contains('Pending');
Expand Down Expand Up @@ -154,9 +147,7 @@ context("Order Refunds", () => {
// now start the partial refund with a custom amount
refundManager.partialAmountRefund(2, REFUND_DESCRIPTION);

cy.wait(5000); // wait for the page to reload

adminOrders.openRefundManager();

// -------------------------------------------------------------------------------

Expand Down Expand Up @@ -202,9 +193,7 @@ context("Order Refunds", () => {
// now start the full refund
refundManager.fullRefund(REFUND_DESCRIPTION, '');

cy.wait(5000); // wait for the page to reload

adminOrders.openRefundManager();

// verify that our refund now exists
repoRefundManager.getFirstRefundStatusLabel().contains('Pending');
Expand All @@ -222,9 +211,6 @@ context("Order Refunds", () => {
// now start another full refund
refundManager.fullRefund(REFUND_DESCRIPTION, '');

cy.wait(5000); // wait for the page to reload

adminOrders.openRefundManager();

cy.contains(CANCELED_REFUND_STATUS_LABEL).should('not.exist');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@ export default class AdminOrdersAction {
}

cy.wait(2000);
repoOrdersDetails.getMollieRefundManagerButton().click({force: true, waitForAnimations: false});
repoOrdersDetails.getMollieRefundManagerButton().trigger('click');//the normal click, missed somehow the element randomly
// here are automatic reloads and things as it seems
// I really want to test the real UX, so we just wait like a human
cy.wait(4000);
repoOrdersDetails.getMollieRefundManagerDialog().should('be.visible');
}




/**
*
* @param status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,8 @@ export default class OrderDetailsRepository {
getOrderDetailsGeneralTab() {
return cy.get('.sw-order-detail__tabs .sw-order-detail__tabs-tab-general')
}

getMollieRefundManagerDialog(){
return cy.get('#modalTitleEl');
}
}

0 comments on commit 9e01d74

Please sign in to comment.