From d46c734d7c1b10d563d07ea8e958e20cf9ec64fa Mon Sep 17 00:00:00 2001 From: LuizAsFight Date: Thu, 31 Oct 2024 01:38:34 -0300 Subject: [PATCH] chore: fix flaky --- .../src/playwright-utils/fuelWalletTestHelper.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts index d83d41079..4670efd6d 100644 --- a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts +++ b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts @@ -274,12 +274,15 @@ export class FuelWalletTestHelper { await getByAriaLabel(this.walletPage, 'Test connection').click(); - await this.walletPage.waitForTimeout(3000); - const addNewNetworkButton = getByAriaLabel( this.walletPage, 'Add new network' ); + await expect + .poll(async () => await addNewNetworkButton.isEnabled(), { + timeout: 7000, + }) + .toBeTruthy(); await addNewNetworkButton.click(); }