Commit 36b501b8 authored by Rob Stupay's avatar Rob Stupay

update to tests/compiling.js

parent 121ffa83
...@@ -38,7 +38,7 @@ function runTests (browser, testData) { ...@@ -38,7 +38,7 @@ function runTests (browser, testData) {
.setValue('input[placeholder="uint8 _numProposals"]', '1') .setValue('input[placeholder="uint8 _numProposals"]', '1')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button')
.testFunction('delegate - transact (not payable)', '0x0571a2439ea58bd349dd130afb8aff62a33af14c06de0dbc3928519bdf13ce2e', .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`, `[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) {types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'}, null, null)
...@@ -66,7 +66,7 @@ function runTests (browser, testData) { ...@@ -66,7 +66,7 @@ function runTests (browser, testData) {
}) })
}) })
.clickLaunchIcon('run') .clickLaunchIcon('run')
.click('div[class^="udappClose"]') .click('button[class^="udappClose"]')
.perform((client, done) => { .perform((client, done) => {
console.log('ballot.abi') console.log('ballot.abi')
contractHelper.addFile(browser, 'ballot.abi', { content: ballotABI }, () => { contractHelper.addFile(browser, 'ballot.abi', { content: ballotABI }, () => {
...@@ -89,7 +89,7 @@ function runTests (browser, testData) { ...@@ -89,7 +89,7 @@ function runTests (browser, testData) {
.pause(500) .pause(500)
.perform((client, done) => { .perform((client, done) => {
console.log('delegate - transact (not payable)') console.log('delegate - transact (not payable)')
browser.waitForElementPresent('.instance:nth-of-type(2)').click('.instance:nth-of-type(2)').testFunction('delegate - transact (not payable)', '0xd3cd54e2f76f3993078ecf9e1b54a148def4520afc141a182293b3610bddf10f', browser.waitForElementPresent('.instance:nth-of-type(2)').click('.instance:nth-of-type(2) > div > button').testFunction('delegate - transact (not payable)', '0xd3cd54e2f76f3993078ecf9e1b54a148def4520afc141a182293b3610bddf10f',
`[vm]\nfrom:0xca3...a733c\nto:Ballot.delegate(address) 0x692...77b3a\nvalue:0 wei\ndata:0x5c1...4d2db\nlogs:0\nhash:0xd3c...df10f`, `[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, () => { done() }) {types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"'}, null, null, () => { done() })
}).end() }).end()
......
...@@ -41,7 +41,7 @@ function testSimpleContract (browser, callback) { ...@@ -41,7 +41,7 @@ function testSimpleContract (browser, callback) {
browser.clickLaunchIcon('run') browser.clickLaunchIcon('run')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button')
.click('#runTabView .instance div[class^="title"]') .click('#runTabView .instance div[class^="title"]')
.click('#runTabView .instance div[class^="title"]') .click('#runTabView .instance div[class^="title"]')
.testFunction('f - transact (not payable)', .testFunction('f - transact (not payable)',
...@@ -72,7 +72,7 @@ function testReturnValues (browser, callback) { ...@@ -72,7 +72,7 @@ function testReturnValues (browser, callback) {
browser.clickLaunchIcon('run') browser.clickLaunchIcon('run')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button')
.testFunction('retunValues1 - transact (not payable)', .testFunction('retunValues1 - transact (not payable)',
'0xc3660c7ab6899f196e77d3ab3749169e22c00ae7f1b8fe3af0ce54df49504019', '0xc3660c7ab6899f196e77d3ab3749169e22c00ae7f1b8fe3af0ce54df49504019',
`[vm]\nfrom:0xca3...a733c\nto:testReturnValues.retunValues1() 0x5e7...26e9f\nvalue:0 wei\ndata:0x9ed...59eb7\nlogs:0\nhash:0xc36...04019`, `[vm]\nfrom:0xca3...a733c\nto:testReturnValues.retunValues1() 0x5e7...26e9f\nvalue:0 wei\ndata:0x9ed...59eb7\nlogs:0\nhash:0xc36...04019`,
...@@ -110,7 +110,7 @@ function testInputValues (browser, callback) { ...@@ -110,7 +110,7 @@ function testInputValues (browser, callback) {
browser.clickLaunchIcon('run') browser.clickLaunchIcon('run')
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button')
.testFunction('inputValue1 - transact (not payable)', .testFunction('inputValue1 - transact (not payable)',
'0xf3265e3d9cd9299958bf81bed3cdfdd537942f85b9e0b95c5468c691d9396505', '0xf3265e3d9cd9299958bf81bed3cdfdd537942f85b9e0b95c5468c691d9396505',
`[vm]\nfrom:0xca3...a733c\nto:test.inputValue1(uint256,int256,string) 0x8c1...401f5\nvalue:0 wei\ndata:0xd69...00000\nlogs:0\nhash:0xf32...96505`, `[vm]\nfrom:0xca3...a733c\nto:test.inputValue1(uint256,int256,string) 0x8c1...401f5\nvalue:0 wei\ndata:0xd69...00000\nlogs:0\nhash:0xf32...96505`,
......
...@@ -85,7 +85,7 @@ function testAutoDeployLib (browser, callback) { ...@@ -85,7 +85,7 @@ function testAutoDeployLib (browser, callback) {
contractHelper.createContract(browser, '', () => { contractHelper.createContract(browser, '', () => {
contractHelper.getAddressAtPosition(browser, 0, (address) => { contractHelper.getAddressAtPosition(browser, 0, (address) => {
console.log(address) console.log(address)
browser.waitForElementPresent('.instance:nth-of-type(2)').click('.instance:nth-of-type(2)').perform(() => { browser.waitForElementPresent('.instance:nth-of-type(2)').click('.instance:nth-of-type(2) > div > button').perform(() => {
contractHelper.testConstantFunction(browser, address, 'get - call', '', '0: uint256: 45', () => { callback(null, browser) }) contractHelper.testConstantFunction(browser, address, 'get - call', '', '0: uint256: 45', () => { callback(null, browser) })
}) })
}) })
...@@ -146,7 +146,7 @@ function checkDeployShouldSucceed (browser, address, callback) { ...@@ -146,7 +146,7 @@ function checkDeployShouldSucceed (browser, address, callback) {
contractHelper.createContract(browser, '', () => { contractHelper.createContract(browser, '', () => {
contractHelper.getAddressAtPosition(browser, 1, (address) => { contractHelper.getAddressAtPosition(browser, 1, (address) => {
browser.waitForElementPresent('.instance:nth-of-type(3)') browser.waitForElementPresent('.instance:nth-of-type(3)')
.click('.instance:nth-of-type(3)').perform(() => { .click('.instance:nth-of-type(3) > div > button').perform(() => {
contractHelper.testConstantFunction(browser, address, 'get - call', '', '0: uint256: 45', () => { callback(null, browser) }) contractHelper.testConstantFunction(browser, address, 'get - call', '', '0: uint256: 45', () => { callback(null, browser) })
}) })
}) })
......
...@@ -14,9 +14,9 @@ module.exports = { ...@@ -14,9 +14,9 @@ module.exports = {
.click('div[class^="cardContainer"] i[class^="arrow"]') .click('div[class^="cardContainer"] i[class^="arrow"]')
.click('#runTabView .runtransaction') .click('#runTabView .runtransaction')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button')
.waitForElementPresent('.instance:nth-of-type(3)') .waitForElementPresent('.instance:nth-of-type(3)')
.click('.instance:nth-of-type(3)') .click('.instance:nth-of-type(3) > div > button')
.clickFunction('getInt - call') .clickFunction('getInt - call')
.clickFunction('getAddress - call') .clickFunction('getAddress - call')
.clickFunction('getFromLib - call') .clickFunction('getFromLib - call')
...@@ -38,7 +38,7 @@ module.exports = { ...@@ -38,7 +38,7 @@ module.exports = {
}) })
}) })
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)') .click('.instance:nth-of-type(2) > div > button')
.perform((client, done) => { .perform((client, done) => {
browser.clickFunction('set - transact (not payable)', {types: 'uint256 _p', values: '34'}) browser.clickFunction('set - transact (not payable)', {types: 'uint256 _p', values: '34'})
.click('i.savetransaction').modalFooterOKClick().getEditorValue(function (result) { .click('i.savetransaction').modalFooterOKClick().getEditorValue(function (result) {
......
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