check fail label

pull/5370/head
aniket-engg 3 years ago committed by Aniket
parent be40962acc
commit bdd18708dd
  1. 1
      apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
  2. 13
      libs/remix-ui/solidity-unit-testing/src/lib/solidity-unit-testing.tsx

@ -66,6 +66,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Should fail for wrong value200', 120000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Should fail for wrong value200', 120000)
.waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Passed: 2', 120000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Passed: 2', 120000)
.waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Failed: 1', 120000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Failed: 1', 120000)
.verify.elementPresent('.failed_tests_simple_storage_test_solMyTest')
}, },
'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` #group2': function (browser: NightwatchBrowser) { 'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` #group2': function (browser: NightwatchBrowser) {

@ -279,18 +279,23 @@ export const SolidityUnitTesting = (props: Record<string, any>) => {
return return
} }
let label let label
if (index > -1) label = (<div if (index > -1) {
className="alert-danger d-inline-block mb-1 mr-1 p-1 failed_{runningTestFileName}" const className = "alert-danger d-inline-block mb-1 mr-1 p-1 failed_" + runningTestFileName
label = (<div
className={className}
title="At least one contract test failed" title="At least one contract test failed"
> >
FAIL FAIL
</div>) </div>)
else label = (<div } else {
className="alert-success d-inline-block mb-1 mr-1 p-1 passed_{runningTestFileName}" const className = "alert-success d-inline-block mb-1 mr-1 p-1 passed_" + runningTestFileName
label = (<div
className={className}
title="All contract tests passed" title="All contract tests passed"
> >
PASS PASS
</div>) </div>)
}
// show contract and file name with label // show contract and file name with label
const ContractCard: any = ( const ContractCard: any = (
<div id={runningTestFileName} data-id="testTabSolidityUnitTestsOutputheader" className="pt-1"> <div id={runningTestFileName} data-id="testTabSolidityUnitTestsOutputheader" className="pt-1">

Loading…
Cancel
Save