Commit fd67fd3f authored by LianaHus's avatar LianaHus Committed by Aniket

disable buttons when not able to use

parent f465d462
...@@ -170,6 +170,8 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -170,6 +170,8 @@ module.exports = class TestTab extends ViewPlugin {
const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel') const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel')
stopBtnLabel.innerText = 'Stop' stopBtnLabel.innerText = 'Stop'
stopBtn.setAttribute('disabled', 'disabled') stopBtn.setAttribute('disabled', 'disabled')
const runBtn = document.getElementById('runTestsTabRunAction')
runBtn.removeAttribute('disabled')
} }
async testFromPath (path) { async testFromPath (path) {
...@@ -240,6 +242,8 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -240,6 +242,8 @@ module.exports = class TestTab extends ViewPlugin {
this.hasBeenStopped = false this.hasBeenStopped = false
const stopBtn = document.getElementById('runTestsTabStopAction') const stopBtn = document.getElementById('runTestsTabStopAction')
stopBtn.removeAttribute('disabled') stopBtn.removeAttribute('disabled')
const runBtn = document.getElementById('runTestsTabRunAction')
runBtn.setAttribute('disabled', 'disabled')
this.call('editor', 'clearAnnotations') this.call('editor', 'clearAnnotations')
this.testsOutput.innerHTML = '' this.testsOutput.innerHTML = ''
this.testsSummary.innerHTML = '' this.testsSummary.innerHTML = ''
...@@ -253,6 +257,10 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -253,6 +257,10 @@ module.exports = class TestTab extends ViewPlugin {
this.hasBeenStopped = true this.hasBeenStopped = true
const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel') const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel')
stopBtnLabel.innerText = 'Stopping...' stopBtnLabel.innerText = 'Stopping...'
const stopBtn = document.getElementById('runTestsTabStopAction')
stopBtn.setAttribute('disabled', 'disabled')
const runBtn = document.getElementById('runTestsTabRunAction')
runBtn.setAttribute('disabled', 'disabled')
} }
updateGenerateFileAction (currentFile) { updateGenerateFileAction (currentFile) {
......
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