Skip to content

Commit

Permalink
fix remove instance
Browse files Browse the repository at this point in the history
  • Loading branch information
yann300 committed May 15, 2018
1 parent fefb939 commit 29a9fc2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ci/browser_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions nightwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions src/universal-dapp-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
4 changes: 4 additions & 0 deletions test-browser/tests/units/testRecorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 29a9fc2

Please sign in to comment.