From 566634810418e1826c774f067cdf969261bd71f3 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 23 Nov 2023 15:50:15 +0100 Subject: [PATCH] fix e2e --- apps/remix-ide-e2e/src/tests/terminal.test.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 1a40d0b747..df65afaec8 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -373,7 +373,7 @@ module.exports = { function addr(bytes32 node) public virtual view returns (address); } - function resolve() public view returns(address) { + function resolveENS() view { // Same address for Mainet, Ropsten, Rinkerby, Gorli and other networks; ENS ens = ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e); (,bytes32 node) = NameEncoder.dnsEncodeName("vitalik.eth"); @@ -382,14 +382,19 @@ module.exports = { } ` browser + .clickLaunchIcon('udapp') + .switchEnvironment('vm-mainnet-fork') + .clickLaunchIcon('filePanel') .addFile('test_mainnet.sol', { content: script }) - .scrollToLine(15) - const path = "//*[@class='view-line' and contains(.,'resolve') and contains(.,'view')]//span//span[contains(.,'(')]" - const pathRunFunction = `//li//*[@aria-label='Run the free function "resolve"']` - browser.waitForElementVisible('#editorView') + + const path = "//*[@class='view-line' and contains(.,'resolveENS') and contains(.,'view')]//span//span[contains(.,'(')]" + const pathRunFunction = `//li//*[@aria-label='Run the free function "resolveENS"']` + browser.waitForElementVisible('#editorView') + //.waitForElementPresent(pathRunFunction) + .pause(10000) // the parser need to parse the code .useXpath() + .scrollToLine(16) .click(path) - .pause(3000) // the parser need to parse the code .perform(function () { const actions = this.actions({ async: true }); return actions