Skip to content

Commit

Permalink
feat(html-reporter): recognize video attachment by the contentType (#…
Browse files Browse the repository at this point in the history
…33074)

Closes #33073.

---------

Signed-off-by: Remigiusz Dudek <[email protected]>
Co-authored-by: Dmitry Gozman <[email protected]>
  • Loading branch information
RemigiuszDudek and dgozman authored Oct 14, 2024
1 parent 0a63427 commit 4c2d62a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/html-reporter/src/testResultView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.startsWith('video/'));
const traces = attachments.filter(a => a.name === 'trace');
const htmls = attachments.filter(a => a.contentType.startsWith('text/html'));
const otherAttachments = new Set<TestAttachment>(attachments);
Expand Down

0 comments on commit 4c2d62a

Please sign in to comment.