fix: complete model renderer states and ids

This commit is contained in:
vince 2026-06-18 19:29:30 +02:00
parent fede33e8a7
commit c2fb20b066
11 changed files with 84 additions and 7 deletions

View file

@ -45,4 +45,36 @@ describe("home page model renderer", () => {
expect(body).toContain("Validation failed");
expect(body).toContain("Dashboard document is invalid.");
});
test("renders empty and loading model states without crashing", () => {
const empty = render(Page, {
props: {
data: {
dashboard: {
state: "empty",
title: "No Dashboard Model",
subtitle: "No active document",
message: "No validated dashboard document is active yet.",
},
},
},
});
const loading = render(Page, {
props: {
data: {
dashboard: {
state: "loading",
title: "Loading Dashboard",
subtitle: "Fetching active model",
message: "Waiting for the active dashboard document.",
},
},
},
});
expect(empty.body).toContain("No Dashboard Model");
expect(empty.body).toContain("No active document");
expect(loading.body).toContain("Loading Dashboard");
expect(loading.body).toContain("Fetching active model");
});
});