From 7ea464d09af32b2f6cb25e51c130f7f8c75b91f3 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 28 Apr 2020 18:46:00 +0200 Subject: [PATCH] border for result and some small style changes --- src/app/tabs/styles/test-tab-styles.js | 4 --- src/app/tabs/test-tab.js | 37 +++++++++++++------------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/app/tabs/styles/test-tab-styles.js b/src/app/tabs/styles/test-tab-styles.js index e194533601..ce267b02bf 100644 --- a/src/app/tabs/styles/test-tab-styles.js +++ b/src/app/tabs/styles/test-tab-styles.js @@ -21,10 +21,6 @@ var css = csjs` max-height: 300px; overflow-y: auto; } - .outputTitle { - font-weight: bold; - margin: 10px 0; - } .summaryTitle { font-weight: bold; } diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index caeffc0d64..695eb307c8 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -136,8 +136,8 @@ module.exports = class TestTab extends ViewPlugin { this.rawFileName = result.filename this.runningTestFileName = this.cleanFileName(this.rawFileName, this.testSuite) this.outputHeader = yo` -
- ${this.testSuite}
${this.rawFileName} +
+ ${this.testSuite} from ${this.rawFileName}
` this.testsOutput.appendChild(this.outputHeader) @@ -149,10 +149,9 @@ module.exports = class TestTab extends ViewPlugin { `) } else if (result.type === 'testFailure') { this.testsOutput.appendChild(yo` -
- ✘ ${result.value} -
- "${result.errMsg}" +
+ ✘ ${result.value} + "${result.errMsg}"
`) } @@ -175,28 +174,30 @@ module.exports = class TestTab extends ViewPlugin { const label = yo`
+ title="All contract tests passed" + > PASS
` this.outputHeader && yo.update(this.outputHeader, yo` -
- ${label} ${this.testSuite}
${this.rawFileName} +
+ ${label} ${this.testSuite} from ${this.rawFileName}
`) } else { const label = yo`
+ title="At least one contract test failed" + > FAIL
` this.outputHeader && yo.update(this.outputHeader, yo` -
- ${label} ${this.testSuite}
${this.rawFileName} +
+ ${label} ${this.testSuite} from ${this.rawFileName}
`) } @@ -223,10 +224,10 @@ module.exports = class TestTab extends ViewPlugin { if (result.totalPassing > 0 && result.totalFailing > 0) { this.testsOutput.appendChild(yo` -
- ${result.totalPassing} passing, - ${result.totalFailing} failing - (${totalTime}s) +
+ ${result.totalPassing} passing + ${result.totalFailing} failing + Total time: ${totalTime}s
`) } else if (result.totalPassing > 0 && result.totalFailing <= 0) { @@ -255,12 +256,10 @@ module.exports = class TestTab extends ViewPlugin { this.runningTestFileName = this.cleanFileName(filename, error.context) this.outputHeader = document.querySelector(`#${this.runningTestFileName}`) const isFailingLabel = document.querySelector(`.failed_${this.runningTestFileName}`) - if (!isFailingLabel) this.setHeader(false) }) this.testsOutput.appendChild(yo`
-

`) @@ -478,7 +477,7 @@ module.exports = class TestTab extends ViewPlugin { render () { this.onActivationInternal() - this.testsOutput = yo`