feat: complete native traffic signal workflow

This commit is contained in:
2026-08-18 11:46:19 +08:00
parent 7204c28161
commit 5accc0a4b1
17 changed files with 355 additions and 19 deletions

View File

@@ -52,4 +52,29 @@ assert.match(app, /state\.layers\.vehicleStopLines/);
assert.match(app, /native-road-crosswalk\/v1/);
assert.match(app, /native-road-stop-line\/v1/);
assert.match(app, /term\.textContent = label; detail\.textContent = value; summary\.append\(term, detail\)/);
assert.match(app, /原生红绿灯/);
assert.match(app, /function selectSignal\(feature\)/);
assert.match(app, /\/api\/traffic-signals/);
assert.match(app, /从 OSM 生成缺失信号灯/);
assert.match(app, /data-layer="signals" type="checkbox" checked> 红绿灯设施/);
assert.match(app, /红绿灯设施/);
assert.match(app, /signalAssemblyStyle/);
assert.match(app, /signal_component: "mast"/);
assert.match(app, /signal_component: "face"/);
assert.match(app, /signal_component: "head"/);
assert.match(app, /faceHeadingDegrees/);
assert.match(app, /横杆方向(度)/);
assert.match(app, /横杆长度(米)/);
assert.match(app, /灯面朝向(度)/);
assert.match(app, /检查信号灯<select name="signal-picker">/);
assert.match(app, /signalPicker\.onchange/);
assert.match(app, /map\.getView\(\)\.fit\(\[x - 25, y - 25, x \+ 25, y \+ 25\]/);
assert.match(app, /fromLonLat/);
assert.match(app, /armFeatures\.push\(new Feature/);
assert.match(app, /headFeatures\.push\(new Feature/);
assert.match(app, /faceFeatures\.push\(new Feature/);
const server = fs.readFileSync(path.join(__dirname, "road-workbench.js"), "utf8");
assert.match(server, /\/api\/traffic-signals\/generate/);
assert.doesNotMatch(app, /导入 QGIS|导出 QGIS/);
assert.doesNotMatch(server, /traffic-signals\/(?:import|export)-qgis/);
console.log("road workbench tests passed");