From 3725b90a2a92b4a2d48b7bfb6356ac7929d58799 Mon Sep 17 00:00:00 2001 From: aiongg Date: Sun, 11 Oct 2026 19:14:30 +0000 Subject: [PATCH] Integration: context menu test expects Paste available with nothing copied (#84 update) The #84 update enables edit.paste whenever a document is open, since the system clipboard may hold another app's text. next's right_clicking_an_object_selects_it_and_its_menu_arranges_it (from the context-menu work) asserted Paste greyed before any copy; it asserts Paste is available. --- crates/ui-egui/src/canvas.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index 3191fa296..e9e0a328a 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -2838,7 +2838,8 @@ mod tests { // An empty frame's menu: Content, but no Fitting (nothing to fit) and no text frame entries. assert!(menu_row(&h, "Content").is_some()); assert!(menu_row(&h, "Fitting").is_none() && menu_row(&h, "Text Frame Options…").is_none()); - assert!(enabled(&h, "Copy") && !enabled(&h, "Paste"), "nothing copied yet: Paste is greyed"); + // Paste is available with nothing copied here: the system clipboard may hold another app's text. + assert!(enabled(&h, "Copy") && enabled(&h, "Paste")); menu_row(&h, "Arrange").unwrap().click(); h.run_steps(3); menu_row(&h, "Bring to Front").unwrap().click();