import { expect } from "e2e";
import { test, WEB } from "./t3.ts";

test("A streaming visible reply has no extra Thinking row", WEB, async ({ t3, app, screen }) => {
  await t3.project("math-demo", { "src/math.ts": "export const sum = (a: number, b: number) => a + b;\n" });
  await t3.open();
  await screen.getByRole("textbox").fill("Give me a short tour");
  await screen.getByRole("textbox").press("Enter");
  await screen.getByText("I added", { exact: false }).waitFor();
  await app.screenshot("visible-reply-streaming");
  await expect(screen.getByText("Thinking", { exact: true }).first()).toBeHidden({ timeout: 500 });
});
