Skip to content

Commit

Permalink
Merge pull request #2677 from ethereum/publish-metadata
Browse files Browse the repository at this point in the history
Added Metadata Contract Name To Success Modal
  • Loading branch information
yann300 authored Mar 31, 2020
2 parents bffc543 + 4fd44cc commit f6ce838
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/app/tabs/compile-tab.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/app/ui/modal-dialog-custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ var yo = require('yo-yo')
var css = require('./styles/modal-dialog-custom-styles')

module.exports = {
alert: function (text) {
return modal('', yo`<div>${text}</div>`, null, { label: null })
alert: function (title, text) {
if (text) return modal(title, yo`<div>${text}</div>`, null, { label: null })
return modal('', yo`<div>${title}</div>`, null, { label: null })
},
prompt: function (title, text, inputValue, ok, cancel, focus) {
return prompt(title, text, false, inputValue, ok, cancel, focus)
Expand Down
4 changes: 2 additions & 2 deletions test-browser/tests/publishContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
.verifyContracts(['Ballot'])
.click('#publishOnIpfs')
.getModalBody((value, done) => {
if (value.indexOf('Metadata published successfully.') === -1) browser.assert.fail('ipfs deploy failed', '', '')
if (value.indexOf('Metadata of "ballot" was published successfully.') === -1) browser.assert.fail('ipfs deploy failed', '', '')
if (value.indexOf('dweb:/ipfs') === -1) browser.assert.fail('ipfs deploy failed', '', '')
done()
})
Expand All @@ -28,7 +28,7 @@ module.exports = {
browser
.click('#publishOnSwarm')
.getModalBody((value, done) => {
if (value.indexOf('Metadata published successfully.') === -1) browser.assert.fail('swarm deploy failed', '', '')
if (value.indexOf('Metadata of "ballot" was successfully.') === -1) browser.assert.fail('swarm deploy failed', '', '')
if (value.indexOf('bzz') === -1) browser.assert.fail('swarm deploy failed', '', '')
done()
})
Expand Down

0 comments on commit f6ce838

Please sign in to comment.