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
b58f034d
Commit
b58f034d
authored
Apr 21, 2020
by
LianaHus
Committed by
Aniket
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
standart and btns' titles
parent
df362b90
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
test-tab-styles.js
src/app/tabs/styles/test-tab-styles.js
+3
-0
test-tab.js
src/app/tabs/test-tab.js
+24
-13
No files found.
src/app/tabs/styles/test-tab-styles.js
View file @
b58f034d
...
@@ -54,5 +54,8 @@ var css = csjs`
...
@@ -54,5 +54,8 @@ var css = csjs`
align-items: center;
align-items: center;
white-space: nowrap;
white-space: nowrap;
}
}
.labelOnBtn {
border: hidden;
}
`
`
module
.
exports
=
css
module
.
exports
=
css
src/app/tabs/test-tab.js
View file @
b58f034d
...
@@ -236,7 +236,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -236,7 +236,7 @@ module.exports = class TestTab extends ViewPlugin {
}
}
runTests
()
{
runTests
()
{
this
.
hasBeenStopped
=
false
;
this
.
hasBeenStopped
=
false
const
stopBtn
=
document
.
getElementById
(
'runTestsTabStopAction'
)
const
stopBtn
=
document
.
getElementById
(
'runTestsTabStopAction'
)
stopBtn
.
removeAttribute
(
'disabled'
)
stopBtn
.
removeAttribute
(
'disabled'
)
this
.
call
(
'editor'
,
'clearAnnotations'
)
this
.
call
(
'editor'
,
'clearAnnotations'
)
...
@@ -255,10 +255,20 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -255,10 +255,20 @@ module.exports = class TestTab extends ViewPlugin {
}
}
updateGenerateFileAction
(
currentFile
)
{
updateGenerateFileAction
(
currentFile
)
{
let
el
=
yo
`<button class="btn border w-50" data-id="testTabGenerateTestFile" title="Generate sample test file." onclick="
${
this
.
testTabLogic
.
generateTestFile
.
bind
(
this
.
testTabLogic
)}
">Generate</button>`
let
el
=
yo
`<button
if
(
!
currentFile
)
{
class="btn border w-50"
data-id="testTabGenerateTestFile"
title="Generate sample test file."
onclick="
${
this
.
testTabLogic
.
generateTestFile
.
bind
(
this
.
testTabLogic
)}
"
>
Generate
</button>`
if
(
!
currentFile
||
(
currentFile
&&
currentFile
.
split
(
'.'
).
pop
().
toLowerCase
()
!==
'sol'
)
)
{
el
.
setAttribute
(
'disabled'
,
'disabled'
)
el
.
setAttribute
(
'disabled'
,
'disabled'
)
el
.
setAttribute
(
'title'
,
'No file selected'
)
el
.
setAttribute
(
'title'
,
'No
solidity
file selected'
)
}
}
if
(
!
this
.
generateFileActionElement
)
{
if
(
!
this
.
generateFileActionElement
)
{
this
.
generateFileActionElement
=
el
this
.
generateFileActionElement
=
el
...
@@ -270,20 +280,21 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -270,20 +280,21 @@ module.exports = class TestTab extends ViewPlugin {
updateRunAction
(
currentFile
)
{
updateRunAction
(
currentFile
)
{
let
el
=
yo
`
let
el
=
yo
`
<button id="runTestsTabRunAction" data-id="testTabRunTestsTabRunAction" class="w-50 btn btn-primary" onclick="
${()
=>
this
.
runTests
()}
">
<button id="runTestsTabRunAction"
title="Run tests"
data-id="testTabRunTestsTabRunAction" class="w-50 btn btn-primary" onclick="
${()
=>
this
.
runTests
()}
">
<span class="fas fa-play ml-2"></span>
<span class="fas fa-play ml-2"></span>
<label class="
btn
bg-transparent p-1 ml-2 m-0">Run</label>
<label class="
${
css
.
labelOnBtn
}
btn btn-primary
bg-transparent p-1 ml-2 m-0">Run</label>
</button>
</button>
`
`
const
isSolidityActive
=
this
.
appManager
.
actives
.
includes
(
'solidity'
)
const
isSolidityActive
=
this
.
appManager
.
actives
.
includes
(
'solidity'
)
if
(
!
currentFile
||
!
isSolidityActive
)
{
if
(
!
currentFile
||
!
isSolidityActive
||
(
currentFile
&&
currentFile
.
split
(
'.'
).
pop
().
toLowerCase
()
!==
'sol'
)
)
{
el
.
setAttribute
(
'disabled'
,
'disabled'
)
el
.
setAttribute
(
'disabled'
,
'disabled'
)
if
(
!
currentFile
)
{
if
(
!
currentFile
||
(
currentFile
&&
currentFile
.
split
(
'.'
).
pop
().
toLowerCase
()
!==
'sol'
))
{
el
.
setAttribute
(
'title'
,
'No file selected'
)
el
.
setAttribute
(
'title'
,
'No solidity file selected'
)
}
else
if
(
!
isSolidityActive
)
el
.
setAttribute
(
'title'
,
'The "Solidity Plugin" should be activated'
)
}
else
{
el
.
setAttribute
(
'title'
,
'The "Solidity Plugin" should be activated'
)
// @todo(#2747) we can activate the plugin here
// @todo(#2747) we can activate the plugin here
}
}
}
if
(
!
this
.
runActionElement
)
{
if
(
!
this
.
runActionElement
)
{
this
.
runActionElement
=
el
this
.
runActionElement
=
el
}
else
{
}
else
{
...
@@ -296,7 +307,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -296,7 +307,7 @@ module.exports = class TestTab extends ViewPlugin {
return
yo
`
return
yo
`
<button id="runTestsTabStopAction" class="w-50 pl-2 ml-2 btn btn-secondary" disabled="disabled" title="Stop running tests" onclick=
${()
=>
this
.
stopTests
()}
">
<button id="runTestsTabStopAction" class="w-50 pl-2 ml-2 btn btn-secondary" disabled="disabled" title="Stop running tests" onclick=
${()
=>
this
.
stopTests
()}
">
<span class="fas fa-stop ml-2"></span>
<span class="fas fa-stop ml-2"></span>
<label class="
btn
bg-transparent p-1 ml-2 m-0" id="runTestsTabStopActionLabel">Stop</label>
<label class="
${
css
.
labelOnBtn
}
btn btn-primary
bg-transparent p-1 ml-2 m-0" id="runTestsTabStopActionLabel">Stop</label>
</button>
</button>
`
`
}
}
...
@@ -329,7 +340,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -329,7 +340,7 @@ module.exports = class TestTab extends ViewPlugin {
infoButton () {
infoButton () {
return yo`
return yo`
<a class="
btn
border
text
-
decoration
-
none
pr
-
0
d
-
flex
w
-
50
ml
-
2
" title="
Check
out
documentation
.
" target="
__blank
" href="
https
:
//remix-ide.readthedocs.io/en/latest/unittesting.html#generate-test-file">
<a class="
btn
border
text
-
decoration
-
none
pr
-
0
d
-
flex
w
-
50
ml
-
2
" title="
Check
out
documentation
.
" target="
__blank
" href="
https
:
//remix-ide.readthedocs.io/en/latest/unittesting.html#generate-test-file">
<
label
class
=
"btn p-1 ml-
3 text-dark m-0"
>
How
to
use
<
/label
>
<
label
class
=
"btn p-1 ml-
2 m-0"
>
How
to
use
...
<
/label
>
<
/a
>
<
/a
>
`
`
}
}
...
...
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