From 39d00f3e426ed658b7865e943fd2bbd57649bdb9 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Thu, 31 Oct 2024 18:53:39 +0400 Subject: [PATCH 1/9] fix: flaky sdk e2e tests --- packages/app/playwright/commons/locator.ts | 2 +- packages/app/playwright/crx/crx.test.ts | 10 +++++++++- packages/app/playwright/crx/utils/popup.ts | 16 ++++++++++++---- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/packages/app/playwright/commons/locator.ts b/packages/app/playwright/commons/locator.ts index f4cec0e1f..a5ab896ee 100644 --- a/packages/app/playwright/commons/locator.ts +++ b/packages/app/playwright/commons/locator.ts @@ -5,7 +5,7 @@ export function getByAriaLabel(page: Page, selector: string) { } export async function waitAriaLabel(page: Page, selector: string) { - return page.waitForSelector(`[aria-label="${selector}"]`); + return page.waitForSelector(`[aria-label="${selector}"]`, { timeout: 15000 }); } export function getInputByName(page: Page, name: string) { diff --git a/packages/app/playwright/crx/crx.test.ts b/packages/app/playwright/crx/crx.test.ts index d2f3ffc18..8691def00 100644 --- a/packages/app/playwright/crx/crx.test.ts +++ b/packages/app/playwright/crx/crx.test.ts @@ -695,7 +695,15 @@ test.describe('FuelWallet Extension', () => { const authorizedAccount = await switchAccount(popupPage, 'Account 1'); await seedWallet(authorizedAccount.address, bn(100_000_000)); - await hasText(popupPage, /0\.100/i); + await expect + .poll( + () => + hasText(popupPage, /0\.100/i) + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); }); await test.step('Send transfer using authorized Account', async () => { diff --git a/packages/app/playwright/crx/utils/popup.ts b/packages/app/playwright/crx/utils/popup.ts index 5449013e0..934d2659c 100644 --- a/packages/app/playwright/crx/utils/popup.ts +++ b/packages/app/playwright/crx/utils/popup.ts @@ -1,4 +1,4 @@ -import type { Page } from '@playwright/test'; +import { type Page, expect } from '@playwright/test'; import { getByAriaLabel, hasText, visit, waitAriaLabel } from '../../commons'; import type { MockData } from '../../mocks'; @@ -27,8 +27,16 @@ export async function switchAccount(popupPage: Page, name: string) { await getByAriaLabel(popupPage, 'Accounts').click(); - await popupPage.waitForTimeout(5000); - await hasText(popupPage, name); + await expect + .poll( + () => + hasText(popupPage, name) + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); + // Add position to click on the element and not on copy button await getByAriaLabel(popupPage, name).click({ position: { @@ -36,7 +44,7 @@ export async function switchAccount(popupPage: Page, name: string) { y: 10, }, }); - await popupPage.waitForTimeout(2000); + await waitAriaLabel(popupPage, `${name} selected`); // Return account to be used on tests From dfa9a3b937dc2f11accdad3e6a448991ca331d52 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:05:23 +0400 Subject: [PATCH 2/9] chore: remove redundant build action for e2e contracts --- .github/actions/e2e-tests-contracts/action.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/actions/e2e-tests-contracts/action.yaml b/.github/actions/e2e-tests-contracts/action.yaml index fac2f0fa3..e21cc67d5 100644 --- a/.github/actions/e2e-tests-contracts/action.yaml +++ b/.github/actions/e2e-tests-contracts/action.yaml @@ -15,16 +15,6 @@ runs: using: 'composite' steps: - - - name: Build Application - shell: bash - run: pnpm build:all - env: - ## increase node.js m memory limit for building - ## with sourcemaps - NODE_OPTIONS: "--max-old-space-size=4096" - NODE_ENV: test - # E2E tests running with Playwright - name: Install Playwright Browsers shell: bash From 28f98975b8b7a187580f01c067dfd7e665901d0b Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:07:02 +0400 Subject: [PATCH 3/9] chore: use max concurrency available --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0a228ca9d..b98d46e2c 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build:all": "turbo run build:all", "build:docs": "turbo run build:docs", "build:web": "turbo run build:web", - "build:crx": "turbo run build:crx", + "build:crx": "turbo run build:crx --concurrency=100%", "build:app": "turbo run build:app", "build:libs": "turbo run build", "changeset": "changeset", From 5ed4351b43577d8149d64e738fbacdeb16045eef Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Thu, 31 Oct 2024 19:32:02 +0400 Subject: [PATCH 4/9] chore: enable devnet and testnet on pull requests --- .github/workflows/tests-devnet.yaml | 3 +++ .github/workflows/tests-testnet.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/tests-devnet.yaml b/.github/workflows/tests-devnet.yaml index 69bd06d8a..3d2578ae4 100644 --- a/.github/workflows/tests-devnet.yaml +++ b/.github/workflows/tests-devnet.yaml @@ -9,6 +9,9 @@ on: push: branches: - master + pull_request: + branches: + - master concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/tests-testnet.yaml b/.github/workflows/tests-testnet.yaml index 2bbbded77..aa35f690f 100644 --- a/.github/workflows/tests-testnet.yaml +++ b/.github/workflows/tests-testnet.yaml @@ -9,6 +9,9 @@ on: push: branches: - master + pull_request: + branches: + - master concurrency: group: ${{ github.workflow }}-${{ github.ref }} From 4fa16bcbf1deb47c99cf30063a3507475e035081 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:01:52 +0400 Subject: [PATCH 5/9] fix: remove page.pauses --- packages/e2e-contract-tests/playwright/utils/setup.ts | 1 - .../src/playwright-utils/fuelWalletTestHelper.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/e2e-contract-tests/playwright/utils/setup.ts b/packages/e2e-contract-tests/playwright/utils/setup.ts index cc43af4f8..8a9d72d85 100644 --- a/packages/e2e-contract-tests/playwright/utils/setup.ts +++ b/packages/e2e-contract-tests/playwright/utils/setup.ts @@ -55,7 +55,6 @@ export const testSetup = async ({ ); await txResponse.waitForResult(); - await page.pause(); const fuelWalletTestHelper = await FuelWalletTestHelper.walletSetup({ context, fuelExtensionId: extensionId, diff --git a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts index 08b03c7b8..2be455dba 100644 --- a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts +++ b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts @@ -85,11 +85,9 @@ export class FuelWalletTestHelper { .getByText('Wallet created successfully') .waitFor({ state: 'visible', timeout: 9000 }); - await signupPage.pause(); await signupPage.goto( `chrome-extension://${fuelExtensionId}/popup.html#/wallet` ); - await signupPage.pause(); const fuelWalletTestHelper = new FuelWalletTestHelper(context); From 80067f72a1422817390d24997eb3f66d5813e86f Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 1 Nov 2024 03:25:24 +0400 Subject: [PATCH 6/9] fix: e2e not finding setup page --- .../src/playwright-utils/fuelWalletTestHelper.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts index 2be455dba..b12379a1d 100644 --- a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts +++ b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts @@ -46,14 +46,14 @@ export class FuelWalletTestHelper { }) { const { url, chainId } = fuelProvider; const popupNotSignedUpPage = await context.newPage(); + const signupPageAsync = context.waitForEvent('page', { + predicate: (page) => page.url().includes('sign-up'), + }); await popupNotSignedUpPage.goto( `chrome-extension://${fuelExtensionId}/popup.html` ); - await popupNotSignedUpPage.waitForTimeout(2000); + const signupPage = await signupPageAsync; await popupNotSignedUpPage.close(); - const signupPage = await context.waitForEvent('page', { - predicate: (page) => page.url().includes('sign-up'), - }); expect(signupPage.url()).toContain('sign-up'); const importSeedPhraseButton = signupPage From a3400c4dc76f5d258132d91f148c9d6de915ef35 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 1 Nov 2024 04:25:50 +0400 Subject: [PATCH 7/9] fix: not finding wallet popup --- .../playwright/e2e/DepositHalfEth.test.ts | 23 +++++++++++++++---- .../e2e/ForwardAndMintMulticall.test.ts | 22 ++++++++++++++---- .../playwright/e2e/ForwardCustomAsset.test.ts | 4 +++- .../playwright/e2e/ForwardEth.test.ts | 22 ++++++++++++++---- .../e2e/ForwardHalfAndExternalMint.test.ts | 22 ++++++++++++++---- .../playwright/e2e/ForwardHalfAndMint.test.ts | 22 ++++++++++++++---- .../e2e/ForwardHalfCustomAsset.test.ts | 4 +++- .../playwright/e2e/MintAsset.test.ts | 8 +++++-- .../playwright-utils/fuelWalletTestHelper.ts | 10 ++++---- 9 files changed, 108 insertions(+), 29 deletions(-) diff --git a/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts b/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts index 406076ab8..73dc1359a 100644 --- a/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts @@ -57,22 +57,35 @@ test.describe('Deposit Half ETH', () => { const depositHalfButton = getButtonByText(page, 'Deposit Half ETH', true); await expectButtonToBeEnabled(depositHalfButton); - await depositHalfButton.click(); - + await depositHalfButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); // Test if asset name is defined (not unknown) - checkAriaLabelsContainsText( + await checkAriaLabelsContainsText( walletNotificationPage, 'Asset Name', 'Ethereum' ); // Test if sender name is defined (not unknown) - checkAriaLabelsContainsText(walletNotificationPage, 'Sender Name', ''); + await checkAriaLabelsContainsText( + walletNotificationPage, + 'Sender Name', + '' + ); // test forward asset name is shown - await hasText(walletNotificationPage, 'Ethereum'); + await expect + .poll( + async () => + await hasText(walletNotificationPage, 'Ethereum') + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); // test forward asset id is shown await hasText(walletNotificationPage, shortAddress(await getBaseAssetId())); // test forward eth amount is correct diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts index dc186e133..4cc85b5b6 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts @@ -66,22 +66,36 @@ test.describe('Forward and Mint Multicall', () => { 'Deposit And Mint Multicall' ); await expectButtonToBeEnabled(forwardHalfAndMintButton); - await forwardHalfAndMintButton.click(); + await forwardHalfAndMintButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); // Test if asset name is defined (not unknown) - checkAriaLabelsContainsText( + await checkAriaLabelsContainsText( walletNotificationPage, 'Asset Name', 'Ethereum' ); // Test if sender name is defined (not unknown) - checkAriaLabelsContainsText(walletNotificationPage, 'Sender Name', ''); + await checkAriaLabelsContainsText( + walletNotificationPage, + 'Sender Name', + '' + ); // test forward asset name is shown - await hasText(walletNotificationPage, 'Ethereum'); + await expect + .poll( + async () => + await hasText(walletNotificationPage, 'Ethereum') + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); // test forward asset id is shown await hasText(walletNotificationPage, shortAddress(await getBaseAssetId())); // test forward eth amount is correct diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts index 6a927e276..764b7152e 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts @@ -78,7 +78,9 @@ test.describe('Forward Custom Asset', () => { 'Forward Custom Asset' ); await expectButtonToBeEnabled(forwardCustomAssetButton); - await forwardCustomAssetButton.click(); + await forwardCustomAssetButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts index 946b6a6c0..cae15dce8 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts @@ -56,22 +56,36 @@ test.describe('Forward Eth', () => { const forwardEthButton = getButtonByText(page, 'Forward ETH'); await expectButtonToBeEnabled(forwardEthButton); - await forwardEthButton.click(); + await forwardEthButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); // Test if asset name is defined (not unknown) - checkAriaLabelsContainsText( + await checkAriaLabelsContainsText( walletNotificationPage, 'Asset Name', 'Ethereum' ); // Test if sender name is defined (not unknown) - checkAriaLabelsContainsText(walletNotificationPage, 'Sender Name', ''); + await checkAriaLabelsContainsText( + walletNotificationPage, + 'Sender Name', + '' + ); // test the asset name is shown - await hasText(walletNotificationPage, 'Ethereum'); + await expect + .poll( + async () => + await hasText(walletNotificationPage, 'Ethereum') + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); // test asset id is correct await hasText(walletNotificationPage, shortAddress(await getBaseAssetId())); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts index 8d10363b0..62e6216c6 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts @@ -70,22 +70,36 @@ test.describe('Forward Half ETH and Mint External Custom Asset', () => { 'Forward Half And External Mint' ); await expectButtonToBeEnabled(forwardHalfAndMintButton); - await forwardHalfAndMintButton.click(); + await forwardHalfAndMintButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); // Test if asset name is defined (not unknown) - checkAriaLabelsContainsText( + await checkAriaLabelsContainsText( walletNotificationPage, 'Asset Name', 'Ethereum' ); // Test if sender name is defined (not unknown) - checkAriaLabelsContainsText(walletNotificationPage, 'Sender Name', ''); + await checkAriaLabelsContainsText( + walletNotificationPage, + 'Sender Name', + '' + ); // test forward asset name is shown - await hasText(walletNotificationPage, 'Ethereum'); + await expect + .poll( + async () => + await hasText(walletNotificationPage, 'Ethereum') + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); // test forward asset id is shown await hasText(walletNotificationPage, shortAddress(await getBaseAssetId())); // test forward eth amount is correct diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts index cdd03e2ea..fc65bb319 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts @@ -67,22 +67,36 @@ test.describe('Forward Half ETH and Mint Custom Asset', () => { 'Forward Half And Mint' ); await expectButtonToBeEnabled(forwardHalfAndMintButton); - await forwardHalfAndMintButton.click(); + await forwardHalfAndMintButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); // Test if asset name is defined (not unknown) - checkAriaLabelsContainsText( + await checkAriaLabelsContainsText( walletNotificationPage, 'Asset Name', 'Ethereum' ); // Test if sender name is defined (not unknown) - checkAriaLabelsContainsText(walletNotificationPage, 'Sender Name', ''); + await checkAriaLabelsContainsText( + walletNotificationPage, + 'Sender Name', + '' + ); // test forward asset name is shown - await hasText(walletNotificationPage, 'Ethereum'); + await expect + .poll( + async () => + await hasText(walletNotificationPage, 'Ethereum') + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); // test forward asset id is shown await hasText(walletNotificationPage, shortAddress(await getBaseAssetId())); // test forward eth amount is correct diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts index 8d7b700f7..4b540f10e 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts @@ -81,7 +81,9 @@ test.describe('Forward Half Custom Asset', () => { 'Forward Half Custom Asset' ); await expectButtonToBeEnabled(forwardHalfCustomAssetButton); - await forwardHalfCustomAssetButton.click(); + await forwardHalfCustomAssetButton.click({ + delay: 1000, + }); const walletNotificationPage = await fuelWalletTestHelper.getWalletPopupPage(); diff --git a/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts index 4656ae499..7442cbe7d 100644 --- a/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts @@ -58,7 +58,9 @@ test.describe('Mint Assets', () => { const mintButton = getButtonByText(page, 'Mint', true); await expectButtonToBeEnabled(mintButton); - await mintButton.click(); + await mintButton.click({ + delay: 1000, + }); // test asset is correct const assetId = calculateAssetId(MAIN_CONTRACT_ID, await getBaseAssetId()); @@ -126,7 +128,9 @@ test.describe('Mint Assets', () => { const mintButton = getButtonByText(page, 'Mint Asset configuration'); await expectButtonToBeEnabled(mintButton); - await mintButton.click(); + await mintButton.click({ + delay: 1000, + }); // test asset is correct const walletNotificationPage = diff --git a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts index b12379a1d..63e0e071c 100644 --- a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts +++ b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts @@ -1,4 +1,4 @@ -import type { BrowserContext, Locator } from '@playwright/test'; +import type { BrowserContext, Locator, Page } from '@playwright/test'; import { expect } from '../fixtures'; import { FUEL_MNEMONIC, FUEL_WALLET_PASSWORD } from '../mocks'; @@ -142,8 +142,8 @@ export class FuelWalletTestHelper { if (!walletNotificationPage) { walletNotificationPage = await this.context.waitForEvent('page', { - predicate: (page) => page.url().includes('/popup'), - timeout: 5000, + predicate: (page) => page.url().includes('/popup.html?'), + timeout: 15000, }); } @@ -292,7 +292,9 @@ export class FuelWalletTestHelper { 'Add new network' ); await expectButtonToBeEnabled(addNewNetworkButton); - await addNewNetworkButton.click(); + await addNewNetworkButton.click({ + delay: 1000, + }); } async switchNetwork(chainName: string) { From b48e4174b605fb4481d81d6c55f3a8efca13221d Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:10:50 +0400 Subject: [PATCH 8/9] chore: increase timeout --- packages/app/playwright/commons/locator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/playwright/commons/locator.ts b/packages/app/playwright/commons/locator.ts index a5ab896ee..57adcb2c4 100644 --- a/packages/app/playwright/commons/locator.ts +++ b/packages/app/playwright/commons/locator.ts @@ -5,7 +5,7 @@ export function getByAriaLabel(page: Page, selector: string) { } export async function waitAriaLabel(page: Page, selector: string) { - return page.waitForSelector(`[aria-label="${selector}"]`, { timeout: 15000 }); + return page.waitForSelector(`[aria-label="${selector}"]`, { timeout: 30000 }); } export function getInputByName(page: Page, name: string) { From 5687938d7e4e23d0fb3add7c7124d8d448ccf95d Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Fri, 1 Nov 2024 16:13:07 +0400 Subject: [PATCH 9/9] chore: add click delay --- .../src/playwright-utils/fuelWalletTestHelper.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts index 0d410bf29..0fd88c98c 100644 --- a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts +++ b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts @@ -174,8 +174,7 @@ export class FuelWalletTestHelper { { timeout: 5000 } ) .toBeTruthy(); - await walletPage.waitForTimeout(2000); - await menuButton!.click(); + await menuButton!.click({ delay: 2000 }); const settingsButton = walletPage .getByRole('menuitem')