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 9fd1be19f4..3c10fc2927 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 @@ -19,6 +19,7 @@ export const SolidityUnitTesting = (props: any) => { const [checkSelectAll, setCheckSelectAll] = useState(true) const [testsExecutionStoppedHidden, setTestsExecutionStoppedHidden] = useState(true) const [testsExecutionStoppedErrorHidden, setTestsExecutionStoppedErrorHidden] = useState(true) + const [testsMessage, setTestsMessage] = useState('No test file available') const [pathOptions, setPathOptions] = useState(['']) const [inputPathValue, setInputPathValue] = useState('tests') @@ -224,17 +225,17 @@ export const SolidityUnitTesting = (props: any) => { // } } + const listTests = () => { + console.log('listTests--->') + // if (!this.data.allTests || !this.data.allTests.length) return [] + // return this.data.allTests.map( + // testFile => this.createSingleTest(testFile) + // ) + } + const updateTestFileList = (tests = []) => { - return (
No test file available
) - // const testsMessage = (tests && tests.length ? this.listTests() : 'No test file available') - // const el = yo`
${testsMessage}
` - // if (!this.testFilesListElement) { - // this.testFilesListElement = el - // } else { - // yo.update(this.testFilesListElement, el) - // } - // this.updateRunAction() - // return this.testFilesListElement + const testsMsg: any = (tests && tests.length) ? listTests() : 'No test file available' + setTestsMessage(testsMsg) } const createResultLabel = () => { @@ -318,7 +319,7 @@ export const SolidityUnitTesting = (props: any) => { /> - {updateTestFileList()} +
{testsMessage}
{resultStatistics}