From 58e968e2038d30cc053761fec085475243e3bbf7 Mon Sep 17 00:00:00 2001 From: Christopher Chiche Date: Fri, 13 Oct 2023 16:07:34 +0200 Subject: [PATCH] Handle reports starting with an action_generator --- reports/src/capability/reportParser.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/reports/src/capability/reportParser.ts b/reports/src/capability/reportParser.ts index a0df25b..3a7a46f 100644 --- a/reports/src/capability/reportParser.ts +++ b/reports/src/capability/reportParser.ts @@ -240,12 +240,15 @@ const parseActions = ( }; const _parseReport = (report: ReportsReportTestSuiteActionReport): Report => { - if (report.test_suite) { + const testSuite: ReportsReportTestSuiteReport | undefined | null = + report.test_suite || + report.action_generator?.actions.find((a) => !!a.test_suite)?.test_suite; + if (testSuite) { return { - name: report.test_suite.name, - participants: report.test_suite.capability_evaluations.map( - (c) => c.participant_id - ), + name: testSuite.name, + participants: testSuite.capability_evaluations + .map((c) => c.participant_id) + .sort(), capability: { name: "root", childCapabilities: parseActions(report),