test(frontend): harden live log contract
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user