From 0851baf6c29f9585115bace446f4465d7c15cac4 Mon Sep 17 00:00:00 2001 From: Christian Dangl Date: Fri, 29 Sep 2023 11:43:34 +0200 Subject: [PATCH] NTR: enable cancellation cypress refund tests again --- .../cypress/e2e/storefront/refund/refund.cy.js | 11 +++++------ .../admin/refund-manager/RefundManagerRepository.js | 5 +++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Cypress/cypress/e2e/storefront/refund/refund.cy.js b/tests/Cypress/cypress/e2e/storefront/refund/refund.cy.js index cc8bfbb30..b5d93b2f9 100644 --- a/tests/Cypress/cypress/e2e/storefront/refund/refund.cy.js +++ b/tests/Cypress/cypress/e2e/storefront/refund/refund.cy.js @@ -166,8 +166,7 @@ context("Order Refunds", () => { cy.contains(REFUND_DESCRIPTION).should('not.exist') }) - // TODO attention this is skipped because of a bug in Mollie. they dont' clear up deleted refunds. line items are still refunded. - it.skip('C273581: Canceled refunds should not be visible', () => { + it('C273581: Canceled refunds should not be visible', () => { createOrderAndOpenAdmin(); @@ -184,7 +183,7 @@ context("Order Refunds", () => { repoRefundManager.getFullRefundButton().should('be.disabled'); // check if refund quantity input field is visible - repoRefundManager.getFirstRefundedQuantityInputField().should('be.visible'); + repoRefundManager.getFirstLineItemQuantityInput().should('be.visible'); // now start the full refund refundManager.fullRefund(REFUND_DESCRIPTION, ''); @@ -200,10 +199,10 @@ context("Order Refunds", () => { refundManager.cancelPendingRefund(); // after cancel, the refund input field should be visible again - repoRefundManager.getFirstRefundedQuantityInputField().should('be.visible'); + repoRefundManager.getFirstLineItemQuantityInput().should('be.visible'); - // now start the partial refund - refundManager.partialAmountRefund(2, REFUND_DESCRIPTION); + // now start another full refund + refundManager.fullRefund(REFUND_DESCRIPTION, ''); cy.contains(CANCELED_REFUND_STATUS_LABEL).should('not.exist'); diff --git a/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js b/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js index 28b627d4b..00e47c07a 100644 --- a/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js +++ b/tests/Cypress/cypress/support/repositories/admin/refund-manager/RefundManagerRepository.js @@ -61,9 +61,10 @@ export default class RefundManagerRepository { * * @returns {Cypress.Chainable>} */ - getFirstRefundedQuantityInputField(){ - return cy.get('.sw-data-grid__cell--inputQuantity #sw-field--item-refundQuantity') + getFirstLineItemQuantityInput() { + return cy.get('.sw-data-grid__cell--inputQuantity #sw-field--item-refundQuantity').first(); } + /** * * @returns {Cypress.Chainable>}