From d162efacaa9722a3e214a8deeddeba00541231ac Mon Sep 17 00:00:00 2001 From: RiceDee <345114586+RiceDee@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:57:46 +1100 Subject: [PATCH] test(ui): the Redo test checks Undo restores the exact paragraph text --- crates/ui-egui/tests/it/editing.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/it/editing.rs b/crates/ui-egui/tests/it/editing.rs index b19f69cb46..2df634ef2f 100644 --- a/crates/ui-egui/tests/it/editing.rs +++ b/crates/ui-egui/tests/it/editing.rs @@ -6143,13 +6143,14 @@ fn redo_after_undoing_typing_puts_the_typing_back() { h.run_steps(4); assert_eq!(h.state().session.get(h.state().views[0].id).unwrap().can_redo(), Some("Edit text")); open_paragraph(&mut h); + let original = h.state().views[0].line_editor.as_ref().unwrap().text.clone(); h.key_press_modifiers(Modifiers::COMMAND, Key::End); h.event(egui::Event::Text(" more".into())); h.run_steps(2); let typed = h.state().views[0].line_editor.as_ref().unwrap().text.clone(); h.key_press_modifiers(Modifiers::COMMAND, Key::Z); h.run_steps(3); - assert_ne!(h.state().views[0].line_editor.as_ref().unwrap().text, typed, "the typing is taken back"); + assert_eq!(h.state().views[0].line_editor.as_ref().unwrap().text, original, "the typing is taken back"); h.key_press_modifiers(Modifiers::COMMAND | Modifiers::SHIFT, Key::Z); h.run_steps(3); let s = h.state();