fix: complete model renderer states and ids
This commit is contained in:
parent
fede33e8a7
commit
c2fb20b066
11 changed files with 84 additions and 7 deletions
|
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue