|
|
@ -19,15 +19,15 @@ const profile = { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
module.exports = class TestTab extends ViewPlugin { |
|
|
|
module.exports = class TestTab extends ViewPlugin { |
|
|
|
constructor (fileManager, filePanel, compileTab, appManager) { |
|
|
|
constructor (fileManager, filePanel, compileTab, appManager, renderer, editor) { |
|
|
|
super(profile) |
|
|
|
super(profile) |
|
|
|
this.compileTab = compileTab |
|
|
|
this.compileTab = compileTab |
|
|
|
this._view = { el: null } |
|
|
|
this._view = { el: null } |
|
|
|
this.compileTab = compileTab |
|
|
|
|
|
|
|
this.fileManager = fileManager |
|
|
|
this.fileManager = fileManager |
|
|
|
this.filePanel = filePanel |
|
|
|
this.filePanel = filePanel |
|
|
|
this.data = {} |
|
|
|
this.data = {} |
|
|
|
this.appManager = appManager |
|
|
|
this.appManager = appManager |
|
|
|
|
|
|
|
this.renderer = renderer |
|
|
|
appManager.event.on('activate', (name) => { |
|
|
|
appManager.event.on('activate', (name) => { |
|
|
|
if (name === 'solidity') this.updateRunAction(fileManager.currentFile()) |
|
|
|
if (name === 'solidity') this.updateRunAction(fileManager.currentFile()) |
|
|
|
}) |
|
|
|
}) |
|
|
@ -117,10 +117,10 @@ module.exports = class TestTab extends ViewPlugin { |
|
|
|
cb() |
|
|
|
cb() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateFinalResult (_err, result, filename) { |
|
|
|
updateFinalResult (_errors, result, filename) { |
|
|
|
this.testsSummary.hidden = false |
|
|
|
this.testsSummary.hidden = false |
|
|
|
if (_err) { |
|
|
|
if (_errors) { |
|
|
|
this.testsSummary.appendChild(yo`<div class="${css.testFailureSummary} text-danger" >${_err.message}</div>`) |
|
|
|
_errors.forEach((err) => this.renderer.error(err.formattedMessage || err.message, this.testsSummary, {type: err.severity}) ) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
this.testsSummary.appendChild(yo`<div class=${css.summaryTitle}> ${filename} </div>`) |
|
|
|
this.testsSummary.appendChild(yo`<div class=${css.summaryTitle}> ${filename} </div>`) |
|
|
|