From 3fd9b952aec6db1d97cf5f477b5e33f6414cd304 Mon Sep 17 00:00:00 2001 From: JennyNou Date: Thu, 26 Mar 2026 09:57:20 -0400 Subject: [PATCH] Add assertion to fix flaky Afterpay step --- playwright-tests/pages/AfterpayPage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-tests/pages/AfterpayPage.ts b/playwright-tests/pages/AfterpayPage.ts index 5053cf14..b4c619c7 100644 --- a/playwright-tests/pages/AfterpayPage.ts +++ b/playwright-tests/pages/AfterpayPage.ts @@ -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