Skip to content

Commit

Permalink
Fix optional priority string not being shown in TestPlanResultsTable …
Browse files Browse the repository at this point in the history
…component
  • Loading branch information
howard-e committed Sep 6, 2023
1 parent 80b7c45 commit f9a334f
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions client/components/common/TestPlanResultsTable/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { Table } from 'react-bootstrap';
import nextId from 'react-id-generator';
import './TestPlanResultsTable.css';

const renderAssertionRow = assertionResult => {
const renderAssertionRow = (assertionResult, priorityString) => {
return (
<tr key={`${assertionResult.id}__${nextId()}`}>
<td>Required</td>
<td>{priorityString}</td>
<td>{assertionResult.assertion.text}</td>
<td>{assertionResult.passed ? 'Passed' : 'Failed'}</td>
</tr>
Expand Down Expand Up @@ -74,11 +74,17 @@ const TestPlanResultsTable = ({ test, testResult, tableClassName = '' }) => {
</tr>
</thead>
<tbody>
{requiredAssertionResults.map(
renderAssertionRow
{requiredAssertionResults.map(assertionResult =>
renderAssertionRow(
assertionResult,
'Required'
)
)}
{optionalAssertionResults.map(
renderAssertionRow
{optionalAssertionResults.map(assertionResult =>
renderAssertionRow(
assertionResult,
'Optional'
)
)}
</tbody>
</Table>
Expand Down

0 comments on commit f9a334f

Please sign in to comment.