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

test("An agent starts when sh is on PATH and /bin/sh does not exist", WEB, async ({ t3, app, screen }) => {
  await t3.project("Termux launcher");
  await t3.open();
  await screen.getByRole("textbox").fill("Reply with the word ok.");
  await screen.getByRole("textbox").press("Enter");
  try {
    await expect(screen.getByText("This turn is a replay.", { exact: false })).toBeVisible();
  } finally {
    await app.screenshot("agent-launch-without-bin-sh");
  }
});
