Skip to content

Commit

Permalink
Handle reports starting with an action_generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJamesC committed Oct 13, 2023
1 parent 24bd9ee commit 58e968e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions reports/src/capability/reportParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 58e968e

Please sign in to comment.