align checkboxes

pull/5370/head
LianaHus 5 years ago committed by Aniket
parent 26f68dc755
commit 946f97cf54
  1. 6
      src/app/tabs/staticanalysis/staticAnalysisView.js
  2. 19
      src/app/tabs/test-tab.js

@ -162,17 +162,17 @@ staticAnalysisView.prototype.renderModules = function () {
var category = groupedModules[categoryId]
var entriesDom = category.map((item, i) => {
return yo`
<div class="d-flex">
<div class="form-check">
<input id="staticanalysismodule_${categoryId}_${i}"
type="checkbox"
class="staticAnalysisItem"
class="form-check-input staticAnalysisItem"
name="staticanalysismodule"
index=${item._index}
checked="true"
style="vertical-align:bottom"
onclick="${function (event) { self.checkModule(event) }}"
>
<label for="staticanalysismodule_${categoryId}_${i}" class="pl-2 mb-1">
<label for="staticanalysismodule_${categoryId}_${i}" class="form-check-label mb-1">
${item.name}
${item.description}
</label>

@ -75,7 +75,7 @@ module.exports = class TestTab extends ViewPlugin {
listTests () {
return this.data.allTests.map(
test => yo`
<div class="singleTestLabel d-flex py-1">
<div class="singleTestLabel d-flex align-items-center py-1">
<input class="singleTest" id="singleTest${test}" onchange=${(e) => this.toggleCheckbox(e.target.checked, test)} type="checkbox" checked="true">
<label class="text-nowrap pl-2 mb-0" for="singleTest${test}">${test}</label>
</div>`
@ -146,17 +146,18 @@ module.exports = class TestTab extends ViewPlugin {
return
}
this.testsSummary.appendChild(yo`<div class=${css.summaryTitle}> ${filename} </div>`)
if (result.totalPassing > 0) {
this.testsSummary.appendChild(yo`<div class="text-success" >${result.totalPassing} passing (${result.totalTime}s)</div>`)
this.testsSummary.appendChild(yo`<br>`)
}
if (result) {
if (result.totalPassing > 0) {
this.testsSummary.appendChild(yo`<div class="text-success">${result.totalPassing} passing (${result.totalTime}s)</div>`)
this.testsSummary.appendChild(yo`<br>`)
}
if (result.totalFailing > 0) {
this.testsSummary.appendChild(yo`<div class="text-danger" >${result.totalFailing} failing</div>`)
this.testsSummary.appendChild(yo`<div class="text-danger">${result.totalFailing} failing</div>`)
this.testsSummary.appendChild(yo`<br>`)
}
result.errors.forEach((error, index) => {
this.testsSummary.appendChild(yo`<div class="text-danger" >${error.context} - ${error.value} </div>`)
this.testsSummary.appendChild(yo`<div class="text-danger">${error.context} - ${error.value} </div>`)
this.testsSummary.appendChild(yo`<div class="${css.testFailureSummary} text-danger" >${error.message}</div>`)
this.testsSummary.appendChild(yo`<br>`)
})
@ -245,7 +246,7 @@ module.exports = class TestTab extends ViewPlugin {
const tests = this.data.selectedTests
if (!tests) return
this.loading.hidden = tests.length === 0
async.eachOfSeries(tests, (value, key, callback) => { this.runTest(value, callback) })
async.eachOfSeries(tests, (value, key, callback) => { if (this.hasBeenStopped) return; this.runTest(value, callback) })
}
stopTests () {
@ -325,7 +326,7 @@ module.exports = class TestTab extends ViewPlugin {
selectAll () {
return yo`
<div class="d-flex mx-3 pb-2 mt-2 border-bottom">
<div class="d-flex align-items-center mx-3 pb-2 mt-2 border-bottom">
<input id="checkAllTests"
type="checkbox"
data-id="testTabCheckAllTests"

Loading…
Cancel
Save