Commit cbd02330 authored by ioedeveloper's avatar ioedeveloper

Fixed library deployment test

parent 9b9fa8c4
......@@ -15,7 +15,7 @@ class GetAddressAtPosition extends EventEmitter {
}
function getAddressAtPosition (browser: NightwatchBrowser, index: number, callback: (pos: string) => void) {
browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]')
browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]', 60000)
.execute(function (index) {
const deployedContracts = document.querySelectorAll('*[data-shared="universalDappUiInstance"]')
const id = deployedContracts[index].getAttribute('id')
......
......@@ -27,7 +27,7 @@ function testConstantFunction (browser: NightwatchBrowser, address: string, fnFu
})
.click('.instance button[title="' + fnFullName + '"]')
.pause(1000)
.waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]')
.waitForElementPresent('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]', 60000)
.scrollInto('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]')
.assert.containsText('#instance' + address + ' div[class^="contractActionsContainer"] div[class^="value"]', expectedOutput).perform(() => {
cb()
......
......@@ -80,7 +80,7 @@ function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFuncti
.getText('div[class^="terminal"]', (value) => {
console.log('value: ', value)
})
.assert.containsText('div[class^="terminal"]', '<address> is not a valid address')
.waitForElementContainsText('div[class^="terminal"]', '<address> is not a valid address', 60000)
.perform(() => { callback() })
}
......@@ -100,14 +100,14 @@ function checkDeployShouldSucceed (browser: NightwatchBrowser, address: string,
.clickLaunchIcon('udapp')
.selectContract('test') // deploy lib
.createContract('')
.getAddressAtPosition(1, (address) => {
.getAddressAtPosition(0, (address) => {
addressRef = address
})
.waitForElementPresent('.instance:nth-of-type(3)')
.click('.instance:nth-of-type(3) > div > button')
.waitForElementPresent('.instance')
.click('.instance > div > button')
.perform(() => {
browser
.testConstantFunction(addressRef, 'get - call', null, '0:\nuint256: 45')
.testConstantFunction(addressRef, 'getInt - call', null, '0:\nuint256: 45')
.perform(() => { callback() })
})
}
......
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