feat(junction): enforce stage3 geometry validation on save
This commit is contained in:
1 parent
cb55b3ad68
commit
63c6cefce7
9 files changed
+90
No files matched your search
@@ -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'),
|
||||
|
||||
Reference in new issue
Block a user