From ca0606e069824cdcbeb51b58b04cf082da0f5b7e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Thu, 9 Apr 2020 13:13:14 +0000 Subject: [PATCH] Disable run test button when no test is selected --- src/app/tabs/test-tab.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index b9c3157283..c092fbcca5 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -83,10 +83,14 @@ module.exports = class TestTab extends ViewPlugin { selectedTests = eChecked ? [...selectedTests, test] : selectedTests.filter(el => el !== test) this.data.selectedTests = selectedTests let checkAll = this._view.el.querySelector('[id="checkAllTests"]') + const runBtn = document.getElementById('runTestsTabRunAction') + if (eChecked) { checkAll.checked = true + runBtn.removeAttribute('disabled') } else if (!selectedTests.length) { checkAll.checked = false + runBtn.setAttribute('disabled', 'disabled') } }