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

use curent selecting before Unit Testing plugin activation

parent 11178b2c
...@@ -62,16 +62,18 @@ module.exports = class TestTab extends ViewPlugin { ...@@ -62,16 +62,18 @@ 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))
this.updateGenerateFileAction(file) }
if (!this.areTestsRunning) this.updateRunAction(file)
this.testTabLogic.getTests((error, tests) => { updateForNewCurrent (file) {
if (error) return tooltip(error) this.updateGenerateFileAction(file)
this.data.allTests = tests if (!this.areTestsRunning) this.updateRunAction(file)
this.data.selectedTests = [...this.data.allTests] this.testTabLogic.getTests((error, tests) => {
this.updateTestFileList(tests) if (error) return tooltip(error)
if (!this.testsOutput || !this.testsSummary) return this.data.allTests = tests
}) this.data.selectedTests = [...this.data.allTests]
this.updateTestFileList(tests)
if (!this.testsOutput || !this.testsSummary) return
}) })
} }
...@@ -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