From 9348f48b14438aec456d8de48669d2391fbec4e9 Mon Sep 17 00:00:00 2001 From: Muhammad-Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:16:22 +0200 Subject: [PATCH] try fix cypress test with firefox --- .../test/integration/block/rpc.getTransactionCount.test.ts | 3 ++- packages/web3-eth/test/integration/helper.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts b/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts index f0bc4d5c2ca..e51b4b5d5f3 100644 --- a/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts +++ b/packages/web3-eth/test/integration/block/rpc.getTransactionCount.test.ts @@ -105,6 +105,7 @@ describe('rpc with block', () => { from: acc.address, value: '0x1', times: 1, + waitAfterEachSend: 500, }); const data = { pending: 'pending', @@ -124,7 +125,7 @@ describe('rpc with block', () => { from: acc.address, value: '0x1', times: count, - waitAfterEachSend: 200, + waitAfterEachSend: 500, }); const receiptAfter = res[res.length - 1]; const dataAfter = { diff --git a/packages/web3-eth/test/integration/helper.ts b/packages/web3-eth/test/integration/helper.ts index aa388d5504d..0504b95b5fb 100644 --- a/packages/web3-eth/test/integration/helper.ts +++ b/packages/web3-eth/test/integration/helper.ts @@ -62,6 +62,7 @@ export const sendFewTxes = async ({ }), ); if (waitAfterEachSend) { + // to ensure the block got mined on dev environment // eslint-disable-next-line no-await-in-loop await new Promise(resolve => { setTimeout(resolve, waitAfterEachSend);