Commit aadb56cf authored by chriseth's avatar chriseth Committed by Alex Beregszaszi

Add compilation test.

parent 21d1a5db
module.exports = {
'Compile Simple Contract': function (browser) {
browser
.url('http://127.0.0.1:8080')
// It compiles the default contract
.waitForElementPresent('.contract .create', 3000000)
// Change the text and wait for recompile
.clearValue('#input textarea')
.setValue('#input textarea', `
pragma solidity ^0.4.0;
contract TestContract { function f() returns (uint) { return 8; } }
`)
.pause(3000)
.assert.containsText('.contract .title', 'TestContract')
.click('.create .constructor .call')
.waitForElementPresent('.instance .call[title="f"]')
.click('.instance .call[title="f"]')
.waitForElementPresent('.output .returned')
.assert.containsText('.output .returned', '0x0000000000000000000000000000000000000000000000000000000000000008')
.assert.containsText('.output .decoded li', 'uint256: 8')
.end()
}
}
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
browser browser
.waitForElementVisible('.newFile', 10000) .waitForElementVisible('.newFile', 10000)
.click('.newFile') .click('.newFile')
.pause('10000') .pause(500)
.assert.containsText('.active', 'Untitled') .assert.containsText('.active', 'Untitled')
.end() .end()
}, },
......
...@@ -10,7 +10,6 @@ module.exports = { ...@@ -10,7 +10,6 @@ module.exports = {
'Smoke test': function (browser) { 'Smoke test': function (browser) {
browser browser
.waitForElementVisible('#righthand-panel', 10000) .waitForElementVisible('#righthand-panel', 10000)
.pause('10000')
.assert.containsText('#righthand-panel', 'Solidity version') .assert.containsText('#righthand-panel', 'Solidity version')
.end() .end()
}, },
......
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