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"]', 'Passed: 2', 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) {

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

Loading…
Cancel
Save