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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
15 deletions
+29
-15
test-tab-styles.js
src/app/tabs/styles/test-tab-styles.js
+3
-0
test-tab.js
src/app/tabs/test-tab.js
+26
-15
No files found.
src/app/tabs/styles/test-tab-styles.js
View file @
b58f034d
...
...
@@ -54,5 +54,8 @@ var css = csjs`
align-items: center;
white-space: nowrap;
}
.labelOnBtn {
border: hidden;
}
`
module
.
exports
=
css
src/app/tabs/test-tab.js
View file @
b58f034d
...
...
@@ -164,7 +164,7 @@ module.exports = class TestTab extends ViewPlugin {
if
(
this
.
hasBeenStopped
)
{
this
.
testsSummary
.
appendChild
(
yo
`<label class="text-warning h5">The test execution has been stopped</label>`
)
}
const
stopBtn
=
document
.
getElementById
(
'runTestsTabStopAction'
)
const
stopBtnLabel
=
document
.
getElementById
(
'runTestsTabStopActionLabel'
)
stopBtnLabel
.
innerText
=
'Stop'
...
...
@@ -236,7 +236,7 @@ module.exports = class TestTab extends ViewPlugin {
}
runTests
()
{
this
.
hasBeenStopped
=
false
;
this
.
hasBeenStopped
=
false
const
stopBtn
=
document
.
getElementById
(
'runTestsTabStopAction'
)
stopBtn
.
removeAttribute
(
'disabled'
)
this
.
call
(
'editor'
,
'clearAnnotations'
)
...
...
@@ -255,10 +255,20 @@ module.exports = class TestTab extends ViewPlugin {
}
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>`
if
(
!
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>`
if
(
!
currentFile
||
(
currentFile
&&
currentFile
.
split
(
'.'
).
pop
().
toLowerCase
()
!==
'sol'
)
)
{
el
.
setAttribute
(
'disabled'
,
'disabled'
)
el
.
setAttribute
(
'title'
,
'No file selected'
)
el
.
setAttribute
(
'title'
,
'No
solidity
file selected'
)
}
if
(
!
this
.
generateFileActionElement
)
{
this
.
generateFileActionElement
=
el
...
...
@@ -270,20 +280,21 @@ module.exports = class TestTab extends ViewPlugin {
updateRunAction
(
currentFile
)
{
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>
<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>
`
const
isSolidityActive
=
this
.
appManager
.
actives
.
includes
(
'solidity'
)
if
(
!
currentFile
||
!
isSolidityActive
)
{
if
(
!
currentFile
||
!
isSolidityActive
||
(
currentFile
&&
currentFile
.
split
(
'.'
).
pop
().
toLowerCase
()
!==
'sol'
)
)
{
el
.
setAttribute
(
'disabled'
,
'disabled'
)
if
(
!
currentFile
)
{
el
.
setAttribute
(
'title'
,
'No file selected'
)
}
else
if
(
!
isSolidityActive
)
el
.
setAttribute
(
'title'
,
'The "Solidity Plugin" should be activated'
)
// @todo(#2747) we can activate the plugin here
if
(
!
currentFile
||
(
currentFile
&&
currentFile
.
split
(
'.'
).
pop
().
toLowerCase
()
!==
'sol'
))
{
el
.
setAttribute
(
'title'
,
'No solidity file selected'
)
}
else
{
el
.
setAttribute
(
'title'
,
'The "Solidity Plugin" should be activated'
)
// @todo(#2747) we can activate the plugin here
}
}
if
(
!
this
.
runActionElement
)
{
this
.
runActionElement
=
el
}
else
{
...
...
@@ -296,7 +307,7 @@ module.exports = class TestTab extends ViewPlugin {
return
yo
`
<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>
<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>
`
}
...
...
@@ -329,7 +340,7 @@ module.exports = class TestTab extends ViewPlugin {
infoButton () {
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">
<
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
>
`
}
...
...
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