Artwork Cleanup: named type on a locked artboard stays out of the text tools

Add a test that Remove Breaks leaves type on a locked artboard as it is
when ids names it, with no undo step. Rewrap the Text tools paragraph
in docs/mcp.md and name the tests in docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-13 23:08:11 -08:00
parent 984b93a282
commit e76982bfad
3 changed files with 21 additions and 3 deletions
@@ -435,6 +435,23 @@ fn remove_breaks_named_story_with_a_locked_frame() {
assert_eq!(obj(&s, a).plain_text(), "one two");
}
/// Type on a locked artboard stays as it is even when `ids` names it, with no undo step.
#[test]
fn remove_breaks_named_type_on_a_locked_artboard() {
let mut s = session();
let on_board = text(&mut s, json!({"x": 40, "y": 60, "text": "a\nb", "size": 12}));
s.edit("Lock Artboard", |d, _| {
d.artboards[0].locked = true;
Ok(())
})
.unwrap();
let steps = undo_steps(&s);
let r = s.execute("addon.cleanup.removeBreaks", &json!({"kind": "paragraph", "ids": [on_board.0]}));
assert_eq!(other(r), "No paragraph breaks to remove");
assert_eq!(undo_steps(&s), steps);
assert_eq!(obj(&s, on_board).plain_text(), "a\nb");
}
/// Break Text, Combine and Join Point Text, Set Alignment, Keep Position and Reset Text Transform
/// act on the locked and hidden type that `ids` names (type in a locked layer included), each as
/// one undo step, and leave it as it is when it is only selected.