From 2aeb45a6d2473fdc50718c87ba48b8a63cbc391c Mon Sep 17 00:00:00 2001 From: bflatastic Date: Mon, 23 Nov 2026 19:48:48 +0700 Subject: [PATCH] Tests: the toolbar footer case finds the rail by its toolbar role, not the first node named Tools: the dock grip above it is named for the pane too --- crates/ui-egui/src/toolbar/tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/toolbar/tests.rs b/crates/ui-egui/src/toolbar/tests.rs index 03deb9500d..8ce239031f 100644 --- a/crates/ui-egui/src/toolbar/tests.rs +++ b/crates/ui-egui/src/toolbar/tests.rs @@ -271,7 +271,8 @@ fn the_paint_and_drawing_mode_buttons_fit_the_toolbar_width() { for (k, double) in [false, true].into_iter().enumerate() { app.run("window.toolbarColumns", json!({ "double": double })).unwrap(); nodes = settled(&mut app, &ctx, k as f64 * 10.0, 900.0); - let rail = named_rect(&nodes, "Tools"); + // The rail itself, not its dock grip, which is named for the pane too. + let rail = nodes.iter().find(|n| n.role() == Role::Toolbar && n.label() == Some("Tools")).and_then(bounds).expect("the rail is drawn"); for label in &footer[..if double { 6 } else { 4 }] { let r = named_rect(&nodes, label); assert!(rail.expand(0.5).contains_rect(r), "double {double}: {label} {r:?} in {rail:?}");