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
88f12915
Commit
88f12915
authored
Apr 28, 2020
by
ioedeveloper
Committed by
Liana Husikyan
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added error inline during execution and roundup total test execution time to 2d.p
parent
0f7d009d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
28 deletions
+8
-28
test-tab.js
src/app/tabs/test-tab.js
+8
-28
No files found.
src/app/tabs/test-tab.js
View file @
88f12915
...
...
@@ -143,7 +143,7 @@ module.exports = class TestTab extends ViewPlugin {
this
.
testsOutput
.
appendChild
(
this
.
outputHeader
)
}
else
if
(
result
.
type
===
'testPass'
)
{
this
.
testsOutput
.
appendChild
(
yo
`
<div class="
${
css
.
testPass
}
${
css
.
testLog
}
alert-success bg-transparent border-0">
<div
id="
${
this
.
runningTestFileName
}
"
class="
${
css
.
testPass
}
${
css
.
testLog
}
alert-success bg-transparent border-0">
✓
${
result
.
value
}
</div>
`
)
...
...
@@ -151,6 +151,8 @@ module.exports = class TestTab extends ViewPlugin {
this
.
testsOutput
.
appendChild
(
yo
`
<div class="
${
css
.
testFailure
}
${
css
.
testLog
}
alert-danger bg-transparent border-0">
✘
${
result
.
value
}
<br/>
<span class="ml-3">"
${
result
.
errMsg
}
"</span>
</div>
`
)
}
...
...
@@ -217,24 +219,26 @@ module.exports = class TestTab extends ViewPlugin {
}
yo
.
update
(
this
.
resultStatistics
,
this
.
createResultLabel
())
if
(
result
)
{
const
totalTime
=
parseFloat
(
result
.
totalTime
).
toFixed
(
2
)
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
>
0
)
{
this
.
testsOutput
.
appendChild
(
yo
`
<div class="text-success">
${
result
.
totalPassing
}
passing,
<span class="text-danger">
${
result
.
totalFailing
}
failing </span>
(
${
result
.
totalTime
}
s)
(
${
totalTime
}
s)
</div>
`
)
}
else
if
(
result
.
totalPassing
>
0
&&
result
.
totalFailing
<=
0
)
{
this
.
testsOutput
.
appendChild
(
yo
`
<div class="text-success">
${
result
.
totalPassing
}
passing (
${
result
.
totalTime
}
s)
${
result
.
totalPassing
}
passing (
${
totalTime
}
s)
</div>
`
)
}
else
if
(
result
.
totalPassing
<=
0
&&
result
.
totalFailing
>
0
)
{
this
.
testsOutput
.
appendChild
(
yo
`
<div class="text-danger">
${
result
.
totalFailing
}
failing
${
result
.
totalFailing
}
failing
(
${
totalTime
}
s)
</div>
`
)
}
...
...
@@ -245,7 +249,6 @@ module.exports = class TestTab extends ViewPlugin {
this
.
outputHeader
=
document
.
querySelector
(
`#
${
this
.
runningTestFileName
}
`
)
this
.
setHeader
(
true
)
})
const
displayError
=
yo
`<div class="sol error alert alert-danger"></div>`
result
.
errors
.
forEach
((
error
,
index
)
=>
{
this
.
testSuite
=
error
.
context
...
...
@@ -254,30 +257,7 @@ module.exports = class TestTab extends ViewPlugin {
const
isFailingLabel
=
document
.
querySelector
(
`.failed_
${
this
.
runningTestFileName
}
`
)
if
(
!
isFailingLabel
)
this
.
setHeader
(
false
)
if
(
result
.
errors
.
length
>
1
)
{
displayError
.
appendChild
(
yo
`
<div>
${
error
.
context
}
<ul class="ml-3 mb-0">
<li>
${
error
.
value
}
</li>
</ul>
<span class="ml-3">
${
error
.
message
}
</span>
</div>
`
)
}
else
{
displayError
.
appendChild
(
yo
`
<div>
<ul class="ml-3 mb-0">
<li>
${
error
.
value
}
</li>
</ul>
<span class="ml-3">
${
error
.
message
}
</span>
</div>
`
)
}
})
if
(
result
.
errors
&&
result
.
errors
.
length
>
0
)
{
this
.
testsOutput
.
appendChild
(
displayError
)
}
this
.
testsOutput
.
appendChild
(
yo
`
<div>
<br/>
...
...
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