feat(workbench): align v2 GIS and SCADA API
This commit is contained in:
@@ -19,16 +19,18 @@ describe("workbench supply layer controls", () => {
|
||||
"valves",
|
||||
"reservoirs",
|
||||
"scada",
|
||||
"pumps",
|
||||
"tanks",
|
||||
"simulation"
|
||||
]);
|
||||
expect(items.map((item) => item.id)).not.toContain("pumps");
|
||||
expect(items.map((item) => item.id)).not.toContain("tanks");
|
||||
expect(items.slice(0, 5).map((item) => item.description)).toEqual([
|
||||
"tjwater:geo_pipes_mat",
|
||||
"tjwater:geo_junctions_mat",
|
||||
"tjwater:geo_valves",
|
||||
"tjwater:geo_reservoirs",
|
||||
"tjwater:geo_scada"
|
||||
expect(items.slice(0, 7).map((item) => item.description)).toEqual([
|
||||
"tjwater_next:pipes",
|
||||
"tjwater_next:junctions",
|
||||
"tjwater_next:valves",
|
||||
"tjwater_next:reservoirs",
|
||||
"后端业务 API",
|
||||
"tjwater_next:pumps",
|
||||
"tjwater_next:tanks"
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -41,6 +43,8 @@ describe("workbench supply layer controls", () => {
|
||||
"junction",
|
||||
"valve",
|
||||
"reservoir",
|
||||
"pump",
|
||||
"tank",
|
||||
"scada-flow",
|
||||
"scada-pressure",
|
||||
"impact-area"
|
||||
@@ -50,6 +54,8 @@ describe("workbench supply layer controls", () => {
|
||||
label: "水库",
|
||||
imageSrc: "/map/reservoir.png"
|
||||
});
|
||||
expect(MAP_LEGEND_ITEMS.find((item) => item.id === "pump")).toMatchObject({ imageSrc: "/map/pump.png" });
|
||||
expect(MAP_LEGEND_ITEMS.find((item) => item.id === "tank")).toMatchObject({ imageSrc: "/map/tank.png" });
|
||||
expect(MAP_LEGEND_ITEMS.find((item) => item.id === "scada-flow")).toMatchObject({ imageSrc: "/map/scada-flow.png" });
|
||||
expect(MAP_LEGEND_ITEMS.find((item) => item.id === "scada-pressure")).toMatchObject({ imageSrc: "/map/scada-pressure.png" });
|
||||
expect(MAP_LEGEND_ITEMS.find((item) => item.id === "inactive-pipe")).toMatchObject({
|
||||
@@ -82,5 +88,12 @@ describe("workbench supply layer controls", () => {
|
||||
"reservoirs-selected",
|
||||
"reservoirs-hit"
|
||||
]);
|
||||
expect(getWorkbenchLayerIds(map, "pumps")).toEqual([
|
||||
"pumps-symbol",
|
||||
"pumps-hover",
|
||||
"pumps-selected-outer",
|
||||
"pumps-selected",
|
||||
"pumps-hit"
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user