feat(workbench): expand SCADA monitoring and investigation presentation

This commit is contained in:
2026-11-07 19:50:14 +08:00
parent 0801e161ec
commit ba71e2d529
133 changed files with 6754 additions and 1438 deletions
@@ -0,0 +1,16 @@
import { describe, expect, it } from "vitest";
import { formatGpsCoordinate, mergeEventLocation } from "./event-location-coordinate";
describe("event location GPS formatting", () => {
it("formats coordinates with stable GPS precision", () => {
expect(formatGpsCoordinate([121.4791234, 31.2359876])).toBe("121.479123, 31.235988");
});
it("keeps the written location and persists the selected coordinate", () => {
expect(mergeEventLocation(" 演示路口 ", [121.4791234, 31.2359876]))
.toBe("演示路口(GPS:121.479123, 31.235988)");
expect(mergeEventLocation("", [121.4791234, 31.2359876]))
.toBe("GPS:121.479123, 31.235988");
expect(mergeEventLocation(" 演示路口 ", null)).toBe("演示路口");
});
});