Skip to content

test(web): wait for the graph to come to rest, and take ResizeObserver's notice for one - #380

Merged
futrime merged 1 commit into
mainfrom
test/web-page-waits
Oct 12, 2026
Merged

futrime merged 1 commit into
mainfrom
test/web-page-waits

Conversation

@futrime

@futrime futrime commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What

Two causes of flakes in the browser tests, found while checking main for release. Since #369 these live in tests/system/web/, and this PR changes them there.

  • test_the_graph_is_dragged_anywhere_zoomed_by_the_wheel_and_recentred read a node's centre right after a drag, a wheel and Recenter, and read a session's bounding_box() that a redraw may have just replaced. Under load this failed with assert None, assert 22.75 < 2 and similar. Before test: move the web page's browser tests to tests/system, and run the web topic in tests #369 it failed in CI too. It now polls until the node is within the 2 px it asks for (10 s at most), waits for a box to be drawn, and settles only once the canvas and the node have held still for a second.
  • WebKit reports ResizeObserver loop completed with undelivered notifications as a pageerror on a busy machine. Before test: move the web page's browser tests to tests/system, and run the web topic in tests #369 this failed test_a_runtime_is_set_up_field_by_field[webkit] in CI. It's a browser notice, so opened() no longer counts it as a page error.

Test-only; no product change.

Verification

At 2 × CPUs workers on an 18-core Mac: before the change, 2 of 6 runs of the browser topic failed; after it, 8 of 8 passed (pre-#369 layout), and tests/system/web passed 5 of 5 after the rebase.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 12, 2026 15:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…r's notice for one

The graph test measured a node at once after a drag, a wheel and Recenter,
and read a session's box that a redraw may just have replaced: on a busy
machine the frame that moves it comes late, and the box is None. It now waits
until the node comes within the two pixels it asks, and for a box to be drawn;
and it settles only once the canvas, as well as the node, has held still for
a second.

WebKit raises "ResizeObserver loop completed with undelivered notifications"
as a page error on a busy machine. It is a notice, and no longer fails a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@futrime
futrime force-pushed the test/web-page-waits branch from bcedb0a to a36fbb6 Compare October 12, 2026 15:06
@futrime
futrime enabled auto-merge October 12, 2026 15:07
@futrime
futrime added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit c11d313 Oct 12, 2026
11 of 12 checks passed
@futrime
futrime deleted the test/web-page-waits branch October 12, 2026 15:15
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