From ed67ba756acfc93ceee8f96573d4b335f00dfb48 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 15 Oct 2024 16:08:09 +0200 Subject: [PATCH] fix(tooling-ci): Improve Explorer e2e tests reliability with 'waitForTransaction' (#3298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Begoña Álvarez de la Cruz --- apps/explorer/playwright.config.ts | 2 +- apps/explorer/tests/utils/localnet.ts | 1 + sdk/typescript/test/e2e/utils/setup.ts | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/explorer/playwright.config.ts b/apps/explorer/playwright.config.ts index 8abf750b06d..c9c2d48aafd 100644 --- a/apps/explorer/playwright.config.ts +++ b/apps/explorer/playwright.config.ts @@ -18,7 +18,7 @@ import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { testDir: './tests', /* Maximum time one test can run for. */ - timeout: 30 * 1000, + timeout: 60 * 1000, expect: { /** * Maximum time expect() should wait for the condition to be met. diff --git a/apps/explorer/tests/utils/localnet.ts b/apps/explorer/tests/utils/localnet.ts index a03f865afa3..a87ab04e61f 100644 --- a/apps/explorer/tests/utils/localnet.ts +++ b/apps/explorer/tests/utils/localnet.ts @@ -36,6 +36,7 @@ export async function split_coin(address: string) { showEffects: true, showEvents: true, }, + requestType: 'WaitForLocalExecution', }); return result; diff --git a/sdk/typescript/test/e2e/utils/setup.ts b/sdk/typescript/test/e2e/utils/setup.ts index 6f5befa330b..6867ebb4d16 100644 --- a/sdk/typescript/test/e2e/utils/setup.ts +++ b/sdk/typescript/test/e2e/utils/setup.ts @@ -326,11 +326,9 @@ export async function payIota( showEffects: true, showObjectChanges: true, }, + requestType: 'WaitForLocalExecution', }); - await client.waitForTransaction({ - digest: txn.digest, - }); expect(txn.effects?.status.status).toEqual('success'); return txn; }