Skip to content

Commit

Permalink
NTR: fix refund cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Apr 22, 2024
1 parent a641bdd commit e0d6e80
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
v-model:value="item.refundQuantity"
v-if="isItemRefundable(item)"
:allowEmpty="true"
:class="{ 'tutorial-active' : tutorialPartialQuantityVisible || tutorialPartialPromotionsVisible || (tutorialRefundShipping && isItemDelivery(item)), 'input-mode-active' : item.refundMode == 'quantity', 'input-mode-inactive' : item.refundMode == 'amount' }"
:class="{ 'cy-input-quantity':true,'tutorial-active' : tutorialPartialQuantityVisible || tutorialPartialPromotionsVisible || (tutorialRefundShipping && isItemDelivery(item)), 'input-mode-active' : item.refundMode == 'quantity', 'input-mode-inactive' : item.refundMode == 'amount' }"
@change="onItemQtyChanged(item)">
<template #suffix>
{{ $tc('mollie-payments.refund-manager.general.unitQuantity') }}
Expand All @@ -91,6 +91,7 @@
<div v-if="isItemRefundable(item) && !isTaxStatusGross()">
<sw-checkbox-field :label="$tc('mollie-payments.refund-manager.cart.grid.checkRefundTax')"
v-model="item.refundTax"
v-model:value="item.refundTax"
class="check-refund-tax"
:class="{ 'tutorial-active': tutorialPartialPromotionsVisible }"
@change="onItemRefundTaxChanged(item)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const repoRefundManager = new RefundManagerRepository();
// we have to force it
// because due to scrolling it might not
// always be visible
const forceOption = {force: true};
const forceOption = {force: true,timeout:10000};


export default class RefundManagerAction {
Expand Down Expand Up @@ -71,6 +71,7 @@ export default class RefundManagerAction {
*
*/
selectAllItems() {
repoRefundManager.getFirstRefundQuantityInput().should('be.visible');
repoRefundManager.getSelectAllItemsButton().click(forceOption);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,12 @@ export default class RefundManagerRepository {
return cy.get('.order-container-top-left > .sw-button-group > :nth-child(1)');
}

/**
*
* @returns {Cypress.Chainable<JQuery<HTMLElement>>}
*/
getFirstRefundQuantityInput(){
return cy.get('.cy-input-quantity input')
}

}

0 comments on commit e0d6e80

Please sign in to comment.