Fix flakiness for Afterpay sandbox flow
This commit is contained in:
parent
1192775254
commit
2dfdbb6d1d
1 changed files with 5 additions and 3 deletions
|
|
@ -37,9 +37,11 @@ export class AfterpayPage extends BasePage {
|
|||
async executeAfterpayPayment(paymentDetails: IPaymentDetails, claimDetails: IClaimDetails, servicePackage: ServicePackage) {
|
||||
await this.login(paymentDetails.password!);
|
||||
|
||||
if (await this.confirmButton.isVisible()) {
|
||||
await this.confirmButton.click();
|
||||
} else {
|
||||
try {
|
||||
await this.confirmButton.waitFor({ state: 'visible', timeout: 5000 });
|
||||
await this.confirmButton.isVisible()
|
||||
await this.confirmButton.click();
|
||||
} catch {
|
||||
// For some orders, user will have 2 options to choose from: monthly with interest or biweekly without interest
|
||||
await this.selectAfterpayWithoutInterestButton.waitFor({ state: 'visible' });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue