feat(workbench): stabilize junction tools workspace
This commit is contained in:
1 parent
e6b822416d
commit
f10a5da325
22 files changed
+1078
-53
No files matched your search
@@ -122,6 +122,11 @@ assert.notEqual(
|
||||
stopLineHandle.axisAzimuth,
|
||||
'crosswalk inset and stop-line offset use opposite positive directions along the approach',
|
||||
);
|
||||
assert.equal(
|
||||
(crosswalkHandle.axisAzimuth + 180) % 360,
|
||||
stopLineHandle.axisAzimuth,
|
||||
'increasing crosswalk inset moves toward the junction while increasing stop-line offset moves away',
|
||||
);
|
||||
|
||||
// A selection scopes the manifest to the object being edited. The whole-area
|
||||
// manifest is 844 KB on a 41-road workspace, 89% of it `affects` id lists, while
|
||||
@@ -324,6 +329,25 @@ assert.equal(allKindsResolution.junctionPlans.get('junction').approaches['segmen
|
||||
assert.equal(allKindsResolution.junctionPlans.get('junction').approaches['segment:a'].cutbackMeters, 2);
|
||||
assert.equal(allKindsResolution.junctionPlans.get('junction').corners['segment:a->segment:b'], 4);
|
||||
assert.equal(allKindsResolution.effectiveJunctionPlans.get('node:junction').approaches['segment:a'].widthMeters, 7);
|
||||
const independentCorners = resolveDirectEditConstraints(
|
||||
junctionModel,
|
||||
document([
|
||||
constraint({
|
||||
id: 'corner-radius-a',
|
||||
kind: 'junction-corner-radius',
|
||||
anchor: { type: 'junction-corner', nodeId: 'junction', incomingRoadId: 'segment:a', outgoingRoadId: 'segment:b' },
|
||||
value: { radiusMeters: 4 },
|
||||
}),
|
||||
constraint({
|
||||
id: 'corner-radius-b',
|
||||
kind: 'junction-corner-radius',
|
||||
anchor: { type: 'junction-corner', nodeId: 'junction', incomingRoadId: 'segment:b', outgoingRoadId: 'segment:c' },
|
||||
value: { radiusMeters: 10 },
|
||||
}),
|
||||
]),
|
||||
);
|
||||
assert.equal(independentCorners.junctionPlans.get('junction').corners['segment:a->segment:b'], 4);
|
||||
assert.equal(independentCorners.junctionPlans.get('junction').corners['segment:b->segment:c'], 10);
|
||||
|
||||
const clusterResolution = resolveDirectEditConstraints(junctionModel, document(allKinds), {
|
||||
junctionClusters: [{ id: 'cluster-1', nodeIds: ['junction'] }],
|
||||
|
||||
@@ -121,7 +121,12 @@ test.describe('workbench editing shell', () => {
|
||||
await expect(page.getByText('设施与验证', { exact: true })).toBeVisible();
|
||||
await expect(page.getByText('当前为浏览模式,开启编辑后可调整路口几何参数')).toBeVisible();
|
||||
await page.getByRole('button', { name: '开启编辑模式' }).click();
|
||||
await expect(page.getByRole('switch', { name: '编辑模式' })).toBeChecked();
|
||||
await expect(page.getByLabel('路口编辑工作区').getByText('道路参数', { exact: true })).toBeVisible();
|
||||
await expect(
|
||||
page
|
||||
.getByLabel('路口编辑工作区')
|
||||
.getByText(/进口宽度/)
|
||||
.first(),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user