Skip to content

Commit

Permalink
NTR: enable cancellation cypress refund tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
boxblinkracer committed Sep 29, 2023
1 parent a51bdf9 commit 0851baf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions tests/Cypress/cypress/e2e/storefront/refund/refund.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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, '');
Expand All @@ -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');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ export default class RefundManagerRepository {
*
* @returns {Cypress.Chainable<JQuery<HTMLElement>>}
*/
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<JQuery<HTMLElement>>}
Expand Down

0 comments on commit 0851baf

Please sign in to comment.