|
|
|
@ -48,6 +48,7 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
|
|
|
|
|
appManager.event.on('activate', (name) => { |
|
|
|
|
if (name === 'solidity') this.updateRunAction() |
|
|
|
|
console.log('solidity is activated') |
|
|
|
|
}) |
|
|
|
|
appManager.event.on('deactivate', (name) => { |
|
|
|
|
if (name === 'solidity') this.updateRunAction() |
|
|
|
@ -79,6 +80,7 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
if (!isSolidityActive) { |
|
|
|
|
await this.call('manager', 'activatePlugin', 'solidity') |
|
|
|
|
} |
|
|
|
|
this.updateRunAction() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onDeactivation () { |
|
|
|
@ -625,7 +627,7 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
return this.generateFileActionElement |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async updateRunAction (currentFile) { |
|
|
|
|
updateRunAction (currentFile) { |
|
|
|
|
const el = yo` |
|
|
|
|
<button id="runTestsTabRunAction" title="Run tests" data-id="testTabRunTestsTabRunAction" class="w-50 btn btn-primary" onclick="${() => this.runTests()}"> |
|
|
|
|
<span class="fas fa-play ml-2"></span> |
|
|
|
@ -639,7 +641,6 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
|
el.setAttribute('title', 'No solidity file selected') |
|
|
|
|
} else { |
|
|
|
|
el.setAttribute('title', 'The "Solidity Plugin" should be activated') |
|
|
|
|
await this.call('manager', 'activatePlugin', 'solidity') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!this.runActionElement) { |
|
|
|
|