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

This commit is contained in:
bflatastic
2026-11-23 19:48:48 +07:00
parent 4f5c4d6544
commit 2aeb45a6d2
+2 -1
View File
@@ -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:?}");