Commit ebae4c36 authored by Liana Husikyan's avatar Liana Husikyan Committed by LianaHus

Update test-tab.js

parent 92b68fe7
...@@ -154,13 +154,11 @@ module.exports = class TestTab { ...@@ -154,13 +154,11 @@ module.exports = class TestTab {
function checkAll (event) { function checkAll (event) {
let checkBoxes = document.querySelectorAll('.singleTest') let checkBoxes = document.querySelectorAll('.singleTest')
const checkboxesLabels = document.querySelectorAll('.singleTestLabel') const checkboxesLabels = document.querySelectorAll('.singleTestLabel')
const selectionsCount = document.querySelectorAll('.singleTest:checked').length
// checks/unchecks all // checks/unchecks all
for (let i = 0; i < checkBoxes.length; i++) { for (let i = 0; i < checkBoxes.length; i++) {
checkBoxes[i].checked = !selectionsCount checkBoxes[i].checked = event.target.checked
toggleCheckbox(!selectionsCount, checkboxesLabels[i].innerText) toggleCheckbox(event.target.checkedt, checkboxesLabels[i].innerText)
} }
event.target.checked = !selectionsCount
} }
var runTests = function () { var runTests = function () {
......
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