format copied content

pull/3094/head
yann300 7 years ago
parent ea9520badd
commit 8baee48d93
  1. 5
      src/app/ui/copy-to-clipboard.js
  2. 2
      test-browser/tests/compiling.js

@ -24,6 +24,11 @@ module.exports = function copyToClipboard (getContent) {
event.stopPropagation() event.stopPropagation()
var copiableContent = getContent() var copiableContent = getContent()
if (copiableContent) { // module `copy` keeps last copied thing in the memory, so don't show tooltip if nothing is copied, because nothing was added to memory if (copiableContent) { // module `copy` keeps last copied thing in the memory, so don't show tooltip if nothing is copied, because nothing was added to memory
try {
if (typeof copiableContent !== 'string') {
copiableContent = JSON.stringify(copiableContent, null, '\t')
}
} catch (e) {}
copy(copiableContent) copy(copiableContent)
addTooltip(event) addTooltip(event)
} }

@ -35,6 +35,8 @@ function testSimpleContract (browser, callback) {
browser.click('.runView') browser.click('.runView')
.click('#runTabView div[class^="create"]') .click('#runTabView div[class^="create"]')
.pause(500) .pause(500)
.click('#runTabView .instance div[class^="title"]')
.click('#runTabView .instance div[class^="title"]')
.testFunction('f - transact (not payable)', .testFunction('f - transact (not payable)',
'0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc', '0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc',
'[vm] from:0xca3...a733c, to:TestContract.f() 0x692...77b3a, value:0 wei, data:0x261...21ff0, 0 logs, hash:0xa17...523bc', null, '[vm] from:0xca3...a733c, to:TestContract.f() 0x692...77b3a, value:0 wei, data:0x261...21ff0, 0 logs, hash:0xa17...523bc', null,

Loading…
Cancel
Save