From 705bb1d643686b2d2e3d0fe4dd948e70b69dd527 Mon Sep 17 00:00:00 2001 From: yoriswind Date: Fri, 20 Nov 2026 00:01:11 -0800 Subject: [PATCH] M3: Locate the actual decorated category menu items in readout tests --- crates/ui-egui/tests/panel_readout_copy.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/panel_readout_copy.rs b/crates/ui-egui/tests/panel_readout_copy.rs index fb9fe7e0bc..aaf4e5e100 100644 --- a/crates/ui-egui/tests/panel_readout_copy.rs +++ b/crates/ui-egui/tests/panel_readout_copy.rs @@ -133,7 +133,14 @@ impl App { // A newly opened egui popup first measures an invisible sizing pass. Read its painted // category only after normal subsequent layout frames, as the user sees it. let menu = self.settle(); - let item = painted(&menu, category).0.center(); + // menu_item_name paints the check column in the same galley as the label. + // Match that real menu text without trimming any copied readout or user data. + let item = [" ", "✓ "] + .into_iter() + .map(|prefix| format!("{prefix}{category}")) + .find(|text| visible_text_count(&menu, text) > 0) + .map(|text| painted(&menu, &text).0.center()) + .unwrap_or_else(|| panic!("fixture: no painted category menu item {category:?}")); self.tap(item); self.settle() }