From 91d52c9dc95c866e1f657a66bf86affc33c86e07 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Tue, 14 Dec 2021 16:46:50 +0530 Subject: [PATCH] debug button --- .../src/lib/solidity-unit-testing.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) 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) => {