Push new file to allTest and run only selectedTests

pull/1/head
ninabreznik 6 years ago committed by yann300
parent b5cd9f5428
commit f7a98897c1
  1. 9
      src/app/tabs/test-tab.js

@ -29,7 +29,7 @@ module.exports = class TestTab {
const self = this
var container = yo`<div class=${css.testsOutput} id="tests"></div>`
self.data.allTests = getTests()
self.data.selectedTests = self.data.allTests
self.data.selectedTests = [...self.data.allTests]
function append (container, txt) {
var child = yo`<div>${txt}</div>`
container.appendChild(child)
@ -102,6 +102,13 @@ module.exports = class TestTab {
self.data.allTests.push(file)
})
// self._events.filePanel.register('fileRenamed', (oldName, newName, isFolder) => {
// debugger
// self.data.allTests = self.data.allTests.filter(e => e != oldName)
// self.data.selectedTests = self.data.selectedTests.filter(e => e !== oldName)
// if (/.(_test.sol)$/.exec(newName)) self.data.allTests.push(newName)
// })
function listTests () {
var tests = self.data.allTests
return tests.map(test => yo`<label><input onchange =${(e) => toggleCheckbox(e, test)} type="checkbox" checked="true">${test} </label>`)

Loading…
Cancel
Save