|
|
@ -1,15 +1,13 @@ |
|
|
|
var yo = require('yo-yo') |
|
|
|
var yo = require('yo-yo') |
|
|
|
|
|
|
|
|
|
|
|
var css = require('./styles/test-tab-styles') |
|
|
|
var css = require('./styles/test-tab-styles') |
|
|
|
|
|
|
|
|
|
|
|
var remixTests = require('remix-tests') |
|
|
|
var remixTests = require('remix-tests') |
|
|
|
|
|
|
|
|
|
|
|
function runTests () { |
|
|
|
function testTabView (api) { |
|
|
|
let contractSources = window.api.getAllSources() |
|
|
|
let runTests = function () { |
|
|
|
|
|
|
|
let contractSources = api.getAllSources() |
|
|
|
remixTests.runTestSources(contractSources) |
|
|
|
remixTests.runTestSources(contractSources) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function testTabView () { |
|
|
|
|
|
|
|
return yo` |
|
|
|
return yo` |
|
|
|
<div class="${css.testTabView} "id="testView"> |
|
|
|
<div class="${css.testTabView} "id="testView"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
@ -24,20 +22,15 @@ function testTabView () { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function testTab (api = {}, events = {}, opts = {}) { |
|
|
|
function testTab (api = {}, events = {}, opts = {}) { |
|
|
|
window.api = api |
|
|
|
let el = testTabView(api) |
|
|
|
console.dir('------') |
|
|
|
|
|
|
|
console.dir(api) |
|
|
|
|
|
|
|
let el = testTabView('') |
|
|
|
|
|
|
|
let gitterIsLoaded = false |
|
|
|
let gitterIsLoaded = false |
|
|
|
|
|
|
|
|
|
|
|
// api.compilerContracts.getSources()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
events.app.register('tabChanged', (tabName) => { |
|
|
|
events.app.register('tabChanged', (tabName) => { |
|
|
|
if (tabName !== 'test' || gitterIsLoaded) { |
|
|
|
if (tabName !== 'test' || gitterIsLoaded) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
yo.update(el, testTabView()) |
|
|
|
yo.update(el, testTabView(api)) |
|
|
|
el.style.display = 'block' |
|
|
|
el.style.display = 'block' |
|
|
|
gitterIsLoaded = true |
|
|
|
gitterIsLoaded = true |
|
|
|
}) |
|
|
|
}) |
|
|
|