Skip to content

fix: update html report test - screenshot opens in new tab#747

Open
empiricalrun[bot] wants to merge 1 commit intomainfrom
chat-session_Tf0AkzpQTNUc
Open

fix: update html report test - screenshot opens in new tab#747
empiricalrun[bot] wants to merge 1 commit intomainfrom
chat-session_Tf0AkzpQTNUc

Conversation

@empiricalrun
Copy link
Copy Markdown
Contributor

@empiricalrun empiricalrun Bot commented Mar 9, 2026

Summary

The playwright html report works test was failing because it expected screenshot, error-context, and video attachment links to trigger downloads, but the app has changed to open these attachments in a new browser tab instead.

Root Cause

The Playwright HTML report now opens attachments (screenshots, error-context files, videos) in a new tab rather than downloading them. The test at tests/test-runs.spec.ts was using page.waitForEvent('download') which was timing out (15000ms) since no download was triggered.

Failure error from test run #57029:

TimeoutError: page.waitForEvent: Timeout 15000ms exceeded while waiting for event "download"

Changes

Replaced all three waitForEvent('download') assertions with waitForEvent('popup') to verify the attachments open in new tabs:

  • Screenshot link: Now waits for a popup and verifies the URL matches an image extension (.png, .jpg, .jpeg, .webp)
  • Error-context link: Now waits for a popup and verifies a new tab opens
  • Video link: Now waits for a popup and verifies the URL matches .webm

All three new tabs are closed after verification to keep the test clean.

Test Run

The test was skipped in my local run attempts due to an auth credential issue in the local runner environment (not related to these changes). The fix is based on confirmed analysis of the original failure and matches the expected behavior described by the user — screenshots should open in a new tab as an image instead of downloading.

PR created from session #95456 by Arjun Attam

Updated at 2026-03-09 08:02:04.768 UTC

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.

0 participants