Skip to content

playwright: fix global error listener - #9301

Merged
alxndrsn merged 3 commits into
apache:masterfrom
alxndrsn:http-attach
Nov 30, 2026
Merged

alxndrsn merged 3 commits into
apache:masterfrom
alxndrsn:http-attach

Conversation

@alxndrsn

@alxndrsn alxndrsn commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Originally set per-page, in 7e15d3b the 'pageerror' listener was moved to the playwright BrowserContext. In BrowserContext, the listener should check for 'weberror' instead.

See:

Since that change, various changes have introduced changes to the integration tests which break them in browser environments (e.g. use of require(), changing var to const causing global variable clashes).

Closes #9299

Effect

Running command:

CLIENT=firefox npm test

This branch

  1884 passing (2m)
  158 pending

master

  1496 passing (2m)
  146 pending

Overview

This PR fixes error handling, and makes the minimal possible changes to tests to make sure they are all loading & running in browsers.

Testing recommendations

CLIENT=firefox npm test

Related Issues or Pull Requests

Checklist

  • I am not a bot
  • This is my own work, I did not use AI, LLM's or similar technology for code or docs generation
  • Code is written and works correctly
  • Changes are covered by tests
  • I modified the types to reflect the changes, if necessary
  • Documentation changes were made in the docs folder

@alxndrsn alxndrsn changed the title test/browsers: catch test load errors; re-instate broken tests playwright: fix global error listener Nov 30, 2026
@alxndrsn
alxndrsn marked this pull request as ready for review November 30, 2026 09:53
@alxndrsn
alxndrsn merged commit f1212d0 into apache:master Nov 30, 2026
89 checks passed
@alxndrsn
alxndrsn deleted the http-attach branch November 30, 2026 10:23
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.

test.attachments.js not run in browsers

2 participants