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

test("Voice settings explains device-local rows beneath the scope header", WEB, async ({ t3, app, screen }) => {
  await t3.project("Voice demo");
  await t3.open();
  await screen.getByText("Voice demo", { exact: true }).first().waitFor({ state: "visible", timeout: 180_000 });
  await app.open("/settings/voice");
  await screen.getByText("Microphone", { exact: true }).waitFor({ state: "visible" });
  await app.screenshot("voice-all-environments");
  await screen.getByRole("button", "Environment scope: All environments").tap();
  await screen.getByRole("menuitemradio", "Scenario").tap();
  await app.screenshot("voice-single-environment");
  await expect(screen.getByText("Voice settings are saved on this device and ignore the scope above, except the shared dictionary and cleanup model. Audio is recorded here and sent to the environment you transcribe with.", { exact: true })).toBeVisible();
});
