Commit 55f74247 authored by aniket-engg's avatar aniket-engg Committed by Aniket

final e2e tests for compilation error check

parent 0ef7e55e
......@@ -90,7 +90,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="testTabTestsExecutionStopped"]', 'The test execution has been stopped', 60000)
},
'Should fail on compilation': function (browser: NightwatchBrowser) {
'Should fail on compilation, open file on error click, not disappear error': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]')
.addFile('tests/compilationError_test.sol', sources[0]['compilationError_test.sol'])
.click('div[title="default_workspace/tests/compilationError_test.sol"] span[class="close"]')
......@@ -102,16 +102,9 @@ module.exports = {
.waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'SyntaxError: No visibility specified', 120000)
.waitForElementContainsText('*[data-id="testTabTestsExecutionStoppedError"]', 'The test execution has been stopped because of error(s) in your test file', 120000)
.click('*[data-id="tests/compilationError_test.sol"]')
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`
contract failOnCompilation {
fallback() {
}
}`) !== -1,
'current displayed content is not from the compilationError_test source code')
})
.pause(20000)
.pause(1000)
.getEditorValue((content) => browser.assert.ok(content.indexOf(`contract failOnCompilation {`) !== -1))
.verify.elementPresent('*[data-id="tests/compilationError_test.sol"]')
},
'Should fail on deploy': function (browser: NightwatchBrowser) {
......@@ -451,7 +444,7 @@ const sources = [
},
'compilationError_test.sol': {
content: `
pragma solidity ^0.7.0;
pragma solidity ^0.8.0;
contract failOnCompilation {
fallback() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment