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

test("Back and Forward shortcuts appear under Navigation", WEB, async ({ t3, app, screen, browser }) => {
  await t3.project("demo");
  await t3.open("/settings/keybindings");
  await screen.getByRole("searchbox", "Search keybindings").fill("navigation");
  await screen.getByText("Navigation: Back", { exact: true }).waitFor({ state: "visible" });
  await screen.getByText("Navigation: Forward", { exact: true }).waitFor({ state: "visible" });
  await app.screenshot("navigation-shortcuts");
  await expect(browser.locator("#keybindings-navigation")).toContainText("Navigation: Back");
  await expect(browser.locator("#keybindings-navigation")).toContainText("Navigation: Forward");
});
