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

test("Voice benchmarks use German decimal commas", WEB, async ({ t3, app, screen }) => {
  await t3.project("demo");
  await t3.open("/settings/general");
  await screen.getByLabel("Language", { exact: true }).tap({ timeout: 120_000 });
  await screen.getByText("Deutsch", { exact: true }).tap();
  await screen.getByLabel("Sprache", { exact: true }).waitFor();
  await t3.open("/settings/voice");
  await screen.getByRole("combobox", "Transkribieren mit").tap();
  await screen.getByRole("option").nth(1).tap();
  await screen.getByText(/3[.,]99/).first().waitFor();
  await screen.getByText(/3[.,]99/).first().scrollIntoView();
  await app.screenshot("german-voice-benchmarks");
  await expect(screen.getByText(/3,99/).first()).toBeVisible();
  await expect(screen.getByText(/2,15 s/).first()).toBeVisible();
});
