clean up test-tab

pull/3094/head
Iuri Matias 7 years ago committed by yann300
parent 6d35283dc2
commit da472f1d77
  1. 21
      src/app/tabs/test-tab.js

@ -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 () {
remixTests.runTestSources(contractSources) let contractSources = api.getAllSources()
} 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
}) })

Loading…
Cancel
Save