diff --git a/src/app/tabs/styles/test-tab-styles.js b/src/app/tabs/styles/test-tab-styles.js
index 09588d6661..df15f2a441 100644
--- a/src/app/tabs/styles/test-tab-styles.js
+++ b/src/app/tabs/styles/test-tab-styles.js
@@ -54,5 +54,8 @@ var css = csjs`
align-items: center;
white-space: nowrap;
}
+ .labelOnBtn {
+ border: hidden;
+ }
`
module.exports = css
diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js
index b363e128dd..271aec5a0b 100644
--- a/src/app/tabs/test-tab.js
+++ b/src/app/tabs/test-tab.js
@@ -164,7 +164,7 @@ module.exports = class TestTab extends ViewPlugin {
if (this.hasBeenStopped) {
this.testsSummary.appendChild(yo``)
}
-
+
const stopBtn = document.getElementById('runTestsTabStopAction')
const stopBtnLabel = document.getElementById('runTestsTabStopActionLabel')
stopBtnLabel.innerText = 'Stop'
@@ -236,7 +236,7 @@ module.exports = class TestTab extends ViewPlugin {
}
runTests () {
- this.hasBeenStopped = false;
+ this.hasBeenStopped = false
const stopBtn = document.getElementById('runTestsTabStopAction')
stopBtn.removeAttribute('disabled')
this.call('editor', 'clearAnnotations')
@@ -255,10 +255,20 @@ module.exports = class TestTab extends ViewPlugin {
}
updateGenerateFileAction (currentFile) {
- let el = yo``
- if (!currentFile) {
+ let el = yo``
+ if (
+ !currentFile ||
+ (currentFile && currentFile.split('.').pop().toLowerCase() !== 'sol')
+ ) {
el.setAttribute('disabled', 'disabled')
- el.setAttribute('title', 'No file selected')
+ el.setAttribute('title', 'No solidity file selected')
}
if (!this.generateFileActionElement) {
this.generateFileActionElement = el
@@ -270,20 +280,21 @@ module.exports = class TestTab extends ViewPlugin {
updateRunAction (currentFile) {
let el = yo`
-