feat(junction): enforce stage3 geometry validation on save

This commit is contained in:
que01 committed 2026-09-07 15:47:34 +08:00
1 parent cb55b3ad68
commit 63c6cefce7
9 files changed
+90

No files matched your search

+10
View File
@@ -154,6 +154,16 @@ const junctionSaved = saveEdits(area, {
operations: junctionOperations,
});
assert.equal(junctionSaved.documentVersion, 3);
assert.throws(
() =>
saveEdits(area, {
expectedDocumentVersion: 3,
constraints: [{ ...junctionConstraint, value: { widthMeters: 1 } }],
operations: [junctionOperation],
}),
(error) => error.statusCode === 400 && /不能小于/.test(error.message),
'blocking junction geometry diagnostics must prevent saving',
);
const junctionCompiled = compileInput({
...input,
outDir: path.join(workspace, 'outputs', 'junction-with-edits'),