DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
Searched UI commands test: a text selected context, where Convert Text to Table runs
moppeeer69e8ab0d3afa
diff --git a/crates/ui-egui/src/menus/tests.rs b/crates/ui-egui/src/menus/tests.rsindex 69e72e47e..45bf6a794 100644--- a/crates/ui-egui/src/menus/tests.rs+++ b/crates/ui-egui/src/menus/tests.rs@@ -1953,7 +1953,7 @@ fn searched_ui_commands_run_without_parameters_and_keep_preferences() {let mut scratch = designcraft_engine::Session::new();scratch.execute("file.new", &json!({})).unwrap();let pdf = scratch.execute("file.exportPdf", &json!({})).unwrap()["base64"].clone();- let contexts = ["nothing selected", "text insertion point", "text frame selected", "table cell", "placed PDF selected"];+ let contexts = ["nothing selected", "text insertion point", "text frame selected", "table cell", "placed PDF selected", "text selected"];// A two-page document, a saved workspace and non-default preferences, a host with window// controls, and file dialogs that are dismissed.let setup = |context: usize| {@@ -1987,6 +1987,11 @@ fn searched_ui_commands_run_without_parameters_and_keep_preferences() {app.run("file.place", json!({"base64": pdf, "name": "a.pdf", "frame": f})).unwrap();app.run("selection.set", json!({"ids": [f]})).unwrap();}+ // Convert Text to Table needs text selected.+ 5 => {+ let f = app.run("frame.create", json!({"rect": [72, 72, 400, 400], "content": "text", "text": "One Two"})).unwrap();+ app.run("text.select", json!({"story": f["story"], "anchor": 0, "focus": 7})).unwrap();+ }_ => {}}app.ui.dialog = None;