fix(web): scope dashboard tile hydration
This commit is contained in:
parent
2963c5dfde
commit
2a1d94195e
5 changed files with 124 additions and 22 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { renderToString } from "react-dom/server";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { genericDashboardFixture } from "@dimensionlab/dashboard-model/fixtures";
|
||||
import { AppStateView } from "./App";
|
||||
import { dimensionLabDashboardFixture } from "$lib/dashboard-seed/dimensionlab";
|
||||
import { AppStateView, dashboardHydrationTiles } from "./App";
|
||||
|
||||
describe("React app dashboard state view", () => {
|
||||
test("renders loading dashboard state", () => {
|
||||
|
|
@ -54,7 +55,7 @@ describe("React app dashboard state view", () => {
|
|||
}}
|
||||
hydratingItemIds={new Set([
|
||||
"telemetry:service-uptime",
|
||||
"service:identity",
|
||||
"service:core-services:identity",
|
||||
"module:ambient",
|
||||
"status:runtime:status",
|
||||
])}
|
||||
|
|
@ -73,4 +74,12 @@ describe("React app dashboard state view", () => {
|
|||
expect(html).toContain('data-severity="loading" data-model-id="ambient"');
|
||||
expect(html).toContain('data-severity="loading" data-model-id="runtime:status"');
|
||||
});
|
||||
|
||||
test("hydrates every status cell from the Dimension Lab shell", () => {
|
||||
expect(dashboardHydrationTiles(dimensionLabDashboardFixture)).toContainEqual({
|
||||
kind: "status",
|
||||
stripId: "footer-status",
|
||||
id: "auto-refresh",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue