Merge pull request #2715 from ethereum/run-test-button

Disabled 'Run Tests' Button When No Test Is Selected.
pull/1/head
yann300 5 years ago committed by GitHub
commit bed98f6651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/app/tabs/test-tab.js

@ -83,10 +83,16 @@ 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')
runBtn.setAttribute('title', 'Run tests')
} else if (!selectedTests.length) {
checkAll.checked = false
runBtn.setAttribute('disabled', 'disabled')
runBtn.setAttribute('title', 'No test file selected')
}
}

Loading…
Cancel
Save