feat(workbench): align v2 GIS and SCADA API
This commit is contained in:
@@ -16,7 +16,7 @@ import { SUPPLY_LAYER_VISUALS } from "./map-layer-visuals";
|
||||
describe("SCADA map presentation", () => {
|
||||
it("maps the authoritative device types and falls back to unknown", () => {
|
||||
expect(SCADA_ICON_EXPRESSION).toEqual([
|
||||
"match", ["downcase", ["to-string", ["coalesce", ["get", "type"], ""]]],
|
||||
"match", ["downcase", ["to-string", ["coalesce", ["get", "device_type"], ""]]],
|
||||
"pipe_flow", SCADA_IMAGE_IDS.flow,
|
||||
"pressure", SCADA_IMAGE_IDS.pressure,
|
||||
SCADA_IMAGE_IDS.pressure
|
||||
@@ -28,6 +28,13 @@ describe("SCADA map presentation", () => {
|
||||
expect(scadaFallbackLayers.at(-1)?.id).toBe(SCADA_HIT_LAYER_ID);
|
||||
});
|
||||
|
||||
it("renders every SCADA layer from GeoJSON without a GeoServer source-layer", () => {
|
||||
[...scadaLayers, ...scadaFallbackLayers].forEach((layer) => {
|
||||
expect("source" in layer ? layer.source : undefined).toBe("scada");
|
||||
expect(layer).not.toHaveProperty("source-layer");
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps the icon and selected ring consistent with junction selection", () => {
|
||||
const symbolLayer = scadaLayers.find((layer) => layer.id === "scada-symbol");
|
||||
const outerLayer = scadaLayers.find((layer) => layer.id === "scada-selected-outer");
|
||||
|
||||
Reference in New Issue
Block a user