feat: inspect native junctions in workbench

This commit is contained in:
2026-08-14 15:31:48 +08:00
parent 65cf8b96d9
commit 3d57655497
3 changed files with 18 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ const html = fs.readFileSync(path.join(__dirname, "workbench", "index.html"), "u
assert.match(html, /id="width" type="number" min="1" step="0\.01"/);
assert.match(html, /data-layer="sidewalks" type="checkbox" checked> 路缘与步行带/);
assert.match(html, /id="scene-preview" type="checkbox"/);
assert.match(html, /id="selected-junction" hidden/);
const app = fs.readFileSync(path.join(__dirname, "workbench", "app.js"), "utf8");
assert.match(app, /async function saveStagedChanges\(\)/);
assert.match(app, /if \(!await saveStagedChanges\(\)\) return;/);
@@ -16,7 +17,9 @@ assert.match(app, /function stageRoadOverride\(road, changes\)/);
assert.match(app, /road\.segmentId === selectedRoad\.segmentId/);
assert.match(app, /sidewalkLeft: rightInput\.checked, sidewalkRight: leftInput\.checked/);
assert.match(app, /function nativeSurfaceStyle\(feature\)/);
assert.match(app, /reference: new VectorLayer\(\{ source: source\(\), visible: false/);
assert.match(app, /scene mode must render fills only/);
assert.match(app, /scenePreviewToggle\.onchange/);
assert.match(app, /layers\.sidewalks\.setVisible\(document\.querySelector\('\[data-layer="sidewalks"\]'\)\.checked\)/);
assert.match(app, /function selectJunction\(feature\)/);
console.log("road workbench tests passed");