|
|
|
@ -14,14 +14,8 @@ module.exports = { |
|
|
|
|
'@sources': function () { |
|
|
|
|
return sources |
|
|
|
|
}, |
|
|
|
|
'Ballot': function (browser) { |
|
|
|
|
runTests(browser) |
|
|
|
|
}, |
|
|
|
|
tearDown: sauce |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function runTests (browser, testData) { |
|
|
|
|
browser |
|
|
|
|
'Deploy Ballot': function (browser) { |
|
|
|
|
browser |
|
|
|
|
.waitForElementVisible('#icon-panel', 10000) |
|
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
|
.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot']) |
|
|
|
@ -33,7 +27,10 @@ function runTests (browser, testData) { |
|
|
|
|
.testFunction('delegate - transact (not payable)', '0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e', |
|
|
|
|
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0x057...3ce2e`, |
|
|
|
|
{types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'}, null, null) |
|
|
|
|
.pause(500) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Debug Ballot / delegate': function (browser) { |
|
|
|
|
browser.pause(500) |
|
|
|
|
.click('span#tx0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e button[class^="debug"]') |
|
|
|
|
.pause(2000) |
|
|
|
|
.clickLaunchIcon('debugger') |
|
|
|
@ -43,7 +40,10 @@ function runTests (browser, testData) { |
|
|
|
|
.pause(1000) |
|
|
|
|
.checkVariableDebug('soliditystate', stateCheck) |
|
|
|
|
.checkVariableDebug('soliditylocals', localsCheck) |
|
|
|
|
.clickLaunchIcon('run') |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Access Ballot via at address': function (browser) { |
|
|
|
|
browser.clickLaunchIcon('run') |
|
|
|
|
.click('button[class^="udappClose"]') |
|
|
|
|
.addFile('ballot.abi', { content: ballotABI }) |
|
|
|
|
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false) |
|
|
|
@ -56,6 +56,8 @@ function runTests (browser, testData) { |
|
|
|
|
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0xd3c...df10f`, |
|
|
|
|
{types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'}, null, null) |
|
|
|
|
.end() |
|
|
|
|
}, |
|
|
|
|
tearDown: sauce |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var localsCheck = { |
|
|
|
|