Skip to content

armgit / SOMA

Public Imported from GitHub
0

Desktop app for designing parametric 3D models in CadQuery together with the coding agent of your choice

Tests: allow whole MPa values in the FEM probe check

Kai-Jungsthoefelf459d19dae9c
diff --git a/app/test/fem.mjs b/app/test/fem.mjs
index 733f05d..30a5f0f 100644
--- a/app/test/fem.mjs
+++ b/app/test/fem.mjs
@@ -211,7 +211,7 @@ try {
const pin2 = await ev((p) => window.__t.resultPin(p.x, p.y), at);
await ev(() => window.__t.viewer.setView('iso'));
rs = await ev(() => window.__t.result());
- check('Stelle bei Spannung: MPa zuerst, Sicherheit danach', pin2?.stress != null && /: Balken, \d+\.\d MPa · Safety /.test(rs.probe), rs.probe);
+ check('Stelle bei Spannung: MPa zuerst, Sicherheit danach', pin2?.stress != null && /: Balken, \d+(\.\d)? MPa · Safety /.test(rs.probe), rs.probe);
await pick('result-range', 'minmax');
rs = await ev(() => window.__t.result());
check('Min bis Max: Spanne der Spannungen im Modell (bis rund 30 MPa)', rs.scale.mode === 'minmax' && rs.scale.range[0] >= 0 && rs.scale.range[0] < 5