Commit 7d612e2b authored by lianahus's avatar lianahus Committed by Liana Husikyan

cleaning old results og SUT plugin

parent 599d79f0
...@@ -76,6 +76,7 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -76,6 +76,7 @@ module.exports = class TestTab extends ViewPlugin {
this.updateGenerateFileAction() this.updateGenerateFileAction()
if (!this.areTestsRunning) this.updateRunAction(file) if (!this.areTestsRunning) this.updateRunAction(file)
this.updateTestFileList() this.updateTestFileList()
this.clearResults()
this.testTabLogic.getTests((error, tests) => { this.testTabLogic.getTests((error, tests) => {
if (error) return tooltip(error) if (error) return tooltip(error)
this.data.allTests = tests this.data.allTests = tests
...@@ -434,21 +435,26 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -434,21 +435,26 @@ module.exports = class TestTab extends ViewPlugin {
this.uiPathList.appendChild(yo`<option>${this.inputPath.value}</option>`) this.uiPathList.appendChild(yo`<option>${this.inputPath.value}</option>`)
} }
clearResults () {
yo.update(this.resultStatistics, yo`<span></span>`)
this.call('editor', 'clearAnnotations')
this.testsOutput.innerHTML = ''
this.testsOutput.hidden = true
this.testsExecutionStopped.hidden = true
this.testsExecutionStoppedError.hidden = true
}
runTests () { runTests () {
this.areTestsRunning = true this.areTestsRunning = true
this.hasBeenStopped = false this.hasBeenStopped = false
this.readyTestsNumber = 0 this.readyTestsNumber = 0
this.runningTestsNumber = this.data.selectedTests.length this.runningTestsNumber = this.data.selectedTests.length
yo.update(this.resultStatistics, this.createResultLabel())
const stopBtn = document.getElementById('runTestsTabStopAction') const stopBtn = document.getElementById('runTestsTabStopAction')
stopBtn.removeAttribute('disabled') stopBtn.removeAttribute('disabled')
const runBtn = document.getElementById('runTestsTabRunAction') const runBtn = document.getElementById('runTestsTabRunAction')
runBtn.setAttribute('disabled', 'disabled') runBtn.setAttribute('disabled', 'disabled')
this.call('editor', 'clearAnnotations') this.clearResults()
this.testsOutput.innerHTML = '' yo.update(this.resultStatistics, this.createResultLabel())
this.testsOutput.hidden = true
this.testsExecutionStopped.hidden = true
this.testsExecutionStoppedError.hidden = true
const tests = this.data.selectedTests const tests = this.data.selectedTests
if (!tests) return if (!tests) return
this.resultStatistics.hidden = tests.length === 0 this.resultStatistics.hidden = tests.length === 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment