Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { testCase, translation, locale = 'en' } = this.props;
const duration = TimeDuration.format(testCase.duration * 1000, translation, locale);
const showTestCase = testCase.errorStackTrace || testCase.errorDetails || testCase.hasStdLog;
let statusIndicator = null;
switch (testCase.status) {
case 'FAILED':
statusIndicator = StatusIndicator.validResultValues.failure;
break;
case 'PASSED':
statusIndicator = StatusIndicator.validResultValues.success;
break;
case 'SKIPPED':
statusIndicator = StatusIndicator.validResultValues.not_built;
break;
default:
statusIndicator = StatusIndicator.validResultValues.unknown;
}
const onExpand = () => {
this.setState({ isFocused: true, attemptedFetchForStdOutStdErr: true });
if (!testCase._links) {
return;
}