Skip to content

test: wait for a browser problem to arrive before consume_browser_errors reads it - #5781

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-5780
Nov 9, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-5780

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

consume_browser_errors read page.lf_errors the moment it was called. A widget's failure box and its console report reach Python by separate paths, so a test that waited for the box and then consumed the problem could find an empty list. That is what failed test_visual_review_guides_one_typed_still_run on macOS in scheduled run 42604289041: the page showed before is 1800px wide and after is 780px in .lf-error, then consume_browser_errors asserted on []. #5351 and #5352 fixed this same race one test at a time. Now the helper itself keeps the Playwright driver pumping until the first problem arrives, using the same wait reported_browser_errors already had (moved into _await_browser_errors). A closed page stops the wait. What counts as a match is unchanged.

The race only shows on macOS, so the failing run above is the before evidence. On Linux, the visual-review journey, tests/model/test_chrome_contracts.py, the closed-page consumer in test_status_and_news.py and tests/smoke/test_plain_page.py pass with the change. The next scheduled test-macos run shows whether it holds there.

#5780's other nine macOS failures have different causes and stay open there.

Refs #5780 — automated triage

…ors reads it

A widget's failure box and its console report reach Python by separate
paths, so a test that waits for the box and then consumes the problem could
read an empty list. That happened on macOS in scheduled run 42604289041:
test_visual_review_guides_one_typed_still_run saw "before is 1800px wide and
after is 780px" in .lf-error, then consume_browser_errors found no problem.
#5351 and #5352 fixed the same race test by test. consume_browser_errors now
keeps the driver pumping until the first problem arrives, sharing the wait
reported_browser_errors uses. A closed page stops the wait. Its assertion is
unchanged.

Refs #5780
@max-sixty
max-sixty merged commit 2ce2fe2 into main Nov 9, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/issue-5780 branch November 9, 2026 14:40
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.

2 participants