From 4ebc3d078285a83a68344d79c8872fd36e3a93c0 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Thu, 29 Oct 2026 22:32:31 -0400 Subject: [PATCH] UI tests: the thread catalogue's error and Press Pull's hole wall as they are now - A modelled thread reopened with the designation 1/4-20 UNC on the M8 it was made as: the thread is metric, and since b4549d270 (threads in the standard forms) an unknown designation is named with its form: "unknown metric thread `1/4-20 UNC` (like M8 or M8x1)". The test looked for the old wording, "ISO metric". - Press Pull on a hole's wall opens Offset Faces with the whole wall: one face, closed on its seam, on SMLib (a cylinder wall was two halves on truck). Fixes ui-egui dialogs_thread::contribution_tests::expanded_catalogue_rejects_external_taper_holes_and_nonmetric_thread_features and preselect_tests::press_pull_then_curved_face_offsets_it. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/dialogs_thread.rs | 4 +++- crates/ui-egui/src/preselect_tests.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/ui-egui/src/dialogs_thread.rs b/crates/ui-egui/src/dialogs_thread.rs index 516210998..b3cf41493 100644 --- a/crates/ui-egui/src/dialogs_thread.rs +++ b/crates/ui-egui/src/dialogs_thread.rs @@ -1087,7 +1087,9 @@ mod contribution_tests { *designation = Some("1/4-20 UNC".into()); *modeled = true; let reopened = Session::new(Document::from_json(&app.session.doc.to_json()).unwrap()); - assert!(reopened.model.results.last().unwrap().error.as_ref().unwrap().contains("ISO metric")); + // The thread is metric (the M8 it was made as): a unified designation is not one of its. + let error = reopened.model.results.last().unwrap().error.clone().unwrap(); + assert!(error.contains("unknown metric thread `1/4-20 UNC`"), "{error}"); } #[test] diff --git a/crates/ui-egui/src/preselect_tests.rs b/crates/ui-egui/src/preselect_tests.rs index bf880da4c..0fdcdcecc 100644 --- a/crates/ui-egui/src/preselect_tests.rs +++ b/crates/ui-egui/src/preselect_tests.rs @@ -799,8 +799,8 @@ fn press_pull_then_curved_face_offsets_it() { crate::viewport::dialog_pick(&mut app, &hit, Sel::Face { body: "Body1".into(), index: wall, point: p }); let d = app.dialog.clone().unwrap(); assert!(matches!(d.kind, Kind::OffsetFaces { .. })); - // Both halves of the hole's wall. - assert_eq!(d.inputs[0].items.len(), 2); + // The hole's whole wall: one face, closed on its seam. + assert_eq!(d.inputs[0].items.len(), 1); let mut app = app_with(script); app.start("solid.press_pull");