Fixed failing e2e tests

pull/526/head
ioedeveloper 4 years ago
parent d7204fafd0
commit ccd3adb6af
  1. 21
      apps/remix-ide-e2e/src/tests/editor.test.ts

@ -77,7 +77,10 @@ module.exports = {
},
'Should highlight source code': function (browser: NightwatchBrowser) {
// include all files here because switching between plugins in side-panel removes highlight
browser.addFile('sourcehighlight.js', sourcehighlightScript)
.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript)
.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript)
.openFile('browser/sourcehighlight.js')
.executeScript('remix.exeCurrent()')
.editorScroll('down', 60)
@ -90,20 +93,26 @@ module.exports = {
},
'Should remove 1 highlight from source code': function (browser: NightwatchBrowser) {
browser.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript)
.openFile('browser/removeSourcehighlightScript.js')
browser.waitForElementVisible('li[key="browser/removeSourcehighlightScript.js"]')
.click('li[key="browser/removeSourcehighlightScript.js"]')
.pause(2000)
.executeScript('remix.exeCurrent()')
.openFile('browser/3_Ballot.sol')
.waitForElementVisible('li[key="browser/3_Ballot.sol"]')
.click('li[key="browser/3_Ballot.sol"]')
.pause(2000)
.waitForElementNotPresent('.highlightLine32')
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)')
.checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)')
},
'Should remove all highlights from source code': function (browser: NightwatchBrowser) {
browser.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript)
.openFile('browser/removeAllSourcehighlightScript.js')
browser.waitForElementVisible('li[key="browser/removeAllSourcehighlightScript.js"]')
.click('li[key="browser/removeAllSourcehighlightScript.js"]')
.pause(2000)
.executeScript('remix.exeCurrent()')
.openFile('browser/3_Ballot.sol')
.waitForElementVisible('li[key="browser/3_Ballot.sol"]')
.click('li[key="browser/3_Ballot.sol"]')
.pause(2000)
.waitForElementNotPresent('.highlightLine32')
.waitForElementNotPresent('.highlightLine40')
.waitForElementNotPresent('.highlightLine50')

Loading…
Cancel
Save