diff --git a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx index 1b3dc4d804..d2bc2b1767 100644 --- a/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx +++ b/libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx @@ -289,6 +289,15 @@ export const SolidityUnitTesting = (props: any) => { // show tests for(const test of tests) { console.log('test---->', test) + let debugBtn + if (test.debugTxHash) { + const { web3, debugTxHash } = test + debugBtn = ( +
startDebug(debugTxHash, web3)}> + +
+ ) + } if (test.type === 'testPass') { // if (test.hhLogs && test.hhLogs.length) printHHLogs(test.hhLogs, test.value) const testPassCard: any = ( @@ -300,7 +309,7 @@ export const SolidityUnitTesting = (props: any) => { >
✓ {test.value} - {/* {debugBtn} */} + {debugBtn}
) @@ -315,7 +324,7 @@ export const SolidityUnitTesting = (props: any) => { >
✘ {test.value} - {/* {debugBtn} */} + {debugBtn}
Error Message: "{test.errMsg}" @@ -332,7 +341,7 @@ export const SolidityUnitTesting = (props: any) => { >
✘ {test.value} - {/* {debugBtn} */} + {debugBtn}
Error Message: "{test.errMsg}" @@ -374,16 +383,7 @@ export const SolidityUnitTesting = (props: any) => { ) setTestsOutput(prevCards => ([...prevCards, summaryCard])) } - } - // let debugBtn - // if ((result.type === 'testPass' || result.type === 'testFailure') && result.debugTxHash) { - // const { web3, debugTxHash } = result - // debugBtn = ( - //
startDebug(debugTxHash, web3)}> - // - //
- // ) - // } + } } const testCallback = (result: any, runningTests: any) => {