SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
test: failing regression test for #373 (ignored until fixed) (#381)
Jonas Wredee7b5b2618e23
diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rsindex 31ce16e3dc..292a12e80e 100644--- a/crates/engine/src/tests.rs+++ b/crates/engine/src/tests.rs@@ -2731,3 +2731,22 @@ fn raising_a_pattern_count_after_a_rename_numbers_the_new_copy_after_the_others(let fourth = run(&mut s, "inspect.measure", json!({"bodies": ["X (4)"]}));assert_eq!(fourth["bodies"][0]["bbox"]["min"][0].as_f64().map(f64::round), Some(60.0), "{fourth}");}++/// A profile added to the sketch after a named multi-profile extrude is named after `body_name`+/// too (#373).+#[test]+#[ignore = "fails until #373 is fixed"]+fn a_profile_added_later_is_named_after_body_name() {+ let mut s = Session::default();+ run(&mut s, "sketch.create", json!({"plane": "XY", "name": "R"}));+ for x in [0, 10, 20] {+ run(&mut s, "sketch.rectangle.two_point", json!({"p0": [x, 0], "p1": [x + 5, 30]}));+ }+ run(&mut s, "sketch.finish", json!({}));+ run(&mut s, "solid.extrude", json!({"sketch": "R", "distance": "10", "operation": "new_body", "body_name": "Ribs"}));+ run(&mut s, "sketch.edit", json!({"sketch": "R"}));+ run(&mut s, "sketch.rectangle.two_point", json!({"p0": [30, 0], "p1": [35, 30]}));+ run(&mut s, "sketch.finish", json!({}));+ let names: Vec<String> = s.model.state().bodies.iter().map(|b| b.name.clone()).collect();+ assert_eq!(names, ["Ribs", "Ribs (2)", "Ribs (3)", "Ribs (4)"]);+}