diff --git a/src/app/execution/txFormat.js b/src/app/execution/txFormat.js index aba5f32825..9d8e32e110 100644 --- a/src/app/execution/txFormat.js +++ b/src/app/execution/txFormat.js @@ -159,11 +159,7 @@ module.exports = { var json = {} for (i = 0; i < outputTypes.length; i++) { var name = fnabi.outputs[i].name - if (name.length > 0) { - json[outputTypes[i] + ' ' + name] = decodedObj[i] - } else { - json[outputTypes[i]] = decodedObj[i] - } + json[i] = outputTypes[i] + ': ' + (name ? name + ' ' + decodedObj[i] : decodedObj[i]) } return json diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 29345149e6..f9342ea59c 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -210,7 +210,7 @@ class Terminal { ${self._view.dropdown} - + ${self._view.icon} diff --git a/test-browser/tests/compiling.js b/test-browser/tests/compiling.js index 6b44a87027..1606b1d0fc 100644 --- a/test-browser/tests/compiling.js +++ b/test-browser/tests/compiling.js @@ -6,7 +6,13 @@ var sauce = require('./sauce') var sources = { 'sources': { 'browser/Untitled.sol': `pragma solidity ^0.4.0; - contract TestContract { function f() returns (uint) { return 8; } }` + contract TestContract { function f() returns (uint) { return 8; } + function g() returns (uint, string, bool, uint) { + uint payment = 345; + bool payed = true; + string memory comment = "comment_comment_"; + uint month = 4; + return (payment, comment, payed, month); } }` } } @@ -35,18 +41,18 @@ function runTests (browser) { .waitForElementPresent('#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"]') .assert.containsText('#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"]', '[vm] from:0xca3...a733c, to:browser/Untitled.sol:TestContract.f() 0x692...77b3a, value:0 wei, data:0x261...21ff0, 0 logs, hash:0xa17...523bc') .click('#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"] button[class^="details"]') - .assert.containsText('#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"] table[class^="txTable"] #decodedoutput', '"uint256": "8"') + .assert.containsText('#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"] table[class^="txTable"] #decodedoutput', `{ + "0": "uint256: 8" +}`) + .click('.instance button[title="g - transact (not payable)"]') + .waitForElementPresent('#editor-container div[class^="terminal"] span[id="tx0xb1532162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92781"]') + .click('#editor-container div[class^="terminal"] span[id="tx0xb1532162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92781"] button[class^="details"]') + .assert.containsText('#editor-container div[class^="terminal"] span[id="tx0xb1532162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92781"] table[class^="txTable"] #decodedoutput', `{ + "0": "uint256: 345", + "1": "string: comment_comment_", + "2": "bool: true", + "3": "uint256: 4" +}`) .end() - /* - @TODO: need to check now the return value of the function - .waitForElementPresent('.output .returned') - .assert.containsText('.output .returned', '0x0000000000000000000000000000000000000000000000000000000000000008') - .execute(function () { - document.querySelector('.output .decoded li').scrollIntoView() - }, [], function () { - browser.assert.containsText('.output .decoded li', 'uint256: 8') - .end() - }) - */ }) }