diff --git a/src/web/htmlReport/htmlReport.tsx b/src/web/htmlReport/htmlReport.tsx index f8925cdae2..7154b251a5 100644 --- a/src/web/htmlReport/htmlReport.tsx +++ b/src/web/htmlReport/htmlReport.tsx @@ -128,7 +128,8 @@ const SuiteTreeItem: React.FC<{ } loadChildren={() => { const suiteChildren = suite?.suites.map((s, i) => ) || []; - const testChildren = suite?.tests.map((t, i) => ) || []; + const suiteCount = suite ? suite.suites.length : 0; + const testChildren = suite?.tests.map((t, i) => ) || []; return [...suiteChildren, ...testChildren]; }} depth={depth}>; }; @@ -169,12 +170,13 @@ const TestOverview: React.FC<{ test: JsonTestCase, result: JsonTestResult, }> = ({ test, result }) => { - const { screenshots, attachmentsMap } = React.useMemo(() => { + const { screenshots, video, attachmentsMap } = React.useMemo(() => { const attachmentsMap = new Map(); const screenshots = result.attachments.filter(a => a.name === 'screenshot'); + const video = result.attachments.filter(a => a.name === 'video'); for (const a of result.attachments) attachmentsMap.set(a.name, a); - return { attachmentsMap, screenshots }; + return { attachmentsMap, screenshots, video }; }, [ result ]); return
{test?.title}
@@ -184,6 +186,12 @@ const TestOverview: React.FC<{ {attachmentsMap.has('expected') && attachmentsMap.has('actual') && } {!!screenshots.length &&
Screenshots
} {screenshots.map(a =>
)} + {!!video.length &&
Video
} + {video.map(a =>
+ +
)} {!!result.attachments &&
Attachments
} {result.attachments.map(a => )}