parent
74af512b93
commit
2e642cce20
@ -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; |
||||
} |
||||
} |
||||
` |
||||
} |
||||
} |
||||
] |
Loading…
Reference in new issue