Commit 3e564b48 authored by aniket-engg's avatar aniket-engg Committed by Aniket

comments and linting

parent 053d55c4
......@@ -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
}
}
......
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