Fix logic for Afterpay payment flow
This commit is contained in:
parent
e537e41c98
commit
1192775254
1 changed files with 2 additions and 2 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue