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
a6704d44
Commit
a6704d44
authored
Jun 02, 2021
by
lianahus
Committed by
Liana Husikyan
Jun 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using awaits for proper result
parent
2a05375c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+3
-3
testTab.js
apps/remix-ide/src/app/tabs/testTab/testTab.js
+3
-2
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
a6704d44
...
@@ -606,7 +606,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -606,7 +606,7 @@ module.exports = class TestTab extends ViewPlugin {
this
.
updateDirList
(
testDirInput
)
this
.
updateDirList
(
testDirInput
)
}
else
{
}
else
{
// If there is no matching folder in the workspace with entered text, enable Create button
// If there is no matching folder in the workspace with entered text, enable Create button
if
(
this
.
testTabLogic
.
pathExists
(
testDirInput
))
{
if
(
await
this
.
testTabLogic
.
pathExists
(
testDirInput
))
{
this
.
createTestFolder
.
disabled
=
true
this
.
createTestFolder
.
disabled
=
true
this
.
updateGenerateFileAction
().
disabled
=
false
this
.
updateGenerateFileAction
().
disabled
=
false
}
else
{
}
else
{
...
@@ -636,10 +636,10 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -636,10 +636,10 @@ module.exports = class TestTab extends ViewPlugin {
name="utPath"
name="utPath"
style="background-image: var(--primary);"
style="background-image: var(--primary);"
onkeyup=
${(
e
)
=>
this
.
handleTestDirInput
(
e
)}
onkeyup=
${(
e
)
=>
this
.
handleTestDirInput
(
e
)}
onchange=
${(
e
)
=>
{
onchange=
${
async
(
e
)
=>
{
if
(
this
.
createTestFolder
.
disabled
)
{
if
(
this
.
createTestFolder
.
disabled
)
{
this
.
inputPath
.
value
=
this
.
trimTestDirInput
(
this
.
inputPath
.
value
)
this
.
inputPath
.
value
=
this
.
trimTestDirInput
(
this
.
inputPath
.
value
)
if
(
this
.
testTabLogic
.
pathExists
(
this
.
inputPath
.
value
))
{
if
(
await
this
.
testTabLogic
.
pathExists
(
this
.
inputPath
.
value
))
{
this
.
inputPath
.
value
=
this
.
trimTestDirInput
(
this
.
inputPath
.
value
)
this
.
inputPath
.
value
=
this
.
trimTestDirInput
(
this
.
inputPath
.
value
)
this
.
testTabLogic
.
setCurrentPath
(
this
.
inputPath
.
value
)
this
.
testTabLogic
.
setCurrentPath
(
this
.
inputPath
.
value
)
this
.
updateForNewCurrent
()
this
.
updateForNewCurrent
()
...
...
apps/remix-ide/src/app/tabs/testTab/testTab.js
View file @
a6704d44
...
@@ -23,11 +23,12 @@ class TestTabLogic {
...
@@ -23,11 +23,12 @@ class TestTabLogic {
})
})
}
}
pathExists
(
path
)
{
async
pathExists
(
path
)
{
// Checking to ignore the value which contains only whitespaces
// Checking to ignore the value which contains only whitespaces
if
(
!
path
||
!
(
/
\S
/
.
test
(
path
)))
return
if
(
!
path
||
!
(
/
\S
/
.
test
(
path
)))
return
const
fileProvider
=
this
.
fileManager
.
fileProviderOf
(
path
.
split
(
'/'
)[
0
])
const
fileProvider
=
this
.
fileManager
.
fileProviderOf
(
path
.
split
(
'/'
)[
0
])
return
fileProvider
.
exists
(
path
,
(
e
,
res
)
=>
{
return
res
})
const
res
=
await
fileProvider
.
exists
(
path
,
(
e
,
res
)
=>
{
return
res
})
return
res
}
}
generateTestFile
()
{
generateTestFile
()
{
...
...
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