feat(junction): enable complex carriageway width editing

This commit is contained in:
que01 committed 2026-09-08 12:09:44 +08:00
1 parent 56647fcdaa
commit c4bcbe8ff9
22 files changed
+449 -52

No files matched your search

+9 -1
View File
@@ -244,8 +244,16 @@ test.describe('workbench editing shell', () => {
const scoped = await page.request
.get(`/api/edit-state?cluster=${encodeURIComponent(id)}`)
.then((response) => response.json());
expect(scoped.handles.handles).toEqual([]);
expect(scoped.handles.handles.length).toBeGreaterThan(0);
expect(
scoped.handles.handles.every(
(handle: { kind: string; editable: boolean }) => handle.kind === 'cluster-carriageway-width' && handle.editable,
),
).toBe(true);
expect(scoped.junctionStructure.topologyFingerprint).toBe(structure.topologyFingerprint);
await page.getByRole('button', { name: '开启编辑模式' }).click();
await expect(workspace.getByText('路口参数', { exact: true })).toBeVisible();
await expect(workspace.getByText(/车行道宽度/).first()).toBeVisible();
await page.reload();
await expect(armButtons).toHaveCount(structure.arms.length);
await expect(armButtons.first()).toHaveAttribute('aria-pressed', 'false');