feat(workbench): expand SCADA monitoring and investigation presentation
This commit is contained in:
@@ -10,4 +10,14 @@ describe("frontend chart boundary", () => {
|
||||
expect(parseFrontendChart({ ...chart, series: [{ name: "D1", data: [20, Infinity] }] })).toBeNull();
|
||||
expect(parseFrontendChart({ ...chart, x_data: Array(101).fill("t") })).toBeNull();
|
||||
});
|
||||
it("accepts sparse history with real timestamp metadata and rejects invented or misaligned timestamps", () => {
|
||||
const series = { name: "前一天", type: "scatter", data: [null, 31],
|
||||
sample_times: [null, "2026-06-13T12:00:00+08:00"] };
|
||||
expect(parseFrontendChart({ ...chart, y_axis_name: "压力(m)", series: [chart.series[0], series] })).not.toBeNull();
|
||||
for (const sample_times of [["2026-06-13T11:45:00+08:00", series.sample_times[1]],
|
||||
[null], [null, "2026-06-13T12:00:00"], [null, "2026-02-30T12:00:00+08:00"]]) {
|
||||
expect(parseFrontendChart({ ...chart, series: [{ ...series, sample_times }] })).toBeNull();
|
||||
}
|
||||
expect(parseFrontendChart({ ...chart, series: [{ ...series, type: "pie" }] })).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user