fix(3d): restore complete SCADA scene context
The scene previously returned early when realtime rows were absent and selected map-tier assets for network mode, hiding SCADA markers and station interiors and floors. Use SCADA timestamps as valid frames, render node-aligned monitor markers, and pin the full network context in the manifest regression test. Keep the timeline close action inside its drag header.
This commit is contained in:
@@ -20,6 +20,7 @@ describe("ZJB three-dimensional runtime assets", () => {
|
||||
packageId: string;
|
||||
renderRevision: number;
|
||||
assets: Array<{ file: string; sha256: string }>;
|
||||
networkContext: string[];
|
||||
networkModel: { file: string; metadata: string; sha256: string };
|
||||
sourceCatalogFile?: string;
|
||||
bindingsFile?: string;
|
||||
@@ -28,6 +29,16 @@ describe("ZJB three-dimensional runtime assets", () => {
|
||||
expect(manifest.packageId).toBe("zjb-web-v29");
|
||||
expect(manifest.renderRevision).toBe(29);
|
||||
expect(manifest.assets).toHaveLength(24);
|
||||
expect(manifest.networkContext).toEqual([
|
||||
"detail_roof",
|
||||
"detail_facade",
|
||||
"detail_interior",
|
||||
"detail_ceiling",
|
||||
"map_platforms",
|
||||
"map_railway",
|
||||
"map_roads",
|
||||
"map_pump_shell",
|
||||
]);
|
||||
manifest.assets.forEach((asset) => {
|
||||
const assetPath = join(sceneRoot, asset.file);
|
||||
expect(existsSync(assetPath)).toBe(true);
|
||||
@@ -73,6 +84,10 @@ describe("ZJB three-dimensional runtime assets", () => {
|
||||
join(sceneRoot, "asset-inspector.mjs"),
|
||||
"utf8",
|
||||
);
|
||||
const networkStyle = readFileSync(
|
||||
join(sceneRoot, "network-style.mjs"),
|
||||
"utf8",
|
||||
);
|
||||
|
||||
expect(preview).toContain("tjwater:zjb-scene");
|
||||
expect(preview).toContain("HOST_VERSION=2");
|
||||
@@ -83,10 +98,13 @@ describe("ZJB three-dimensional runtime assets", () => {
|
||||
expect(preview).toContain("data.type==='clear-results'");
|
||||
expect(preview).toContain("data.type!=='command'");
|
||||
expect(preview).toContain("postHost('selection-changed'");
|
||||
expect(preview).toContain("next==='network'?manifest.networkContext:manifest.mapDefault");
|
||||
expect(preview).not.toContain("window.zjbNetwork");
|
||||
expect(preview).not.toContain("resultsFile");
|
||||
expect(html).not.toContain("绑定运行结果");
|
||||
expect(html).not.toContain("resultsFile");
|
||||
expect(inspector).not.toContain("document.getElementById");
|
||||
expect(networkStyle).toContain("ScadaSensorMarkers");
|
||||
expect(networkStyle).toContain("source==='scada'");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user