diff --git a/crates/ui-egui/src/tests.rs b/crates/ui-egui/src/tests.rs index fd769217b..07c8709c9 100644 --- a/crates/ui-egui/src/tests.rs +++ b/crates/ui-egui/src/tests.rs @@ -1769,11 +1769,17 @@ fn alt_digit_runs_a_quick_access_slot_unless_text_is_edited() { if runs { !before } else { before }, "mac={mac}, editing={editing}, backstage={backstage}, key={key:?}" ); - assert_eq!( - serde_json::to_value(&h.state().session.active().unwrap().doc).unwrap(), - document, - "mac={mac}, editing={editing}, backstage={backstage}, key={key:?}" - ); + let after = serde_json::to_value(&h.state().session.active().unwrap().doc).unwrap(); + if editing { + // The framework composes a top-row Alt code into the text being edited (craft-libs alt_code, the suite's + // rule since the sync); what this guards is that the slot does not run, and only the edited text changes. + let title = |doc: &serde_json::Value| doc["slides"][0]["shapes"][0].clone(); + let mut rest = after.clone(); + rest["slides"][0]["shapes"][0] = title(&document); + assert_eq!(rest, document, "only the edited text changes: mac={mac}, key={key:?}"); + } else { + assert_eq!(after, document, "mac={mac}, editing={editing}, backstage={backstage}, key={key:?}"); + } } }