From 66ffc8f70417f9b576a7f7796bda1a68a2170ae6 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Fri, 12 Jun 2020 16:27:49 +0200 Subject: [PATCH] adding custom path to Unit Testing --- src/app/tabs/test-tab.js | 50 +++++++++++++++++++++++++-------- src/app/tabs/testTab/testTab.js | 39 ++++++++++++++----------- 2 files changed, 60 insertions(+), 29 deletions(-) diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index abc9986a1d..468a9df57e 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -281,7 +281,7 @@ module.exports = class TestTab extends ViewPlugin { const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel') stopBtnLabel.innerText = 'Stop' if (this.data.selectedTests.length !== 0) { - const runBtn = document.getElementById('runTestsTabRunAction') + const runBtn = document.getElemenstById('runTestsTabRunAction') runBtn.removeAttribute('disabled') } this.areTestsRunning = false @@ -351,6 +351,11 @@ module.exports = class TestTab extends ViewPlugin { }) } + updateCurrentPath(e) { + this.testTabLogic.setCurrentPath(e.target.value) + // todo check if path exists if not create one. + } + runTests () { this.areTestsRunning = true this.hasBeenStopped = false @@ -386,20 +391,22 @@ module.exports = class TestTab extends ViewPlugin { } updateGenerateFileAction (currentFile) { - let el = yo`` + let el = yo` + + ` if ( !currentFile || (currentFile && currentFile.split('.').pop().toLowerCase() !== 'sol') ) { - el.setAttribute('disabled', 'disabled') - el.setAttribute('title', 'No solidity file selected') + //el.setAttribute('disabled', 'disabled') + //el.setAttribute('title', 'No solidity file selected') } if (!this.generateFileActionElement) { this.generateFileActionElement = el @@ -487,6 +494,24 @@ module.exports = class TestTab extends ViewPlugin { this.testsOutput = yo`