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

test("Terminal previous and next names follow the Settings language", WEB, async ({ t3, app, screen }) => {
  const project = await t3.project("terminal-shortcuts");
  await t3.thread({ project, title: "Terminal work", messages: ["Start"] });
  await t3.open("/settings/general");
  await screen.getByLabel("Language", { exact: true }).tap();
  await screen.getByText("Deutsch", { exact: true }).tap();
  await t3.open("/settings/keybindings");
  await screen.getByLabel("Tastenkürzel durchsuchen", { exact: true }).fill("Terminal:");
  await screen.getByText("Terminal: Schließen", { exact: true }).waitFor();
  await app.screenshot("german-terminal-shortcut-names");
  await expect(screen.getByText("Terminal: Vorheriges", { exact: true })).toHaveCount(2);
  await expect(screen.getByText("Terminal: Nächstes", { exact: true })).toHaveCount(2);
});
