fix: read map POIs from authenticated FalkorDB

This commit is contained in:
xuelong committed 2026-08-31 01:51:18 -07:00
1 parent 90f75d41ae
commit 712ca1418c
7 files changed
+646 -206

No files matched your search

+11 -2
View File
@@ -25,14 +25,23 @@ test("every map-enabled project uses the single KnowledgeMap template", () => {
assert.doesNotMatch(overviewSource, /<SuperAgentPanel/);
});
test("the shared map preserves the four approved shortcut logos and province summary", () => {
test("the shared map preserves approved logos and counts only current-region graph POIs", () => {
assert.match(mapSource, /MAP_SHORTCUT_CATEGORIES = \["美食", "酒店", "景点", "交通设施"\]/);
assert.match(mapSource, /MAP_SHORTCUT_CATEGORIES\.map/);
assert.match(mapSource, /省域馆藏汇总/);
assert.match(mapSource, /cov\?\.total \?\? regionPois\.length/);
assert.match(mapSource, /regionPois\.length\.toLocaleString\(\)/);
assert.doesNotMatch(mapSource, /cov\?\.total/);
assert.match(mapSource, /regionLevel === "province"/);
assert.match(mapSource, /poiLoading \? "加载中…" : poiError \? "—"/);
assert.match(mapSource, /当前已入藏知识 \/ POI 条目/);
});
test("switching a graph version remounts the map and clears stale POIs", () => {
assert.match(overviewSource, /key=\{.*projectContext\.projectId.*projectContext\.graphName.*spatialMap\.region_adcode/);
assert.match(mapSource, /setPoiError\(""\);\s+setMapPois\(\[\]\);\s+setSelectedCategories\(\[\]\)/);
assert.match(overviewSource, /if \(sequence !== fetchSequence\.current\) return/);
});
test("map-enabled project creation requires an explicit administrative region", () => {
assert.match(projectLandingSource, /name="map_region_adcode"/);
assert.match(projectLandingSource, /请选择地图区域/);