diff --git a/src/app/staticanalysis/staticAnalysisView.js b/src/app/staticanalysis/staticAnalysisView.js index 70be1cf655..f34ed76173 100644 --- a/src/app/staticanalysis/staticAnalysisView.js +++ b/src/app/staticanalysis/staticAnalysisView.js @@ -136,8 +136,8 @@ staticAnalysisView.prototype.run = function () { } staticAnalysisView.prototype.checkModule = function (event) { - let selected = document.querySelectorAll('[name="staticanalysismodule"]:checked') - let checkAll = document.querySelector('[id="checkAllEntries"]') + let selected = this.view.querySelectorAll('[name="staticanalysismodule"]:checked') + let checkAll = this.view.querySelector('[id="checkAllEntries"]') if (event.target.checked) { checkAll.checked = true } else if (!selected.length) { diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index 45f890a898..db04e7e024 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -100,7 +100,7 @@ module.exports = class TestTab { } self._deps.filePanel.event.register('newTestFileCreated', file => { - var testList = document.querySelector("[class^='testList']") + var testList = self.view.querySelector("[class^='testList']") var test = yo`` testList.appendChild(test) self.data.allTests.push(file) @@ -138,12 +138,12 @@ module.exports = class TestTab { function toggleCheckbox (eChecked, test) { if (!self.data.selectedTests) { - self.data.selectedTests = document.querySelectorAll('.singleTest:checked') + self.data.selectedTests = self._view.el.querySelectorAll('.singleTest:checked') } let selectedTests = self.data.selectedTests selectedTests = eChecked ? [...selectedTests, test] : selectedTests.filter(el => el !== test) self.data.selectedTests = selectedTests - let checkAll = document.querySelector('[id="checkAllTests"]') + let checkAll = self._view.el.querySelector('[id="checkAllTests"]') if (eChecked) { checkAll.checked = true } else if (!selectedTests.length) { @@ -152,8 +152,8 @@ module.exports = class TestTab { } function checkAll (event) { - let checkBoxes = document.querySelectorAll('.singleTest') - const checkboxesLabels = document.querySelectorAll('.singleTestLabel') + let checkBoxes = self._view.el.querySelectorAll('.singleTest') + const checkboxesLabels = self._view.el.querySelectorAll('.singleTestLabel') // checks/unchecks all for (let i = 0; i < checkBoxes.length; i++) { checkBoxes[i].checked = event.target.checked