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
29f60ea4
Commit
29f60ea4
authored
Apr 28, 2020
by
LianaHus
Committed by
Liana Husikyan
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
border for result and some small style changes
parent
2e844d4f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
23 deletions
+18
-23
test-tab-styles.js
src/app/tabs/styles/test-tab-styles.js
+0
-4
test-tab.js
src/app/tabs/test-tab.js
+18
-19
No files found.
src/app/tabs/styles/test-tab-styles.js
View file @
29f60ea4
...
@@ -21,10 +21,6 @@ var css = csjs`
...
@@ -21,10 +21,6 @@ var css = csjs`
max-height: 300px;
max-height: 300px;
overflow-y: auto;
overflow-y: auto;
}
}
.outputTitle {
font-weight: bold;
margin: 10px 0;
}
.summaryTitle {
.summaryTitle {
font-weight: bold;
font-weight: bold;
}
}
...
...
src/app/tabs/test-tab.js
View file @
29f60ea4
...
@@ -136,8 +136,8 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -136,8 +136,8 @@ module.exports = class TestTab extends ViewPlugin {
this
.
rawFileName
=
result
.
filename
this
.
rawFileName
=
result
.
filename
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="
${
css
.
outputTitle
}
">
<div id="
${
this
.
runningTestFileName
}
" class="
pt-1
">
${
this
.
testSuite
}
<br />
${
this
.
rawFileName
}
<span class="font-weight-bold">
${
this
.
testSuite
}
from
${
this
.
rawFileName
}
</span>
</div>
</div>
`
`
this
.
testsOutput
.
appendChild
(
this
.
outputHeader
)
this
.
testsOutput
.
appendChild
(
this
.
outputHeader
)
...
@@ -149,10 +149,9 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -149,10 +149,9 @@ module.exports = class TestTab extends ViewPlugin {
`
)
`
)
}
else
if
(
result
.
type
===
'testFailure'
)
{
}
else
if
(
result
.
type
===
'testFailure'
)
{
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div class="
${
css
.
testFailure
}
${
css
.
testLog
}
alert-danger bg-transparent border-0">
<div class="
${
css
.
testFailure
}
${
css
.
testLog
}
d-flex flex-column alert-danger bg-transparent border-0" id="UTContext
${
result
.
context
}
">
✘
${
result
.
value
}
<span> ✘
${
result
.
value
}
</span>
<br/>
<span>"
${
result
.
errMsg
}
"</span>
<span class="ml-3">"
${
result
.
errMsg
}
"</span>
</div>
</div>
`
)
`
)
}
}
...
@@ -175,28 +174,30 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -175,28 +174,30 @@ module.exports = class TestTab extends ViewPlugin {
const
label
=
yo
`
const
label
=
yo
`
<div
<div
class="alert-success d-inline-block mb-1 mr-1 p-1 passed_
${
this
.
runningTestFileName
}
"
class="alert-success d-inline-block mb-1 mr-1 p-1 passed_
${
this
.
runningTestFileName
}
"
title="All contract tests passed">
title="All contract tests passed"
>
PASS
PASS
</div>
</div>
`
`
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
<div id="
${
this
.
runningTestFileName
}
" class="
${
css
.
outputTitle
}
">
<div id="
${
this
.
runningTestFileName
}
" class="
pt-1
">
${
label
}
${
this
.
testSuite
}
<br/>
${
this
.
rawFileName
}
${
label
}
<span class="font-weight-bold">
${
this
.
testSuite
}
from
${
this
.
rawFileName
}
</span>
</div>
</div>
`
)
`
)
}
else
{
}
else
{
const
label
=
yo
`
const
label
=
yo
`
<div
<div
class="alert-danger d-inline-block mb-1 mr-1 p-1 failed_
${
this
.
runningTestFileName
}
"
class="alert-danger d-inline-block mb-1 mr-1 p-1 failed_
${
this
.
runningTestFileName
}
"
title="At least one contract test failed">
title="At least one contract test failed"
>
FAIL
FAIL
</div>
</div>
`
`
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
this
.
outputHeader
&&
yo
.
update
(
this
.
outputHeader
,
yo
`
<div id="
${
this
.
runningTestFileName
}
" class="
${
css
.
outputTitle
}
">
<div id="
${
this
.
runningTestFileName
}
" class="
pt-1
">
${
label
}
${
this
.
testSuite
}
<br/>
${
this
.
rawFileName
}
${
label
}
<span class="font-weight-bold">
${
this
.
testSuite
}
from
${
this
.
rawFileName
}
</span>
</div>
</div>
`
)
`
)
}
}
...
@@ -223,10 +224,10 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -223,10 +224,10 @@ 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="
text-success
">
<div class="
d-flex border p-2 flex-column
">
${
result
.
totalPassing
}
passing,
<span class="text-success">
${
result
.
totalPassing
}
passing </span>
<span class="text-danger">
${
result
.
totalFailing
}
failing </span>
<span class="text-danger">
${
result
.
totalFailing
}
failing </span>
(
${
totalTime
}
s)
<span>Total time:
${
totalTime
}
s</span>
</div>
</div>
`
)
`
)
}
else
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
<=
0
)
{
}
else
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
<=
0
)
{
...
@@ -255,12 +256,10 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -255,12 +256,10 @@ module.exports = class TestTab extends ViewPlugin {
this
.
runningTestFileName
=
this
.
cleanFileName
(
filename
,
error
.
context
)
this
.
runningTestFileName
=
this
.
cleanFileName
(
filename
,
error
.
context
)
this
.
outputHeader
=
document
.
querySelector
(
`#
${
this
.
runningTestFileName
}
`
)
this
.
outputHeader
=
document
.
querySelector
(
`#
${
this
.
runningTestFileName
}
`
)
const
isFailingLabel
=
document
.
querySelector
(
`.failed_
${
this
.
runningTestFileName
}
`
)
const
isFailingLabel
=
document
.
querySelector
(
`.failed_
${
this
.
runningTestFileName
}
`
)
if
(
!
isFailingLabel
)
this
.
setHeader
(
false
)
if
(
!
isFailingLabel
)
this
.
setHeader
(
false
)
})
})
this
.
testsOutput
.
appendChild
(
yo
`
this
.
testsOutput
.
appendChild
(
yo
`
<div>
<div>
<br/>
<p class="text-info border-top m-0"></p>
<p class="text-info border-top m-0"></p>
</div>
</div>
`
)
`
)
...
@@ -478,7 +477,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -478,7 +477,7 @@ module.exports = class TestTab extends ViewPlugin {
render () {
render () {
this.onActivationInternal()
this.onActivationInternal()
this.testsOutput = yo`
<
div
class
=
"mx-3 mb-2 pb-
2 border-top border-primary"
hidden
=
'true'
id
=
"solidityUnittestsOutput"
data
-
id
=
"testTabSolidityUnitTestsOutput"
><
/a>
`
this.testsOutput = yo`
<
div
class
=
"mx-3 mb-2 pb-
4 border-top border-primary"
hidden
=
'true'
id
=
"solidityUnittestsOutput"
data
-
id
=
"testTabSolidityUnitTestsOutput"
><
/a>
`
this
.
testsExecutionStopped
=
yo
`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>`
this
.
testsExecutionStopped
=
yo
`<label class="text-warning h6" data-id="testTabTestsExecutionStopped">The test execution has been stopped</label>`
this
.
testsExecutionStopped
.
hidden
=
true
this
.
testsExecutionStopped
.
hidden
=
true
this
.
resultStatistics
=
this
.
createResultLabel
()
this
.
resultStatistics
=
this
.
createResultLabel
()
...
...
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