From 10955ef6bd4fd8444d88a37da29dc20f441f5e2f Mon Sep 17 00:00:00 2001 From: Remigiusz Dudek Date: Sat, 12 Oct 2024 04:59:16 +0200 Subject: [PATCH] feat(custom-video-names): recognize video attachment by the contentType --- packages/html-reporter/src/testResultView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/html-reporter/src/testResultView.tsx b/packages/html-reporter/src/testResultView.tsx index 273703a0c7..0bc1235638 100644 --- a/packages/html-reporter/src/testResultView.tsx +++ b/packages/html-reporter/src/testResultView.tsx @@ -70,7 +70,7 @@ export const TestResultView: React.FC<{ const { screenshots, videos, traces, otherAttachments, diffs, errors, htmls } = React.useMemo(() => { const attachments = result?.attachments || []; const screenshots = new Set(attachments.filter(a => a.contentType.startsWith('image/'))); - const videos = attachments.filter(a => a.name === 'video'); + const videos = attachments.filter(a => a.contentType === 'video/webm'); const traces = attachments.filter(a => a.name === 'trace'); const htmls = attachments.filter(a => a.contentType.startsWith('text/html')); const otherAttachments = new Set(attachments);