From d62c90f41ee1b22e232ec54a96bebec5b08e80be Mon Sep 17 00:00:00 2001 From: bflatastic Date: Thu, 5 Nov 2026 10:01:10 +0700 Subject: [PATCH] Tests: Expand Appearance of a Transform's copies makes a group of them --- crates/engine/src/cmd/effectcmd/tests.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/effectcmd/tests.rs b/crates/engine/src/cmd/effectcmd/tests.rs index 639fe44ed..ce8f51183 100644 --- a/crates/engine/src/cmd/effectcmd/tests.rs +++ b/crates/engine/src/cmd/effectcmd/tests.rs @@ -366,14 +366,16 @@ fn expand_appearance_bakes_geometry() { assert!(s.execute("effect.expandAppearance", &json!({})).is_err()); } +/// Each copy is an object of its own (#5612). #[test] -fn expand_transform_copies_makes_compound() { +fn expand_transform_copies_makes_a_group_of_the_copies() { let (mut s, id) = session_with_rect(); s.execute("paint.setStroke", &json!({"none": true})).unwrap(); s.execute("effect.apply", &json!({"effect": "distort.transform", "params": {"moveH": 120, "copies": 1}})).unwrap(); s.execute("effect.expandAppearance", &json!({})).unwrap(); let n = node(&s, id); - assert!(matches!(n.kind, NodeKind::Compound { .. })); + assert!(matches!(n.kind, NodeKind::Group { .. }), "{}", n.kind_label()); + assert_eq!(n.children().map(|c| c.len()), Some(2)); let b = n.geometric_bounds().unwrap(); assert!((b.x1 - 320.0).abs() < 1e-6, "{b:?}"); }