comments and linting

pull/5370/head
aniket-engg 4 years ago committed by Aniket
parent c764360aab
commit 2bd6949e67
  1. 10
      apps/remix-ide/src/app/tabs/test-tab.js

@ -550,13 +550,15 @@ module.exports = class TestTab extends ViewPlugin {
}
updateDirList (keycode = 'none') {
// Initial load
if (keycode === 'none') {
this.testTabLogic.dirList('/').then((options) => {
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`))
})
} else {
const presentOptions = this.uiPathList.querySelectorAll('option')
if(keycode === 191) {
// if '/' is pressed
if (keycode === 191) {
for (var o of presentOptions) o.remove()
this.testTabLogic.dirList('/').then((options) => {
options.forEach((path) => this.uiPathList.appendChild(yo`<option>${path}</option>`))
@ -564,10 +566,10 @@ module.exports = class TestTab extends ViewPlugin {
} else {
let matchFound = false
for (var option of presentOptions) {
if (option.innerHTML.startsWith(this.inputPath.value))
matchFound = true
if (option.innerHTML.startsWith(this.inputPath.value)) { matchFound = true }
}
if(!matchFound) this.createTestFolder.disabled = false
// If there is no matching folder in the workspace with entered text, enable create button
if (!matchFound) this.createTestFolder.disabled = false
}
}

Loading…
Cancel
Save