From b11e910bafbe10add9d3f347dd800f79b9434e9a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 16 Nov 2026 16:50:30 -0800 Subject: [PATCH] Command Palette: the recent-pick ranking test checks that the second Enter runs the effect The test asserted only the recent list, which already held the effect, so a refused second pick would also have passed. It now checks that the effect's dialog opens. --- crates/ui-egui/src/palette.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/palette.rs b/crates/ui-egui/src/palette.rs index 840fd9d3a4..07fe6e8416 100644 --- a/crates/ui-egui/src/palette.rs +++ b/crates/ui-egui/src/palette.rs @@ -1532,7 +1532,8 @@ mod tests { let label = entries.iter().find(|e| e.id == effect).map(row_label).unwrap(); assert_eq!(field_description(&nodes), format!("1 of {}: {label}", after.len())); open.press(egui::Key::Enter, 1); - assert_eq!(open.app.ui.recent_commands, [effect], "Enter ran the effect again"); + assert!(open.app.ui.dialog.is_some(), "Enter ran the effect again: {}", open.app.ui.status); + assert_eq!(open.app.ui.recent_commands, [effect]); } /// The kept ranking of a query is ranked again when the recent picks change, and a saved id