From 43e7db7d0543d8334b18ce44abc11b5962215925 Mon Sep 17 00:00:00 2001 From: ninabreznik Date: Mon, 18 Jun 2018 16:34:37 +0100 Subject: [PATCH] Push new file to allTest and run only selectedTests --- src/app/tabs/test-tab.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index 81971a394c..9898869f0e 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -29,7 +29,7 @@ module.exports = class TestTab { const self = this var container = yo`
` self.data.allTests = getTests() - self.data.selectedTests = self.data.allTests + self.data.selectedTests = [...self.data.allTests] function append (container, txt) { var child = yo`
${txt}
` 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``)