fix: hide unavailable GeoServer layers
This commit is contained in:
@@ -34,6 +34,25 @@ describe("workbench supply layer controls", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("omits data-dependent controls when their GeoServer layers are empty", () => {
|
||||
const items = createLayerControlItems(INITIAL_LAYER_VISIBILITY, [
|
||||
"pipes",
|
||||
"junctions",
|
||||
"valves",
|
||||
"reservoirs",
|
||||
"scada"
|
||||
]);
|
||||
|
||||
expect(items.map((item) => item.id)).toEqual([
|
||||
"pipes",
|
||||
"junctions",
|
||||
"valves",
|
||||
"reservoirs",
|
||||
"scada",
|
||||
"simulation"
|
||||
]);
|
||||
});
|
||||
|
||||
it("shows only current visible business icons in the legend", () => {
|
||||
expect(MAP_LEGEND_ITEMS.map((item) => item.id)).toEqual([
|
||||
"major-pipe",
|
||||
|
||||
Reference in New Issue
Block a user