diff --git a/apps/remix-ide/src/app/tabs/styles/test-tab-styles.js b/apps/remix-ide/src/app/tabs/styles/test-tab-styles.js index ce267b02bf..b6cce75aeb 100644 --- a/apps/remix-ide/src/app/tabs/styles/test-tab-styles.js +++ b/apps/remix-ide/src/app/tabs/styles/test-tab-styles.js @@ -48,5 +48,8 @@ var css = csjs` .labelOnBtn { border: hidden; } + .inputFolder { + width: 80%; + } ` module.exports = css diff --git a/apps/remix-ide/src/app/tabs/test-tab.js b/apps/remix-ide/src/app/tabs/test-tab.js index 2154232d23..36dcbed3a6 100644 --- a/apps/remix-ide/src/app/tabs/test-tab.js +++ b/apps/remix-ide/src/app/tabs/test-tab.js @@ -573,18 +573,28 @@ module.exports = class TestTab extends ViewPlugin { this.inputPath = yo` { if (e.keyCode === 191) this.updateDirList() }} - onchange=${(e) => this.updateCurrentPath(e)}/>` + onkeydown=${(e) => { if (e.keyCode === 191) this.updateDirList() }}/>` + + const createTestFolder = yo`` const availablePaths = yo`
- ${this.inputPath} - ${this.uiPathList} +
+ ${this.inputPath} + ${createTestFolder} + ${this.uiPathList} +
` this.updateDirList() diff --git a/apps/remix-ide/src/app/tabs/testTab/testTab.js b/apps/remix-ide/src/app/tabs/testTab/testTab.js index f0c85c773f..77c8fb4102 100644 --- a/apps/remix-ide/src/app/tabs/testTab/testTab.js +++ b/apps/remix-ide/src/app/tabs/testTab/testTab.js @@ -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) }) }