Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
3e564b48
Commit
3e564b48
authored
Mar 18, 2021
by
aniket-engg
Committed by
Aniket
May 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments and linting
parent
053d55c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+9
-7
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
3e564b48
...
@@ -550,13 +550,15 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -550,13 +550,15 @@ module.exports = class TestTab extends ViewPlugin {
}
}
updateDirList (keycode = 'none') {
updateDirList (keycode = 'none') {
// Initial load
if (keycode === 'none') {
if (keycode === 'none') {
this.testTabLogic.dirList('/').then((options) => {
this.testTabLogic.dirList('/').then((options) => {
options.forEach((path) => this.uiPathList.appendChild(yo`
<
option
>
$
{
path
}
<
/option>`
)
)
options.forEach((path) => this.uiPathList.appendChild(yo`
<
option
>
$
{
path
}
<
/option>`
)
)
})
})
}
else
{
}
else
{
const
presentOptions
=
this
.
uiPathList
.
querySelectorAll
(
'option'
)
const
presentOptions
=
this
.
uiPathList
.
querySelectorAll
(
'option'
)
if
(
keycode
===
191
)
{
// if '/' is pressed
if
(
keycode
===
191
)
{
for
(
var
o
of
presentOptions
)
o
.
remove
()
for
(
var
o
of
presentOptions
)
o
.
remove
()
this
.
testTabLogic
.
dirList
(
'/'
).
then
((
options
)
=>
{
this
.
testTabLogic
.
dirList
(
'/'
).
then
((
options
)
=>
{
options
.
forEach
((
path
)
=>
this
.
uiPathList
.
appendChild
(
yo
`<option>
${
path
}
</option>`
))
options
.
forEach
((
path
)
=>
this
.
uiPathList
.
appendChild
(
yo
`<option>
${
path
}
</option>`
))
...
@@ -564,13 +566,13 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -564,13 +566,13 @@ module.exports = class TestTab extends ViewPlugin {
}
else
{
}
else
{
let
matchFound
=
false
let
matchFound
=
false
for
(
var
option
of
presentOptions
)
{
for
(
var
option
of
presentOptions
)
{
if
(
option
.
innerHTML
.
startsWith
(
this
.
inputPath
.
value
))
if
(
option
.
innerHTML
.
startsWith
(
this
.
inputPath
.
value
))
{
matchFound
=
true
}
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
}
}
}
}
/*
/*
It is not possible anymore to see folder from outside of the current workspace
It is not possible anymore to see folder from outside of the current workspace
if (this.inputPath.value) {
if (this.inputPath.value) {
...
@@ -603,9 +605,9 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -603,9 +605,9 @@ module.exports = class TestTab extends ViewPlugin {
data-id="testTabGenerateTestFolder"
data-id="testTabGenerateTestFolder"
title="Create a test folder"
title="Create a test folder"
disabled=true
disabled=true
onclick=
${(
e
)
=>
{
onclick=
${(
e
)
=>
{
this
.
testTabLogic
.
generateTestFolder
(
this
.
inputPath
.
value
)
this
.
testTabLogic
.
generateTestFolder
(
this
.
inputPath
.
value
)
this
.
createTestFolder
.
disabled
=
true
this
.
createTestFolder
.
disabled
=
true
}}
>
}}
>
Create
Create
<
/button>
`
<
/button>
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment