fix flaky test

pull/5247/head
yann300 4 months ago committed by Aniket
parent b86ae2d214
commit 073cff510c
  1. 18
      apps/remix-ide-e2e/src/tests/terminal.test.ts

@ -363,16 +363,14 @@ module.exports = {
} }
` `
if (runMasterTests) { if (runMasterTests) {
const path = "//*[@class='view-line' and contains(.,'resolveENS') and contains(.,'view')]//span//span[contains(.,'(')]"
browser browser
// .clickLaunchIcon('udapp') // .clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork') .switchEnvironment('vm-mainnet-fork')
.clickLaunchIcon('filePanel') .clickLaunchIcon('filePanel')
.addFile('test_mainnet.sol', { content: script }) .addFile('test_mainnet.sol', { content: script })
.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 .pause(10000) // the parser need to parse the code
.useXpath() .useXpath()
.scrollToLine(16) .scrollToLine(16)
@ -396,15 +394,15 @@ module.exports = {
console.log("test running free function"); console.log("test running free function");
} }
` `
const path = "//*[@class='view-line' and contains(.,'runSomething') and contains(.,'view')]//span//span[contains(.,'(')]"
browser browser
.addFile('test.sol', { content: script }) .addFile('test.sol', { content: script })
.scrollToLine(3) .waitForElementVisible('#editorView')
const path = "//*[@class='view-line' and contains(.,'runSomething') and contains(.,'view')]//span//span[contains(.,'(')]" .pause(10000) // the parser need to parse the code
const pathRunFunction = `//li//*[@aria-label='Run the free function "runSomething"']`
browser.waitForElementVisible('#editorView')
.useXpath() .useXpath()
.scrollToLine(3)
.click(path) .click(path)
.pause(3000) // the parser need to parse the code
.perform(function () { .perform(function () {
const actions = this.actions({ async: true }); const actions = this.actions({ async: true });
return actions return actions

Loading…
Cancel
Save