Merge pull request #2725 from ethereum/firefox-libraryDeployment

Fix Failing Library Deployment Test
pull/1/head
yann300 5 years ago committed by GitHub
commit 565ac1124e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/app/ui/universal-dapp-ui.js
  2. 9
      test-browser/commands/getAddressAtPosition.js
  3. 1
      test-browser/tests/libraryDeployment.js

@ -54,7 +54,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
let self = this
address = (address.slice(0, 2) === '0x' ? '' : '0x') + address.toString('hex')
address = ethJSUtil.toChecksumAddress(address)
var instance = yo`<div class="instance run-instance border-dark ${css.instance} ${css.hidesub}" id="instance${address}"></div>`
var instance = yo`<div class="instance run-instance border-dark ${css.instance} ${css.hidesub}" id="instance${address}" data-shared="universalDappUiInstance"></div>`
const context = this.blockchain.context()
var shortAddress = helper.shortenAddress(address)

@ -14,9 +14,12 @@ class GetAddressAtPosition extends EventEmitter {
}
function getAddressAtPosition (browser, index, callback) {
index = index + 2
browser.execute(function (index) {
return document.querySelector('.instance:nth-of-type(' + index + ')').getAttribute('id').replace('instance', '')
browser.waitForElementPresent('*[data-shared="universalDappUiInstance"]')
.execute(function (index) {
const deployedContracts = document.querySelectorAll('*[data-shared="universalDappUiInstance"]')
const id = deployedContracts[index].getAttribute('id')
return id.replace('instance', '')
}, [index], function (result) {
callback(result.value)
})

@ -52,6 +52,7 @@ module.exports = {
})
})
})
.end()
},
tearDown: sauce
}

Loading…
Cancel
Save