fix(web): restore navigation smoke coverage

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-18 20:56:13 +09:00
parent 9a9d9bd5a1
commit a6f1950d41
2 changed files with 12 additions and 4 deletions
+11 -3
View File
@@ -2,11 +2,19 @@
import { useState } from "react"
import { useTranslations } from "next-intl"
import { Github, Menu, X } from "lucide-react"
import { Menu, X } from "lucide-react"
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { Link } from "@/i18n/routing"
function GitHubMark({ className }: { readonly className?: string }) {
return (
<svg viewBox="0 0 24 24" aria-hidden="true" className={className} fill="currentColor">
<path d="M12 2C6.48 2 2 6.58 2 12.25c0 4.53 2.87 8.37 6.84 9.73.5.1.68-.22.68-.49v-1.9c-2.78.62-3.37-1.22-3.37-1.22-.46-1.2-1.11-1.52-1.11-1.52-.91-.64.07-.63.07-.63 1 .07 1.53 1.06 1.53 1.06.9 1.57 2.35 1.12 2.92.85.09-.67.35-1.12.63-1.38-2.22-.26-4.55-1.14-4.55-5.06 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.3.1-2.71 0 0 .84-.28 2.75 1.05A9.3 9.3 0 0 1 12 6.94c.85 0 1.7.12 2.5.34 1.9-1.33 2.74-1.05 2.74-1.05.55 1.41.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.93-2.34 4.8-4.57 5.05.36.32.68.95.68 1.91v2.84c0 .27.18.59.69.49A10.18 10.18 0 0 0 22 12.25C22 6.58 17.52 2 12 2" />
</svg>
)
}
export function NavHeader() {
const t = useTranslations("nav")
const [isOpen, setIsOpen] = useState(false)
@@ -44,7 +52,7 @@ export function NavHeader() {
variant="secondary"
className="gap-1 border-zinc-700 bg-zinc-800 text-zinc-300 hover:bg-zinc-700"
>
<Github className="h-3 w-3" />
<GitHubMark className="h-3 w-3" />
<span>{t("starOnGitHub")}</span>
</Badge>
</a>
@@ -108,7 +116,7 @@ export function NavHeader() {
className="flex items-center gap-2 transition-colors hover:text-cyan-400 sm:hidden"
onClick={() => setIsOpen(false)}
>
<Github className="h-4 w-4" />
<GitHubMark className="h-4 w-4" />
<span>{t("starOnGitHub")}</span>
</a>
</nav>
+1 -1
View File
@@ -5,7 +5,7 @@ test("homepage renders heading", async ({ page }) => {
await page.goto("/")
// when
const heading = page.getByRole("heading", { name: "Oh My OpenCode", level: 1 })
const heading = page.getByRole("heading", { name: "The Best Agent Harness", level: 1 })
// then
await expect(heading).toBeVisible()