Skip to content

fix(playwright): use vnd.allure.playwright-trace content type for trace attachments (fixes #1381) - #1380

Open
antonfilichkin wants to merge 1 commit into
allure-framework:mainfrom
antonfilichkin:fix/playwright-trace-content-type
Open

fix(playwright): use vnd.allure.playwright-trace content type for trace attachments (fixes #1381)#1380
antonfilichkin wants to merge 1 commit into
allure-framework:mainfrom
antonfilichkin:fix/playwright-trace-content-type

Conversation

@antonfilichkin

@antonfilichkin antonfilichkin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Context

Fixes #1381

Problem

AllurePlaywright.attachTrace() attached Playwright trace archives using the generic application/zip content type, so the Allure report rendered them as a plain zip download instead of using the built-in embedded trace viewer.

Fix

Added a shared AttachmentType.PLAYWRIGHT_TRACE constant (application/vnd.allure.playwright-trace, already registered in WellKnownFileExtensionsUtils mapped to the .zip extension) alongside the other predefined types (PNG, ZIP, WEBM, ...), and switched attachTrace() to use it. The .zip file extension behavior is unchanged.

Testing

Extended the three existing trace-attachment tests to assert the attachment's type is AttachmentType.PLAYWRIGHT_TRACE.getMediaType(), in addition to the existing zip-payload checks.

Checklist

  • Sign Allure CLA
  • Provide unit tests

@antonfilichkin
antonfilichkin marked this pull request as draft August 13, 2026 08:41
@antonfilichkin
antonfilichkin deleted the fix/playwright-trace-content-type branch August 13, 2026 08:43
@antonfilichkin antonfilichkin changed the title fix(playwright): use vnd.allure.playwright-trace content type for trace attachments fix(playwright): use vnd.allure.playwright-trace content type for trace attachments (fixes #1381) Aug 13, 2026
@antonfilichkin
antonfilichkin force-pushed the fix/playwright-trace-content-type branch from 91a8d7d to 6c17e4e Compare August 13, 2026 14:01
@antonfilichkin
antonfilichkin marked this pull request as ready for review August 13, 2026 14:03
@antonfilichkin
antonfilichkin force-pushed the fix/playwright-trace-content-type branch from 6180db2 to f989368 Compare August 13, 2026 14:04
@antonfilichkin
antonfilichkin marked this pull request as draft August 13, 2026 14:06
…ce attachments

AllurePlaywright.attachTrace() tagged Playwright trace archives with the
generic application/zip content type, so the Allure report rendered them
as a plain zip download instead of the embedded trace viewer.

Add a shared AttachmentType.PLAYWRIGHT_TRACE constant (application/vnd.allure.playwright-trace,
mapped to WellKnownFileExtensionsUtils' .zip extension) and switch attachTrace()
to use it, keeping the .zip extension behavior unchanged.
@antonfilichkin
antonfilichkin force-pushed the fix/playwright-trace-content-type branch from f989368 to 0e414c3 Compare August 13, 2026 14:14
@antonfilichkin
antonfilichkin marked this pull request as ready for review August 13, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playwright traces render as zip download instead of embedded trace viewer

1 participant