test: validate three-arm junction editing workflow

This commit is contained in:
que01 committed 2026-09-11 12:10:53 +08:00
1 parent f40caaa264
commit ff11dc2654
5 files changed
+121 -5

No files matched your search

+15 -1
View File
@@ -8,7 +8,21 @@ const { startWorkbench } = require('../workbench/server');
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'road-compiler-e2e-'));
const source = path.join(__dirname, 'fixtures', 'fengshu-er-road.osm');
const osmFile = path.join(root, 'source.osm');
fs.copyFileSync(source, osmFile);
const sourceXml = fs.readFileSync(source, 'utf8');
const threeArmFixture = `
<node id="-91001" lat="30.470000" lon="114.110000" />
<node id="-91002" lat="30.470000" lon="114.110100" />
<node id="-91003" lat="30.470086" lon="114.110050" />
<node id="-91011" lat="30.469600" lon="114.109600" />
<node id="-91012" lat="30.469600" lon="114.110500" />
<node id="-91013" lat="30.470550" lon="114.110050" />
<way id="-91101"><nd ref="-91001"/><nd ref="-91002"/><tag k="highway" v="secondary"/></way>
<way id="-91102"><nd ref="-91002"/><nd ref="-91003"/><tag k="highway" v="secondary"/></way>
<way id="-91103"><nd ref="-91003"/><nd ref="-91001"/><tag k="highway" v="secondary"/></way>
<way id="-91111"><nd ref="-91011"/><nd ref="-91001"/><tag k="highway" v="secondary"/></way>
<way id="-91112"><nd ref="-91012"/><nd ref="-91002"/><tag k="highway" v="secondary"/></way>
<way id="-91113"><nd ref="-91013"/><nd ref="-91003"/><tag k="highway" v="secondary"/></way>`;
fs.writeFileSync(osmFile, sourceXml.replace('</osm>', `${threeArmFixture}\n</osm>`));
const input = {
areaId: 'e2e-fengshu-er-road',
osmFile,