Fix library deployment failing test for firefox

pull/1/head
ioedeveloper 5 years ago
parent 58abbd47a2
commit 212bd0fcbe
  1. 2
      src/app/ui/universal-dapp-ui.js
  2. 9
      test-browser/commands/getAddressAtPosition.js
  3. 2
      test-browser/helpers/init.js
  4. 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)
})

@ -22,7 +22,7 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {
}
function initModules (browser, callback) {
browser.pause(5000)
browser.pause(20000)
.click('#icon-panel div[plugin="pluginManager"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.pause(5000)

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

Loading…
Cancel
Save