feat(custom-video-names): recognize video attachment by the contentType
This commit is contained in:
parent
699f51b227
commit
10955ef6bd
|
|
@ -70,7 +70,7 @@ export const TestResultView: React.FC<{
|
||||||
const { screenshots, videos, traces, otherAttachments, diffs, errors, htmls } = React.useMemo(() => {
|
const { screenshots, videos, traces, otherAttachments, diffs, errors, htmls } = React.useMemo(() => {
|
||||||
const attachments = result?.attachments || [];
|
const attachments = result?.attachments || [];
|
||||||
const screenshots = new Set(attachments.filter(a => a.contentType.startsWith('image/')));
|
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 traces = attachments.filter(a => a.name === 'trace');
|
||||||
const htmls = attachments.filter(a => a.contentType.startsWith('text/html'));
|
const htmls = attachments.filter(a => a.contentType.startsWith('text/html'));
|
||||||
const otherAttachments = new Set<TestAttachment>(attachments);
|
const otherAttachments = new Set<TestAttachment>(attachments);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue