mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-06 20:02:16 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user