From 35ff705ba89406d9d14be8f4a3b3b754aee647f8 Mon Sep 17 00:00:00 2001 From: Martin Ball Date: Thu, 19 Nov 2026 22:15:11 +0000 Subject: [PATCH] fwstub-1: the unlabelled-row label trial clicks the label node, not the field's group (both are named by the label; the scope and the click-to-focus were intact after the sync, the trial picked whichever "Turn" node the tree listed first); trial Co-Authored-By: Claude Opus 5.5 --- crates/ui-widgets/tests/it/label/hit.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ui-widgets/tests/it/label/hit.rs b/crates/ui-widgets/tests/it/label/hit.rs index 2f094e39a..5856d65fd 100644 --- a/crates/ui-widgets/tests/it/label/hit.rs +++ b/crates/ui-widgets/tests/it/label/hit.rs @@ -175,7 +175,12 @@ fn a_click_on_a_label_focuses_its_control_inside_an_unlabelled_row() { fixture.settle(); let control = NodeKey::of(field.get()); let tree = fixture.tree(); - let label = tree.keys().into_iter().find(|key| *key != control && tree.name_of(*key) == Some("Turn")); + // The field's group is named "Turn" too and is labelled by the label: the label is the "Turn" node that no other + // node labels. Picking the first "Turn" node clicked the group whenever the tree listed it first. + let label = tree + .keys() + .into_iter() + .find(|key| *key != control && tree.name_of(*key) == Some("Turn") && tree.labelled_by_key(*key).is_empty()); let label = label.and_then(|key| fixture.target(key)).expect("the field's label node"); fixture.access(AccessActionKind::Click, &label).settle(); assert_eq!(fixture.focused_stop().map(|(id, _)| id), Some(field.get()), "the click on the label focuses the number field");