mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-26 04:27:49 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
15d43e03c0
commit
35ff705ba8
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user