Commit 3dd99aaa authored by yann300's avatar yann300

small changes

parent d3f9ae14
......@@ -9,7 +9,7 @@
"browser-test-remote-ie": "nightwatch --config nightwatch.js --env ie",
"browser-test-remote-chrome": "nightwatch --config nightwatch.js --env chrome",
"browser-test-remote-safari": "nightwatch --config nightwatch.js --env safari",
"build": "mkdir -p build; browserify src/index.js -o build/app.js",
"build": "mkdir -p build; browserify src/index.js -g yo-yoify -o build/app.js",
"lint": "semistandard",
"serve": "http-server ."
},
......@@ -31,7 +31,8 @@
"web3": "^0.16.0",
"webworkify": "^1.2.1",
"yo-yo": "^1.2.2",
"yo-yoify": "^3.3.0"
"yo-yoify": "^3.3.0",
"ethereum-remix": "0.0.2-alpha.0.0.3"
},
"repository": {
"type": "git",
......@@ -57,8 +58,5 @@
"nightwatch.js",
"ci/sauceDisconnect.js"
]
},
"dependencies": {
"ethereum-remix": "0.0.2-alpha.0.0.1"
}
}
......@@ -92,9 +92,9 @@ var run = function () {
// ----------------- tabbed menu -------------------
$('#options li').click(function (ev) {
var $el = $(this);
document.querySelector('ul#options').selectTab($el);
selectTab($el);
});
document.querySelector('ul#options').selectTab = function (el) {
var selectTab = function (el) {
var match = /[a-z]+View/.exec(el.get(0).className);
if (!match) return;
var cls = match[0];
......@@ -427,6 +427,9 @@ var run = function () {
var executionContext = new ExecutionContext();
var transactionDebugger = new Debugger(executionContext, '#debugger');
transactionDebugger.onDebugRequested = function () {
selectTab($('ul#options li.debugView'));
};
var renderer = new Renderer(editor, executionContext, updateFiles, transactionDebugger);
var compiler = new Compiler(editor, renderer, queryParams, handleGithubCall, $('#output'), getHidingRHP, updateFiles);
executionContext.setCompiler(compiler);
......
var $ = require('jquery');
var Remix = require('ethereum-remix');
function Debugger (executionContext, _id) {
function Debugger (_executionContext, _id) {
this.el = document.querySelector(_id);
this.debugger = new Remix.Debugger(executionContext.web3());
this.debugger = new Remix.Debugger(_executionContext.web3());
this.el.appendChild(this.debugger.render());
this.web3 = executionContext.web3();
this.debugView = $('ul#options li.debugView');
this.web3 = _executionContext.web3();
Debugger.prototype.debug = function (receipt) {
document.querySelector('ul#options').selectTab(this.debugView);
if (this.onDebugRequested) this.onDebugRequested();
var self = this;
this.web3.eth.getTransaction(receipt.transactionHash, function (error, tx) {
if (!error) {
......
......@@ -3,6 +3,7 @@ module.exports = {
browser
.url('http://127.0.0.1:8080')
.waitForElementPresent('#debugger', 10000)
.expect.element('#debugger #slider').to.be.present;
.waitForElementPresent('#debugger #slider', 10000)
.end();
}
};
......@@ -4,6 +4,7 @@ module.exports = {
.url('http://127.0.0.1:8080')
.waitForElementVisible('.newFile', 10000)
.click('.newFile')
.pause('10000')
.assert.containsText('.active', 'Untitled')
.end();
}
......
......@@ -3,6 +3,7 @@ module.exports = {
browser
.url('http://127.0.0.1:8080')
.waitForElementVisible('#righthand-panel', 10000)
.pause('10000')
.assert.containsText('#righthand-panel', 'Solidity version')
.end();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment