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
e7b55b6a
Commit
e7b55b6a
authored
Sep 03, 2021
by
aniket-engg
Committed by
Aniket
Sep 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
button improved
parent
52b2e468
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+17
-10
runTestSources.ts
libs/remix-tests/src/runTestSources.ts
+2
-2
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
e7b55b6a
...
@@ -201,11 +201,10 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -201,11 +201,10 @@ module.exports = class TestTab extends ViewPlugin {
}
}
}
}
async
startDebug
(
result
)
{
async
startDebug
(
txHash
,
web3
)
{
const
txHash
=
JSON
.
parse
(
result
.
errMsg
.
replace
(
'Transaction has been reverted by the EVM:'
,
''
)).
transactionHash
if
(
!
await
this
.
appManager
.
isActive
(
'debugger'
))
await
this
.
appManager
.
activatePlugin
(
'debugger'
)
if
(
!
await
this
.
appManager
.
isActive
(
'debugger'
))
await
this
.
appManager
.
activatePlugin
(
'debugger'
)
this
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
this
.
call
(
'menuicons'
,
'select'
,
'debugger'
)
this
.
call
(
'debugger'
,
'debug'
,
txHash
,
result
.
web3
)
this
.
call
(
'debugger'
,
'debug'
,
txHash
,
web3
)
}
}
printHHLogs
(
logsArr
,
testName
)
{
printHHLogs
(
logsArr
,
testName
)
{
...
@@ -258,6 +257,20 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -258,6 +257,20 @@ module.exports = class TestTab extends ViewPlugin {
}
else
if
(
result
.
type
===
'testFailure'
)
{
}
else
if
(
result
.
type
===
'testFailure'
)
{
if
(
result
.
hhLogs
&&
result
.
hhLogs
.
length
)
this
.
printHHLogs
(
result
.
hhLogs
,
result
.
value
)
if
(
result
.
hhLogs
&&
result
.
hhLogs
.
length
)
this
.
printHHLogs
(
result
.
hhLogs
,
result
.
value
)
if
(
!
result
.
assertMethod
)
{
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
`
this
.
testsOutput
.
appendChild
(
yo
`
<div
<div
class="bg-light mb-2 px-2
${
css
.
testLog
}
d-flex flex-column text-danger border-0"
class="bg-light mb-2 px-2
${
css
.
testLog
}
d-flex flex-column text-danger border-0"
...
@@ -266,13 +279,7 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -266,13 +279,7 @@ module.exports = class TestTab extends ViewPlugin {
>
>
<div class="d-flex my-1 align-items-start justify-content-between">
<div class="d-flex my-1 align-items-start justify-content-between">
<span> ✘
${
result
.
value
}
</span>
<span> ✘
${
result
.
value
}
</span>
<div
${
debugBtn
}
class="btn border btn btn-sm ml-1"
title="Start debugging"
onclick=
${()
=>
this
.
startDebug
(
result
)}
>
<i class="fas fa-bug"></i>
</div>
</div>
</div>
<span class="text-dark">Error Message:</span>
<span class="text-dark">Error Message:</span>
<span class="pb-2 text-break">"
${
result
.
errMsg
}
"</span>
<span class="pb-2 text-break">"
${
result
.
errMsg
}
"</span>
...
...
libs/remix-tests/src/runTestSources.ts
View file @
e7b55b6a
...
@@ -16,7 +16,7 @@ require('colors')
...
@@ -16,7 +16,7 @@ require('colors')
export
class
UnitTestRunner
{
export
class
UnitTestRunner
{
event
event
constructor
()
{
constructor
()
{
this
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
}
}
...
@@ -53,7 +53,7 @@ export class UnitTestRunner {
...
@@ -53,7 +53,7 @@ export class UnitTestRunner {
})
})
},
},
(
next
)
=>
{
(
next
)
=>
{
compileContractSources
(
contractSources
,
compilerConfig
,
importFileCb
,
{
accounts
,
event
:
this
.
event
},
next
)
compileContractSources
(
contractSources
,
compilerConfig
,
importFileCb
,
{
accounts
,
event
:
this
.
event
},
next
)
},
},
function
deployAllContracts
(
compilationResult
:
compilationInterface
,
asts
:
ASTInterface
,
next
)
{
function
deployAllContracts
(
compilationResult
:
compilationInterface
,
asts
:
ASTInterface
,
next
)
{
for
(
const
filename
in
asts
)
{
for
(
const
filename
in
asts
)
{
...
...
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