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
aee7922e
Commit
aee7922e
authored
Oct 07, 2021
by
Admin
Committed by
Aniket
Oct 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug button for all
parent
b667dc3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+15
-15
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
aee7922e
...
...
@@ -247,6 +247,14 @@ module.exports = class TestTab extends ViewPlugin {
testCallback
(
result
,
runningTests
)
{
this
.
testsOutput
.
hidden
=
false
let
debugBtn
=
yo
``
if
((
result
.
type
===
'testPass'
||
result
.
type
===
'testFailure'
)
&&
result
.
debugTxHash
)
{
const
{
web3
,
debugTxHash
}
=
result
debugBtn
=
yo
`<div class="btn border btn btn-sm ml-1" title="Start debugging" onclick=
${()
=>
this
.
startDebug
(
debugTxHash
,
web3
)}
>
<i class="fas fa-bug"></i>
</div>`
debugBtn
.
style
.
cursor
=
'pointer'
}
if
(
result
.
type
===
'contract'
)
{
this
.
testSuite
=
result
.
value
if
(
this
.
testSuites
)
{
...
...
@@ -271,26 +279,15 @@ module.exports = class TestTab extends ViewPlugin {
class="
${
css
.
testPass
}
${
css
.
testLog
}
bg-light mb-2 text-success border-0"
onclick=
${()
=>
this
.
discardHighlight
()}
>
✓
${
result
.
value
}
<div class="d-flex my-1 align-items-start justify-content-between">
<span> ✓
${
result
.
value
}
</span>
${
debugBtn
}
</div>
</div>
`
)
}
else
if
(
result
.
type
===
'testFailure'
)
{
if
(
result
.
hhLogs
&&
result
.
hhLogs
.
length
)
this
.
printHHLogs
(
result
.
hhLogs
,
result
.
value
)
if
(
!
result
.
assertMethod
)
{
let
debugBtn
=
yo
``
if
(
result
.
errMsg
.
includes
(
'Transaction has been reverted by the EVM'
))
{
const
txHash
=
JSON
.
parse
(
result
.
errMsg
.
replace
(
'Transaction has been reverted by the EVM:'
,
''
)).
transactionHash
const
{
web3
}
=
result
debugBtn
=
yo
`<div
class="btn border btn btn-sm ml-1"
title="Start debugging"
onclick=
${()
=>
this
.
startDebug
(
txHash
,
web3
)}
>
<i class="fas fa-bug"></i>
</div>`
debugBtn
.
style
.
visibility
=
'visible'
debugBtn
.
style
.
cursor
=
'pointer'
}
else
debugBtn
.
style
.
visibility
=
'hidden'
this
.
testsOutput
.
appendChild
(
yo
`
<div
class="bg-light mb-2 px-2
${
css
.
testLog
}
d-flex flex-column text-danger border-0"
...
...
@@ -315,7 +312,10 @@ module.exports = class TestTab extends ViewPlugin {
id="UTContext
${
result
.
context
}
"
onclick=
${()
=>
this
.
highlightLocation
(
result
.
location
,
runningTests
,
result
.
filename
)}
>
<div class="d-flex my-1 align-items-start justify-content-between">
<span> ✘
${
result
.
value
}
</span>
${
debugBtn
}
</div>
<span class="text-dark">Error Message:</span>
<span class="pb-2 text-break">"
${
result
.
errMsg
}
"</span>
<span class="text-dark">Assertion:</span>
...
...
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