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

test("Steering leaves a pending question answerable", WEB, async ({ t3, app, screen, browser }) => {
  const project = await t3.project("Question demo");
  await t3.thread({ project, title: "Pending question", messages: ["Ask me a question"], model: "question" });
  await t3.open();
  await browser.locator("[data-thread-item]").first().tap();
  await app.screenshot("question-before-follow-up");
  await screen.getByRole("textbox").last().fill("Follow up after my answer");
  await screen.getByRole("textbox").last().press("Enter");
  await app.screenshot("question-after-follow-up");
  await expect(screen.getByText("Strict schemas (Recommended)", { exact: false }).first()).toBeVisible();
});
