final e2e tests for compilation error check

pull/1602/head^2
aniket-engg 3 years ago committed by Aniket
parent 0ef7e55ede
commit 55f7424751
  1. 17
      apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts

@ -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() {

Loading…
Cancel
Save