diff --git a/packages/trace-viewer/src/ui/attachmentsTab.tsx b/packages/trace-viewer/src/ui/attachmentsTab.tsx index 1d2f6d5ccb..344040c935 100644 --- a/packages/trace-viewer/src/ui/attachmentsTab.tsx +++ b/packages/trace-viewer/src/ui/attachmentsTab.tsx @@ -20,6 +20,7 @@ import { ImageDiffView } from '@web/shared/imageDiffView'; import type { MultiTraceModel } from './modelUtil'; import { PlaceholderPanel } from './placeholderPanel'; import type { AfterActionTraceEventAttachment } from '@trace/trace'; +import { isTextualMimeType } from 'playwright-core/lib/utils'; type Attachment = AfterActionTraceEventAttachment & { traceUrl: string }; @@ -106,7 +107,7 @@ export const AttachmentsTab: React.FunctionComponent<{ {[...attachments.values()].map((a, i) => { return
{a.name} - { a.contentType === 'text/plain' && + { isTextualMimeType(a.contentType) && }
;