Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
NghiaDTr committed Nov 14, 2024
1 parent 6270432 commit 0911cb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 7 additions & 4 deletions application/cypress/e2e/method-details-availability.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ beforeEach(() => {

describe('Test method details - availability tab', () => {
it('should be fully functional', () => {
const LOCALE = Cypress.env('LOCALE');
const paymentMethods = 'Apple Pay';

cy.findByText(paymentMethods).click();
Expand Down Expand Up @@ -89,8 +88,8 @@ describe('Test method details - availability tab', () => {
maxAmount: 444,
surchargeCost: {
percentageAmount: 2,
fixedAmount: 10
}
fixedAmount: 10,
},
};

cy.findByTestId('money-field-maxAmount').type(
Expand All @@ -110,7 +109,11 @@ describe('Test method details - availability tab', () => {
newAvailability.surchargeCost.fixedAmount.toString()
);

const totalSurchargeCost = newAvailability.surchargeCost.percentageAmount + '% + ' + newAvailability.surchargeCost.fixedAmount + newAvailability.currencyCode;
const totalSurchargeCost =
newAvailability.surchargeCost.percentageAmount +
'% + ' +
newAvailability.surchargeCost.fixedAmount +
newAvailability.currencyCode;

const updatedPricingConstraints =
customObjects.results[0].value.pricingConstraints ?? [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const validate = (
}

const nMinAmount = convertCurrencyStringToNumber(minAmount);
const nMaxAmount = maxAmount ? convertCurrencyStringToNumber(maxAmount) : 0;
const nMaxAmount = maxAmount
? convertCurrencyStringToNumber(maxAmount)
: 0;

if (nMaxAmount < nMinAmount) {
errors.maxAmount.invalidValue = true;
Expand Down

0 comments on commit 0911cb3

Please sign in to comment.