Commit 6ae7edd7 authored by yann300's avatar yann300

do not automatically create a folder

parent c759cf72
......@@ -48,5 +48,8 @@ var css = csjs`
.labelOnBtn {
border: hidden;
}
.inputFolder {
width: 80%;
}
`
module.exports = css
......@@ -573,19 +573,29 @@ module.exports = class TestTab extends ViewPlugin {
this.inputPath = yo`<input
placeholder=${this.defaultPath}
list="utPathList"
class="custom-select"
class="${css.inputFolder} custom-select"
id="utPath"
data-id="uiPathInput"
name="utPath"
style="background-image: var(--primary);"
onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }}
onchange=${(e) => this.updateCurrentPath(e)}/>`
onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }}/>`
const createTestFolder = yo`<button
class="btn border ml-2"
data-id="testTabGenerateTestFolder"
title="Create a test folder"
onclick=${(e) => { this.testTabLogic.generateTestFolder(this.inputPath.value) }}>
Create
</button>`
const availablePaths = yo`
<div>
<div class="d-flex p-2">
${this.inputPath}
${createTestFolder}
${this.uiPathList}
</div>
</div>
`
this.updateDirList()
this.testsExecutionStopped.hidden = true
......
......@@ -11,6 +11,9 @@ class TestTabLogic {
setCurrentPath (path) {
if (path.indexOf('/') === 0) return
this.currentPath = path
}
generateTestFolder (path) {
const fileProvider = this.fileManager.fileProviderOf(path.split('/')[0])
fileProvider.exists(path, (e, res) => { if (!res) fileProvider.createDir(path) })
}
......
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