commit
e5d96d1181
@ -0,0 +1,20 @@ |
||||
var remix = require('ethereum-remix'); |
||||
|
||||
function Debugger (_executionContext, _id) { |
||||
this.el = document.querySelector(_id); |
||||
this.debugger = new remix.Debugger(_executionContext.web3()); |
||||
this.el.appendChild(this.debugger.render()); |
||||
this.web3 = _executionContext.web3(); |
||||
|
||||
Debugger.prototype.debug = function (receipt) { |
||||
if (this.onDebugRequested) this.onDebugRequested(); |
||||
var self = this; |
||||
this.web3.eth.getTransaction(receipt.transactionHash, function (error, tx) { |
||||
if (!error) { |
||||
self.debugger.debug(tx); |
||||
} |
||||
}); |
||||
}; |
||||
} |
||||
|
||||
module.exports = Debugger; |
@ -0,0 +1,9 @@ |
||||
module.exports = { |
||||
'Debugger Render': function (browser) { |
||||
browser |
||||
.url('http://127.0.0.1:8080') |
||||
.waitForElementPresent('#debugger', 10000) |
||||
.waitForElementPresent('#debugger #slider', 10000) |
||||
.end(); |
||||
} |
||||
}; |
Loading…
Reference in new issue