diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js
index ef3857c993..50242d07bb 100644
--- a/src/app/tabs/test-tab.js
+++ b/src/app/tabs/test-tab.js
@@ -485,10 +485,11 @@ module.exports = class TestTab extends ViewPlugin {
return yo`Progress: ${ready} finished (of ${this.runningTestsNumber})`
}
- updateDirList (e) {
- if (e.keyCode === 191) {
+ updateDirList () {
for (var o of this.uiPathList.querySelectorAll('option')) o.remove()
- this.testTabLogic.dirList(this._view.el.getElementsByClassName('custom-select')[0].value).then((options) => {
+ this.uiPathList.appendChild(yo``)
+ if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo``)
+ if (!this._view.el) return
options.forEach((path) => this.uiPathList.appendChild(yo``))
})
}
@@ -510,13 +511,12 @@ module.exports = class TestTab extends ViewPlugin {
data-id="uiPathInput"
name="utPath"
style="background-image: var(--primary);"
- onkeydown=${(e) => this.updateDirList(e)}
- onchange=${(e) => this.updateCurrentPath(e)}/>
+ onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }}
+ onchange=${(e) => this.updateCurrentPath(e)}/>`
${this.uiPathList}
`
- this.uiPathList.appendChild(yo``)
- if (this.testTabLogic.isRemixDActive()) this.uiPathList.appendChild(yo``)
+ this.updateDirList()
this.testsExecutionStopped.hidden = true
this.testsExecutionStoppedError.hidden = true
this.resultStatistics = this.createResultLabel()