feat(frontend): CentralStatus + ModelActivityPanel components

This commit is contained in:
2026-06-29 21:42:46 +02:00
parent 068c6f197d
commit b391101a5d
4 changed files with 96 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { render, screen } from "@testing-library/react";
import { beforeEach } from "vitest";
import { useSessionStore } from "../store/sessionStore";
import { CentralStatus } from "./CentralStatus";
beforeEach(() => useSessionStore.getState().resetSession());
test("renders nothing when there is no user entry and no step messages", () => {
const { container } = render(<CentralStatus />);
expect(container).toBeEmptyDOMElement();
});
test("echoes the last user entry and the step messages", () => {
const st = useSessionStore.getState();
st.setLastUserEntry({ kind: "input", text: "how many patients?" });
st.applyEvent({ type: "info", level: "info", text: "Searching the schema…" });
render(<CentralStatus />);
expect(screen.getByText("how many patients?")).toBeInTheDocument();
expect(screen.getByText("Searching the schema…")).toBeInTheDocument();
});