diff --git a/client/components/Reports/SummarizeTestPlanReport.jsx b/client/components/Reports/SummarizeTestPlanReport.jsx index 0b21f494c..c20f80395 100644 --- a/client/components/Reports/SummarizeTestPlanReport.jsx +++ b/client/components/Reports/SummarizeTestPlanReport.jsx @@ -24,7 +24,7 @@ const ResultsContainer = styled.div` border-left: 1px solid #dee2e6; border-right: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6; - margin-bottom: 2em; + margin-bottom: 0.5em; `; const getTestersRunHistory = ( @@ -180,7 +180,7 @@ const SummarizeTestPlanReport = ({ testPlanVersion, testPlanReports }) => { ) : null} - {testPlanReport.finalizedTestResults.map(testResult => { + {testPlanReport.finalizedTestResults.map((testResult, index) => { const test = testResult.test; const reportLink = `https://aria-at.w3.org${location.pathname}#result-${testResult.id}`; @@ -211,7 +211,8 @@ const SummarizeTestPlanReport = ({ testPlanVersion, testPlanReports }) => {

- {test.title} ({passedAssertionsCount} + Test {index + 1}: {test.title} ( + {passedAssertionsCount}  passed, {failedAssertionsCount} failed)

@@ -248,6 +249,10 @@ const SummarizeTestPlanReport = ({ testPlanVersion, testPlanReports }) => { key={`TestPlanResultsTable__${testResult.id}`} test={{ ...test, at }} testResult={testResult} + optionalHeader={ +

Results for each command

+ } + commandHeadingLevel={4} /> diff --git a/client/components/common/TestPlanResultsTable/index.jsx b/client/components/common/TestPlanResultsTable/index.jsx index d20488df1..49c5a99d1 100644 --- a/client/components/common/TestPlanResultsTable/index.jsx +++ b/client/components/common/TestPlanResultsTable/index.jsx @@ -14,9 +14,18 @@ const renderAssertionRow = (assertionResult, priorityString) => { ); }; -const TestPlanResultsTable = ({ test, testResult, tableClassName = '' }) => { +const TestPlanResultsTable = ({ + test, + testResult, + tableClassName = '', + optionalHeader = null, + commandHeadingLevel = 3 +}) => { + const CommandHeading = `h${commandHeadingLevel}`; + return ( <> + {optionalHeader} {testResult.scenarioResults.map((scenarioResult, index) => { const passedAssertions = scenarioResult.assertionResults.filter( assertionResult => assertionResult.passed @@ -56,11 +65,11 @@ const TestPlanResultsTable = ({ test, testResult, tableClassName = '' }) => { return ( -

+ {commandsString} Results:  {passedAssertions.length} passed,  {failedAssertions.length} failed -

+

{test.at?.name} Response:

@@ -135,7 +144,9 @@ TestPlanResultsTable.propTypes = { testResult: PropTypes.shape({ scenarioResults: PropTypes.array.isRequired }), - tableClassName: PropTypes.string + tableClassName: PropTypes.string, + optionalHeader: PropTypes.node, + commandHeadingLevel: PropTypes.number }; export default TestPlanResultsTable;