diff --git a/.github/workflows/e2e_test.yml b/.github/workflows/e2e_test.yml index 1ebfa80f4..23c361f03 100644 --- a/.github/workflows/e2e_test.yml +++ b/.github/workflows/e2e_test.yml @@ -4,6 +4,7 @@ on: push: pull_request: merge_group: + workflow_dispatch: # Ensure that only a single job or workflow using the same concurrency group will run at a time. # see https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow diff --git a/tests/e2e/src/eth_getCode.test.js b/tests/e2e/src/eth_getCode.test.js index 186ba60c1..a8b85ba32 100644 --- a/tests/e2e/src/eth_getCode.test.js +++ b/tests/e2e/src/eth_getCode.test.js @@ -61,8 +61,10 @@ describe("eth_getCode", () => { await testType.type("1"); // 0: none params 1: common params to request 2: more params await param1.type(testDataInfo.accountAddress); await param2.type(testDataInfo.hexBlockNumber); - await goto.check(page, "0x"); - }); + // Running eth_getCode_4 and eth_getCode_9 simultaneously causes axonweb3/axon/issues/1579 + // temporary solution: just wait 20 seconds after executing eth_getCode_4 + await goto.checkAndWait(page, "0x", 20); + }, 25000); /** * param1: real account address but not exist diff --git a/tests/e2e/src/goto.js b/tests/e2e/src/goto.js index d08f6e0fd..b76bc1a2e 100644 --- a/tests/e2e/src/goto.js +++ b/tests/e2e/src/goto.js @@ -20,6 +20,14 @@ const goto = { await currentpage.waitForFunction(() => document.getElementById("ret").innerText !== ""); await expect(currentpage.$eval("#ret", (e) => e.innerText)).resolves.toMatch(expectedValue); }, + + async checkAndWait(currentpage, expectedValue, second) { + await currentpage.click(goto.pageIds.btnId); + await currentpage.waitForFunction(() => document.getElementById("ret").innerText !== ""); + await new Promise((resolve) => { setTimeout(resolve, second * 1000); }); + await expect(currentpage.$eval("#ret", (e) => e.innerText)).resolves.toMatch(expectedValue); + }, + // get the value async value(currentpage) { await currentpage.click(goto.pageIds.btnId);