fix remove instance

pull/1/head
yann300 7 years ago
parent fefb939a8c
commit 29a9fc2e3c
  1. 2
      ci/browser_tests.sh
  2. 4
      nightwatch.js
  3. 9
      src/universal-dapp-ui.js
  4. 4
      test-browser/tests/units/testRecorder.js

@ -42,7 +42,7 @@ done
npm run nightwatch_remote_chrome || TEST_EXITCODE=1
npm run nightwatch_remote_firefox || TEST_EXITCODE=1
npm run nightwatch_remote_safari || TEST_EXITCODE=1
# npm run nightwatch_remote_safari || TEST_EXITCODE=1
# npm run nightwatch_remote_ie || TEST_EXITCODE=1
# npm run nightwatch_remote_parallel || TEST_EXITCODE=1

@ -53,8 +53,8 @@ module.exports = {
'desiredCapabilities': {
'browserName': 'safari',
'javascriptEnabled': true,
'platform': 'OS X 10.11',
'version': '10.0',
'platform': 'macOS 10.13',
'version': '11.0',
'acceptSslCerts': true,
'build': 'build-' + buildId,
'tunnel-identifier': 'browsersolidity_tests_' + buildId

@ -54,14 +54,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address
function remove () {
instance.remove()
var instanceContainer = document.querySelector('[class^="instanceContainer"]')
if (instanceContainer.children.length === 1) {
var noInstancesText = yo`
<div class="${css.noInstancesText}">
Currently you have no contract instances to interact with.
</div>`
instanceContainer.appendChild(noInstancesText)
}
// @TODO perhaps add a callack here to warn the caller that the instance has been removed
}
function toggleClass () {

@ -12,6 +12,10 @@ module.exports = {
.click('.runView')
.click('div[class^="cardContainer"] i[class^="arrow"]')
.click('#runTabView .runtransaction')
.waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2)')
.waitForElementPresent('.instance:nth-of-type(3)')
.click('.instance:nth-of-type(3)')
.clickFunction('getInt - call')
.clickFunction('getAddress - call')
.clickFunction('getFromLib - call')

Loading…
Cancel
Save