From 73383c09a7d4a0642f288630cfb044888bdaf4b8 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Fri, 27 Nov 2026 07:10:48 +0000 Subject: [PATCH] red-fw-2c: help search trial finds the result by its HelpEntry label (q311 A) Written by a Codex red fixer; committed by the lead. Co-Authored-By: Claude Opus 5.5 --- crates/ui-widgets/tests/it/menu/bar.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui-widgets/tests/it/menu/bar.rs b/crates/ui-widgets/tests/it/menu/bar.rs index 0c5f90c5d0..0e760eaee3 100644 --- a/crates/ui-widgets/tests/it/menu/bar.rs +++ b/crates/ui-widgets/tests/it/menu/bar.rs @@ -16,7 +16,7 @@ struct Rig { } fn entries() -> Vec { - // The help rows show their command's label, so each entry has its own command. + // Help rows show their entry's label, which can differ from the command's label. vec![ HelpEntry::new(EditCommands::Paste, "Café").with_path(["Edit"]), HelpEntry::new(EditCommands::Copy, "Copy").with_english("Duplicate").with_path(["Edit"]), @@ -60,11 +60,11 @@ fn help_search_ignores_accents_and_matches_the_english_label_and_the_path() { rig.fixture.settle(); let search = rig.fixture.by_label("Search menus").expect("the search field"); rig.fixture.click(&search); - for (typed, found, absent) in [("cafe", "Paste", "Copy"), ("duplic", "Copy", "Paste"), ("clipboard", "Cut", "Copy")] { + for (typed, found, absent) in [("cafe", "Café", "Copy"), ("duplic", "Copy", "Café"), ("clipboard", "Cut", "Copy")] { rig.fixture.key(Key::A, Modifiers::COMMAND); rig.fixture.type_text(typed); rig.fixture.settle(); - assert!(rig.open(found), "{typed:?} finds the entry whose command row reads {found:?}"); + assert!(rig.open(found), "{typed:?} finds the help entry labelled {found:?}"); assert!(!rig.open(absent), "{typed:?} leaves {absent:?} out"); } }