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

use curent selecting before Unit Testing plugin activation

parent 11178b2c
...@@ -62,7 +62,10 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -62,7 +62,10 @@ module.exports = class TestTab extends ViewPlugin {
this.updateTestFileList() this.updateTestFileList()
}) })
this.fileManager.events.on('currentFileChanged', (file, provider) => { this.fileManager.events.on('currentFileChanged', (file, provider) => this.updateForNewCurrent(file))
}
updateForNewCurrent (file) {
this.updateGenerateFileAction(file) this.updateGenerateFileAction(file)
if (!this.areTestsRunning) this.updateRunAction(file) if (!this.areTestsRunning) this.updateRunAction(file)
this.testTabLogic.getTests((error, tests) => { this.testTabLogic.getTests((error, tests) => {
...@@ -72,7 +75,6 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -72,7 +75,6 @@ module.exports = class TestTab extends ViewPlugin {
this.updateTestFileList(tests) this.updateTestFileList(tests)
if (!this.testsOutput || !this.testsSummary) return if (!this.testsOutput || !this.testsSummary) return
}) })
})
} }
listTests () { listTests () {
...@@ -413,6 +415,7 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -413,6 +415,7 @@ module.exports = class TestTab extends ViewPlugin {
</div> </div>
</div> </div>
` `
this.updateForNewCurrent(this.fileManager.currentFile())
if (!this._view.el) this._view.el = el if (!this._view.el) this._view.el = el
return el return el
} }
......
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