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
14b1ea74
Commit
14b1ea74
authored
Apr 28, 2020
by
LianaHus
Committed by
Liana Husikyan
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop button text color fix and result ui
parent
29f60ea4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
test-tab.js
src/app/tabs/test-tab.js
+20
-15
No files found.
src/app/tabs/test-tab.js
View file @
14b1ea74
...
@@ -137,19 +137,19 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -137,19 +137,19 @@ module.exports = class TestTab extends ViewPlugin {
this
.
runningTestFileName
=
this
.
cleanFileName
(
this
.
rawFileName
,
this
.
testSuite
)
this
.
runningTestFileName
=
this
.
cleanFileName
(
this
.
rawFileName
,
this
.
testSuite
)
this
.
outputHeader
=
yo
`
this
.
outputHeader
=
yo
`
<div id="
${
this
.
runningTestFileName
}
" class="pt-1">
<div id="
${
this
.
runningTestFileName
}
" class="pt-1">
<span class="font-weight-bold">
${
this
.
testSuite
}
from
${
this
.
rawFileName
}
</span>
<span class="font-weight-bold">
${
this
.
testSuite
}
(
${
this
.
rawFileName
}
)
</span>
</div>
</div>
`
`
this
.
testsOutput
.
appendChild
(
this
.
outputHeader
)
this
.
testsOutput
.
appendChild
(
this
.
outputHeader
)
}
else
if
(
result
.
type
===
'testPass'
)
{
}
else
if
(
result
.
type
===
'testPass'
)
{
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div id="
${
this
.
runningTestFileName
}
" class="
${
css
.
testPass
}
${
css
.
testLog
}
alert-success bg-transparent
border-0">
<div id="
${
this
.
runningTestFileName
}
" class="
${
css
.
testPass
}
${
css
.
testLog
}
text-success
border-0">
✓
${
result
.
value
}
✓
${
result
.
value
}
</div>
</div>
`
)
`
)
}
else
if
(
result
.
type
===
'testFailure'
)
{
}
else
if
(
result
.
type
===
'testFailure'
)
{
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div class="
${
css
.
testFailure
}
${
css
.
testLog
}
d-flex flex-column
alert-danger bg-transparent
border-0" id="UTContext
${
result
.
context
}
">
<div class="
${
css
.
testFailure
}
${
css
.
testLog
}
d-flex flex-column
text-danger
border-0" id="UTContext
${
result
.
context
}
">
<span> ✘
${
result
.
value
}
</span>
<span> ✘
${
result
.
value
}
</span>
<span>"
${
result
.
errMsg
}
"</span>
<span>"
${
result
.
errMsg
}
"</span>
</div>
</div>
...
@@ -182,7 +182,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -182,7 +182,7 @@ module.exports = class TestTab extends ViewPlugin {
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
<div id="
${
this
.
runningTestFileName
}
" class="pt-1">
<div id="
${
this
.
runningTestFileName
}
" class="pt-1">
${
label
}
<span class="font-weight-bold">
${
this
.
testSuite
}
from
${
this
.
rawFileName
}
</span>
${
label
}
<span class="font-weight-bold">
${
this
.
testSuite
}
(
${
this
.
rawFileName
}
)
</span>
</div>
</div>
`
)
`
)
}
else
{
}
else
{
...
@@ -197,7 +197,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -197,7 +197,7 @@ module.exports = class TestTab extends ViewPlugin {
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
<div id="
${
this
.
runningTestFileName
}
" class="pt-1">
<div id="
${
this
.
runningTestFileName
}
" class="pt-1">
${
label
}
<span class="font-weight-bold">
${
this
.
testSuite
}
from
${
this
.
rawFileName
}
</span>
${
label
}
<span class="font-weight-bold">
${
this
.
testSuite
}
(
${
this
.
rawFileName
}
)
</span>
</div>
</div>
`
)
`
)
}
}
...
@@ -224,22 +224,27 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -224,22 +224,27 @@ module.exports = class TestTab extends ViewPlugin {
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
>
0
)
{
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
>
0
)
{
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div class="d-flex border p-2 flex-column">
<div class="d-flex alert-secondary mb-3 p-3 flex-column">
<span class="text-success">
${
result
.
totalPassing
}
passing </span>
<span class="font-weight-bold">Result for
${
filename
}
</span>
<span class="text-danger">
${
result
.
totalFailing
}
failing </span>
<span class="text-success">Passing:
${
result
.
totalPassing
}
</span>
<span class="text-danger">Failing:
${
result
.
totalFailing
}
</span>
<span>Total time:
${
totalTime
}
s</span>
<span>Total time:
${
totalTime
}
s</span>
</div>
</div>
`
)
`
)
}
else
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
<=
0
)
{
}
else
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
<=
0
)
{
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div class="text-success">
<div class="d-flex alert-secondary mb-3 p-3 flex-column">
${
result
.
totalPassing
}
passing (
${
totalTime
}
s)
<span class="font-weight-bold">Result for
${
filename
}
</span>
<span class="text-success">Passing:
${
result
.
totalPassing
}
</span>
<span>Total time:
${
totalTime
}
s</span>
</div>
</div>
`
)
`
)
}
else
if
(
result
.
totalPassing
<=
0
&&
result
.
totalFailing
>
0
)
{
}
else
if
(
result
.
totalPassing
<=
0
&&
result
.
totalFailing
>
0
)
{
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div class="text-danger">
<div class="d-flex alert-secondary mb-3 p-3 flex-column">
${
result
.
totalFailing
}
failing (
${
totalTime
}
s)
<span class="font-weight-bold">Result for
${
filename
}
</span>
<span class="text-danger">Failing:
${
result
.
totalFailing
}
</span>
<span>Total time:
${
totalTime
}
s</span>
</div>
</div>
`
)
`
)
}
}
...
@@ -260,7 +265,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -260,7 +265,7 @@ module.exports = class TestTab extends ViewPlugin {
})
})
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div>
<div>
<p class="text-info border-top m-0"></p>
<p class="text-info
mb-2
border-top m-0"></p>
</div>
</div>
`
)
`
)
}
}
...
@@ -406,7 +411,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -406,7 +411,7 @@ module.exports = class TestTab extends ViewPlugin {
let
el
=
yo
`
let
el
=
yo
`
<button id="runTestsTabRunAction" title="Run tests" 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="
${
css
.
labelOnBtn
}
btn btn-primary
bg-transparent
p-1 ml-2 m-0">Run</label>
<label class="
${
css
.
labelOnBtn
}
btn btn-primary p-1 ml-2 m-0">Run</label>
</button>
</button>
`
`
const
isSolidityActive
=
this
.
appManager
.
actives
.
includes
(
'solidity'
)
const
isSolidityActive
=
this
.
appManager
.
actives
.
includes
(
'solidity'
)
...
@@ -431,7 +436,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -431,7 +436,7 @@ module.exports = class TestTab extends ViewPlugin {
return
yo
`
return
yo
`
<button id="runTestsTabStopAction" data-id="testTabRunTestsTabStopAction" class="w-50 pl-2 ml-2 btn btn-secondary" disabled="disabled" title="Stop running tests" onclick=
${()
=>
this
.
stopTests
()}
">
<button id="runTestsTabStopAction" data-id="testTabRunTestsTabStopAction" 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="
${
css
.
labelOnBtn
}
btn btn-
primary bg-transparent
p-1 ml-2 m-0" id="runTestsTabStopActionLabel">Stop</label>
<label class="
${
css
.
labelOnBtn
}
btn btn-
secondary
p-1 ml-2 m-0" id="runTestsTabStopActionLabel">Stop</label>
</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