diff --git a/playwright-tests/pages/AfterpayPage.ts b/playwright-tests/pages/AfterpayPage.ts index b6b9c0b9..2896741a 100644 --- a/playwright-tests/pages/AfterpayPage.ts +++ b/playwright-tests/pages/AfterpayPage.ts @@ -37,10 +37,10 @@ export class AfterpayPage extends BasePage { async executeAfterpayPayment(paymentDetails: IPaymentDetails, claimDetails: IClaimDetails, servicePackage: ServicePackage) { await this.login(paymentDetails.password!); - if (claimDetails.policyDeductible === 50 && servicePackage === ServicePackage.GlassOnly) { + if (await this.confirmButton.isVisible()) { await this.confirmButton.click(); } else { - // For orders greater than $50, user will have 2 options to choose from: monthly with interest or biweekly without interest + // For some orders, user will have 2 options to choose from: monthly with interest or biweekly without interest await this.selectAfterpayWithoutInterestButton.waitFor({ state: 'visible' }); if (await this.selectAfterpayWithoutInterestButton.isVisible()) {