Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Integration: context menu test expects Paste available with nothing copied (#84 update)

aiongg3725b90a2a92
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();