From f9c229b155d5c6585f94583afbad4e4e777f0c40 Mon Sep 17 00:00:00 2001 From: yann300 Date: Sun, 14 Apr 2019 10:31:23 +0200 Subject: [PATCH] display 'running tests' label --- src/app/tabs/test-tab.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index 0021004a41..faa4365f09 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -136,12 +136,14 @@ module.exports = class TestTab extends BaseApi { } runTest (testFilePath, callback) { + this.loading.hidden = false this.fileManager.fileProviderOf(testFilePath).get(testFilePath, (error, content) => { if (error) return var runningTest = {} runningTest[testFilePath] = { content } remixTests.runTestSources(runningTest, (result) => { this.testCallback(result) }, (_err, result, cb) => { this.resultsCallback(_err, result, cb) }, (error, result) => { this.updateFinalResult(error, result, testFilePath) + this.loading.hidden = true callback(error) }, (url, cb) => { return this.compileTab.compileTabLogic.importFileCb(url, cb) @@ -150,6 +152,7 @@ module.exports = class TestTab extends BaseApi { } runTests () { + this.loading.hidden = false this.testsOutput.innerHTML = '' this.testsSummary.innerHTML = '' var tests = this.data.selectedTests @@ -159,7 +162,8 @@ module.exports = class TestTab extends BaseApi { render () { this.testsOutput = yo`` this.testsSummary = yo`` - + this.loading = yo`Running tests...` + this.loading.hidden = true var el = yo`
@@ -187,7 +191,7 @@ module.exports = class TestTab extends BaseApi {
${this.testList}
-
Results:
+
Results:${this.loading}
${this.testsOutput} ${this.testsSummary}