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
575b7047
Commit
575b7047
authored
Sep 03, 2020
by
LianaHus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style fix on UI and test failore UI
parent
089b9a76
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
14 deletions
+24
-14
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+24
-14
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
575b7047
...
...
@@ -149,25 +149,35 @@ module.exports = class TestTab extends ViewPlugin {
</div>
`
)
}
else
if
(
result
.
type
===
'testFailure'
)
{
const
preposition
=
result
.
assertMethod
===
'equal'
||
result
.
assertMethod
===
'notEqual'
?
'to'
:
''
const
method
=
result
.
assertMethod
===
'ok'
?
''
:
result
.
assertMethod
const
expected
=
result
.
assertMethod
===
'ok'
?
`'true'`
:
result
.
expected
this
.
testsOutput
.
appendChild
(
yo
`
if
(
!
result
.
assertMethod
)
{
this
.
testsOutput
.
appendChild
(
yo
`
<div class="bg-light mb-2
${
css
.
testFailure
}
${
css
.
testLog
}
d-flex flex-column text-danger border-0" id="UTContext
${
result
.
context
}
">
<span> ✘
${
result
.
value
}
</span>
<span class="text-dark">Error Message:</span>
<span class="pb-2">"
${
result
.
errMsg
}
"</span>
<span class="text-dark">Asserttion:</span>
<div class="d-flex flex-wrap">
<span>Expected value should be</span>
<div class="mx-1 font-weight-bold">
${
method
}
</div>
<div>
${
preposition
}
${
expected
}
</div>
</div>
<span class="text-dark">Received value:</span>
<span>
${
result
.
returned
}
</span>
<span class="text-dark text-sm pb-2">Skipping the rest...</span>
<span class="pb-2 text-break">"
${
result
.
errMsg
}
"</span>
</div>
`
)
}
else
{
const
preposition
=
result
.
assertMethod
===
'equal'
||
result
.
assertMethod
===
'notEqual'
?
'to'
:
''
const
method
=
result
.
assertMethod
===
'ok'
?
''
:
result
.
assertMethod
const
expected
=
result
.
assertMethod
===
'ok'
?
`'true'`
:
result
.
expected
this
.
testsOutput
.
appendChild
(
yo
`
<div class="bg-light mb-2
${
css
.
testFailure
}
${
css
.
testLog
}
d-flex flex-column text-danger border-0" id="UTContext
${
result
.
context
}
">
<span> ✘
${
result
.
value
}
</span>
<span class="text-dark">Error Message:</span>
<span class="pb-2 text-break">"
${
result
.
errMsg
}
"</span>
<span class="text-dark">Asserttion:</span>
<div class="d-flex flex-wrap">
<span>Expected value should be</span>
<div class="mx-1 font-weight-bold">
${
method
}
</div>
<div>
${
preposition
}
${
expected
}
</div>
</div>
<span class="text-dark">Received value:</span>
<span>
${
result
.
returned
}
</span>
<span class="text-dark text-sm pb-2">Skipping the rest...</span>
</div>
`
)
}
}
}
...
...
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