fix: hide handles for unavailable junction structures
This commit is contained in:
1 parent
2b79085042
commit
f40caaa264
4 files changed
+24
-4
No files matched your search
@@ -598,7 +598,7 @@ assert.notDeepEqual(
|
||||
'a cluster corner constraint must change its compiled corner geometry',
|
||||
);
|
||||
const browsing = browseState(complexArea);
|
||||
const unavailableStructureState = browseState({
|
||||
const unavailableStructureArea = {
|
||||
...complexArea,
|
||||
nativeRoad: {
|
||||
...complexArea.nativeRoad,
|
||||
@@ -610,8 +610,18 @@ const unavailableStructureState = browseState({
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
const unavailableStructureState = browseState(unavailableStructureArea);
|
||||
assert.equal(unavailableStructureState.junctionStructures['cluster:not-compiled'], undefined);
|
||||
const unavailableEditState = editState(unavailableStructureArea, selectionFrom({ cluster: 'not-compiled' }));
|
||||
assert.equal(unavailableEditState.junctionStructure, null);
|
||||
assert.deepEqual(unavailableEditState.handles.handles, []);
|
||||
const unavailablePreview = editPreview(unavailableStructureArea, {
|
||||
document: emptyDocument,
|
||||
selection: { cluster: 'not-compiled' },
|
||||
});
|
||||
assert.equal(unavailablePreview.junctionStructure, null);
|
||||
assert.deepEqual(unavailablePreview.handles.handles, []);
|
||||
assert.ok(browsing.standardsDiagnostics.length, 'browse state retains structure diagnostics');
|
||||
assert.equal(new Set(browsing.standardsDiagnostics.map((item) => item.id)).size, browsing.standardsDiagnostics.length);
|
||||
assert.ok(
|
||||
|
||||
Reference in new issue
Block a user