diff --git a/package.json b/package.json index 791de96a81..3fcd8992cf 100644 --- a/package.json +++ b/package.json @@ -182,6 +182,7 @@ "nightwatch_local_publishContract": "nightwatch ./test-browser/tests/publishContract.js --config nightwatch.js --env chrome ", "nightwatch_local_generalSettings": "nightwatch ./test-browser/tests/generalSettings.js --config nightwatch.js --env chrome ", "nightwatch_local_fileExplorer": "nightwatch ./test-browser/tests/fileExplorer.js --config nightwatch.js --env chrome ", + "nightwatch_local_debugger": "nightwatch ./test-browser/tests/debugger.js --config nightwatch.js --env chrome ", "onchange": "onchange build/app.js -- npm-run-all lint", "prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build", "remixd": "remixd -s ./contracts --remix-ide http://127.0.0.1:8080", diff --git a/src/app/ui/multiParamManager.js b/src/app/ui/multiParamManager.js index bf6795674a..1f5211bc86 100644 --- a/src/app/ui/multiParamManager.js +++ b/src/app/ui/multiParamManager.js @@ -116,14 +116,14 @@ class MultiParamManager { title = this.funABI.type === 'receive' ? '(receive)' : '(fallback)' } - this.basicInputField = yo`` + this.basicInputField = yo`` this.basicInputField.setAttribute('placeholder', this.inputs) this.basicInputField.setAttribute('title', this.inputs) var onClick = () => { this.clickCallBack(this.funABI.inputs, this.basicInputField.value) } - let funcButton = yo`` + let funcButton = yo`` this.contractActionsContainerSingle = yo`
${funcButton} @@ -142,7 +142,7 @@ class MultiParamManager { } } - var expandedButton = yo`` + var expandedButton = yo`` this.contractActionsContainerMulti = yo`
diff --git a/src/app/ui/txLogger.js b/src/app/ui/txLogger.js index 2301ccbc06..4ab75bdc34 100644 --- a/src/app/ui/txLogger.js +++ b/src/app/ui/txLogger.js @@ -215,7 +215,7 @@ function renderKnownTransaction (self, data, blockchain) { ${checkTxStatus(data.receipt, txType)} ${context(self, {from, to, data}, blockchain)}
-
+
diff --git a/src/app/ui/universal-dapp-ui.js b/src/app/ui/universal-dapp-ui.js index 59381cbd23..975a6a46fd 100644 --- a/src/app/ui/universal-dapp-ui.js +++ b/src/app/ui/universal-dapp-ui.js @@ -60,7 +60,7 @@ UniversalDAppUI.prototype.renderInstanceFromABI = function (contractABI, address var shortAddress = helper.shortenAddress(address) var title = yo`
-
diff --git a/test-browser/tests/debugger.js b/test-browser/tests/debugger.js new file mode 100644 index 0000000000..e09fb36aee --- /dev/null +++ b/test-browser/tests/debugger.js @@ -0,0 +1,73 @@ +'use strict' +var init = require('../helpers/init') +var sauce = require('./sauce') + +module.exports = { + + before: function (browser, done) { + init(browser, done) + }, + + '@sources': function () { + return sources + }, + + 'Should launch debugger': function (browser) { + browser.addFile('blah.sol', sources[0]['browser/blah.sol']) + .clickLaunchIcon('udapp') + .waitForElementPresent('*[title="Deploy - transact (not payable)"]') + .click('*[title="Deploy - transact (not payable)"]') + .waitForElementPresent('*[data-shared="txLoggerDebugButton"]:nth-of-type(1)') + .click('*[data-shared="txLoggerDebugButton"]:nth-of-type(1)') + .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') + }, + + 'Should debug failing transaction': function (browser) { + browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]') + .clickLaunchIcon('udapp') + .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') + .click('*[data-id="universalDappUiTitleExpander"]') + .waitForElementPresent('*[data-shared="multiParamManagerBasicInputField"]:nth-of-type(1)') + .sendKeys('*[data-shared="multiParamManagerBasicInputField"]:nth-of-type(1)', '"toast", 999') + .pause(100000) + .end() + }, + + tearDown: sauce +} + +var sources = [ + { + 'browser/blah.sol': { + content: ` + pragma solidity >=0.4.22 <0.6.0; + + contract Kickstarter { + + enum State { Started, Completed } + + struct Project { + address owner; + string name; + uint goal; + State state; + } + + Project[] public projects; + + constructor() public { + + } + + function createProject(string memory name, uint goal) public { + Project storage project = projects[projects.length]; + project.name = name; + project.owner = msg.sender; + project.state = State.Started; + project.goal = goal; + } + } + ` + } + } +]