|
|
|
@ -9,13 +9,14 @@ const sources = [ |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
|
'@disabled': true, |
|
|
|
|
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
|
|
|
|
init(browser, done, null, false) |
|
|
|
|
}, |
|
|
|
|
'@sources': function () { |
|
|
|
|
return sources |
|
|
|
|
}, |
|
|
|
|
'Compile Ballot with compiler version 0.4.11': function (browser: NightwatchBrowser) { |
|
|
|
|
'Compile Ballot with compiler version 0.4.11 #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
@ -26,7 +27,7 @@ module.exports = { |
|
|
|
|
.testContracts('Untitled.sol', sources[0]['Untitled.sol'], ['Ballot']) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Deploy Ballot': function (browser: NightwatchBrowser) { |
|
|
|
|
'Deploy Ballot #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser.pause(500) |
|
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
|
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') |
|
|
|
@ -42,7 +43,7 @@ module.exports = { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Debug Ballot / delegate': function (browser: NightwatchBrowser) { |
|
|
|
|
'Debug Ballot / delegate #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser.pause(500) |
|
|
|
|
.debugTransaction(1) |
|
|
|
|
.pause(2000) |
|
|
|
@ -55,26 +56,37 @@ module.exports = { |
|
|
|
|
.checkVariableDebug('callstackpanel', ['0x692a70D2e424a56D2C6C27aA97D1a86395877b3A']) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Access Ballot via at address': function (browser: NightwatchBrowser) { |
|
|
|
|
'Access Ballot via at address #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser.clickLaunchIcon('udapp') |
|
|
|
|
.click('*[data-id="universalDappUiUdappClose"]') |
|
|
|
|
.addFile('ballot.abi', { content: ballotABI }) |
|
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
|
.click({ |
|
|
|
|
selector: '*[data-id="deployAndRunClearInstances"]', |
|
|
|
|
abortOnFailure: false, |
|
|
|
|
suppressNotFoundErrors: true, |
|
|
|
|
}) |
|
|
|
|
// we are not changing the visibility for not checksumed contracts
|
|
|
|
|
// .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3B', true, false)
|
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) |
|
|
|
|
.pause(500) |
|
|
|
|
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) |
|
|
|
|
.waitForElementVisible({ |
|
|
|
|
locateStrategy: 'xpath', |
|
|
|
|
selector: "//*[@id='instance0x692a70D2e424a56D2C6C27aA97D1a86395877b3A']" |
|
|
|
|
}) |
|
|
|
|
.clickInstance(0) |
|
|
|
|
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) |
|
|
|
|
.testFunction('last', |
|
|
|
|
{ |
|
|
|
|
status: 'true Transaction mined and execution succeed', |
|
|
|
|
status: 'false Transaction mined but execution failed', |
|
|
|
|
'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' } |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Deploy and use Ballot using external web3': function (browser: NightwatchBrowser) { |
|
|
|
|
'Add Ballot #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.addFile('Untitled.sol', sources[0]['Untitled.sol']) |
|
|
|
|
}, |
|
|
|
|
'Deploy and use Ballot using external web3 #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.openFile('Untitled.sol') |
|
|
|
|
.clickLaunchIcon('udapp') |
|
|
|
|