|
|
@ -77,7 +77,10 @@ module.exports = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should highlight source code': function (browser: NightwatchBrowser) { |
|
|
|
'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) |
|
|
|
browser.addFile('sourcehighlight.js', sourcehighlightScript) |
|
|
|
|
|
|
|
.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript) |
|
|
|
|
|
|
|
.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript) |
|
|
|
.openFile('browser/sourcehighlight.js') |
|
|
|
.openFile('browser/sourcehighlight.js') |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|
.editorScroll('down', 60) |
|
|
|
.editorScroll('down', 60) |
|
|
@ -90,20 +93,26 @@ module.exports = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should remove 1 highlight from source code': function (browser: NightwatchBrowser) { |
|
|
|
'Should remove 1 highlight from source code': function (browser: NightwatchBrowser) { |
|
|
|
browser.addFile('removeSourcehighlightScript.js', removeSourcehighlightScript) |
|
|
|
browser.waitForElementVisible('li[key="browser/removeSourcehighlightScript.js"]') |
|
|
|
.openFile('browser/removeSourcehighlightScript.js') |
|
|
|
.click('li[key="browser/removeSourcehighlightScript.js"]') |
|
|
|
|
|
|
|
.pause(2000) |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|
.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('.highlightLine32') |
|
|
|
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') |
|
|
|
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') |
|
|
|
.checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)') |
|
|
|
.checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should remove all highlights from source code': function (browser: NightwatchBrowser) { |
|
|
|
'Should remove all highlights from source code': function (browser: NightwatchBrowser) { |
|
|
|
browser.addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript) |
|
|
|
browser.waitForElementVisible('li[key="browser/removeAllSourcehighlightScript.js"]') |
|
|
|
.openFile('browser/removeAllSourcehighlightScript.js') |
|
|
|
.click('li[key="browser/removeAllSourcehighlightScript.js"]') |
|
|
|
|
|
|
|
.pause(2000) |
|
|
|
.executeScript('remix.exeCurrent()') |
|
|
|
.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('.highlightLine32') |
|
|
|
.waitForElementNotPresent('.highlightLine40') |
|
|
|
.waitForElementNotPresent('.highlightLine40') |
|
|
|
.waitForElementNotPresent('.highlightLine50') |
|
|
|
.waitForElementNotPresent('.highlightLine50') |
|
|
|