Tests: Cmd+A then Cmd+Shift+= keeps the whole text and makes it superscript

The same-frame check now compares the joined run text with the full text as well as
checking that every run is superscript, so an empty or shortened result fails.
This commit is contained in:
dotCooCoo
2026-11-18 06:15:41 -08:00
parent 692cb813ab
commit 3a69187896
+5 -1
View File
@@ -1161,7 +1161,11 @@ fn cmd_shift_equals_and_cmd_alt_shift_equals_toggle_superscript_and_subscript()
let before = zoom(&mut app);
frame(&mut app, [press(Key::A, Modifiers::NONE), press(Key::Equals, shift)].concat());
assert_eq!(zoom(&mut app), before, "no zoom once Select All selected the type");
assert!(positions(&mut app).iter().all(|(_, p)| *p == json!("superscript")), "{:?}", positions(&mut app));
// The earlier mixed selection left the text in two runs; check that both lines are still
// there and every run is superscript.
let runs = positions(&mut app);
assert_eq!(runs.iter().filter_map(|(t, _)| t.as_str()).collect::<String>(), "One\nTwo", "{runs:?}");
assert!(runs.iter().all(|(_, p)| *p == json!("superscript")), "{runs:?}");
}
/// Tab shows and hides the panels, and in the Type tool it types a tab, without moving the