Add assertion to fix flaky Afterpay step

This commit is contained in:
JennyNou 2026-03-26 09:57:20 -04:00
parent eb4d3415fb
commit 3fd9b952ae

View file

@ -37,7 +37,7 @@ export class AfterpayPage extends BasePage {
await this.login(paymentDetails.password!);
try {await this.confirmButton.waitFor({ state: 'visible', timeout: 5000 });
await this.confirmButton.isVisible()
expect(this.confirmButton).toBeVisible();
await this.confirmButton.click();
} catch {
// For some orders, user will have 2 options to choose from: monthly with interest or biweekly without interest