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

test("An agent turn completes and its browser evidence remains readable", WEB, async ({ t3, app, screen }) => {
  const project = await t3.project("Image compatibility", { "README.md": "# Image compatibility\nSynthetic screenshot verification.\n" });
  await t3.open();
  await t3.thread({ project, title: "Screenshot compatibility", messages: ["Check the screenshot tool response"], model: "multi-turn" });
  await t3.open();
  await screen.getByRole("button", "Screenshot compatibility, Done, Image compatibility").tap();
  await expect(screen.getByText("first fixture turn complete", { exact: false })).toBeVisible();
  await app.screenshot("completed-agent-turn");
});
