feat(map): refine SCADA feature experience

This commit is contained in:
2026-07-14 10:48:24 +08:00
parent 0b7e827024
commit 1c85d938a6
35 changed files with 1020 additions and 842 deletions
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { getFeaturePanelModel, getFeaturePanelProperties } from "./feature-properties";
import { getFeaturePanelModel, getFeaturePanelProperties, getLocalizedFeatureProperties } from "./feature-properties";
describe("feature panel properties", () => {
it.each([
@@ -68,4 +68,14 @@ describe("feature panel properties", () => {
expect(model.badge).toBeUndefined();
expect(model.attributes.map((entry) => entry.key)).toEqual(["invert_elevation", "max_depth"]);
});
it("omits the internal SCADA clustering size from user-facing properties", () => {
const entries = getLocalizedFeatureProperties({
point_name: "THC雷达液位计(MQTT",
cluster_size: 29,
device_external_id: "DEVICE-002"
});
expect(entries.map((entry) => entry.key)).toEqual(["point_name", "device_external_id"]);
});
});