test(frontend): harden live log contract

This commit is contained in:
User
2026-07-15 12:45:26 +02:00
parent 4356a1243c
commit bef21f9e43
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -1,4 +1,4 @@
import { act, fireEvent, render, screen } from "@testing-library/react";
import { act, fireEvent, render, screen, within } from "@testing-library/react";
import { beforeEach } from "vitest";
import { useSessionStore } from "../store/sessionStore";
import { CentralStatus } from "./CentralStatus";
@@ -32,6 +32,9 @@ test("renders only the chronological assistant transcript log while working", ()
expect(log).toHaveTextContent("First line");
expect(log).toHaveTextContent("Second line");
expect(log).toHaveTextContent("Third line");
expect(
within(log).getAllByRole("listitem").map((row) => row.lastElementChild?.textContent),
).toEqual(["First line", "Second line", "Third line"]);
expect(log).toHaveClass("max-h-28", "overflow-y-auto");
expect(screen.queryByText("how many patients?")).not.toBeInTheDocument();
expect(screen.queryByText("Searching the schema…")).not.toBeInTheDocument();