import { expect, test } from "../support/browser/strict-browser-test.ts"; import { gotoTechLog } from "../support/browser/tech-log-fixtures.ts"; test("boots the public app shell", async ({ page }) => { await gotoTechLog(page, "/"); await expect(page.getByRole("heading", { level: 1 })).toHaveText( "Tech Log", ); await expect(page.getByRole("navigation", { name: "주요 탐색" })).toBeVisible(); await expect(page.getByRole("main")).toBeVisible(); }); test("navigates to a registry-backed Public route without a page reload", async ({ page, }) => { await gotoTechLog(page, "/"); await page .getByRole("navigation", { name: "주요 탐색" }) .getByRole("link", { name: "프로젝트" }) .click(); await expect(page).toHaveURL(/\/projects$/); await expect( page.getByRole("heading", { level: 1, name: "프로젝트" }), ).toBeVisible(); }); test("provides an escape-dismissible mobile navigation", async ({ page }) => { await page.setViewportSize({ width: 390, height: 844 }); await gotoTechLog(page, "/"); const menu = page.locator("details.mobile-nav > summary"); await menu.click(); await expect(page.locator("details.mobile-nav")).toHaveAttribute("open", ""); await expect(page.getByRole("navigation", { name: "모바일 주요 탐색" })).toBeVisible(); await page.keyboard.press("Escape"); await expect(page.locator("details.mobile-nav")).not.toHaveAttribute("open", ""); await expect(page.getByRole("navigation", { name: "모바일 주요 탐색" })).toBeHidden(); await expect(menu).toBeFocused(); });