Files
agent-desk-ng/web/components/nav-main.test.mjs
mono 2f7a491666 feat: harden support, localize knowledge and add operator availability [skip ci]
Source-only publication of reviewed commit 64e96a7f423673dc29ad56485be9fc79bce8af1c.

Passed in isolation: focused frontend/backend tests, race checks, TypeScript typecheck, lint, Go compilation, Flowgram build, and deterministic SDK build/tests.

Not accepted as a production release: Next.js export/native assembly remains blocked by environment memory limits; browser interaction and MySQL staging acceptance remain unverified. No production server, database/schema, runtime configuration, deployment, release tag, or workflow execution was performed.

Expected source tree: 0a4a7528e9.
2026-10-16 15:21:42 +00:00

22 lines
1.0 KiB
JavaScript

// Modified by the independent AgentDesk fork for support reliability and availability.
import assert from "node:assert/strict"
import { readFile } from "node:fs/promises"
import test from "node:test"
const source = await readFile(new URL("./nav-main.tsx", import.meta.url), "utf8")
test("dashboard nav items expose full labels when visual text is truncated", () => {
assert.match(source, /<span\b[^>]*\btitle=\{title\}[^>]*>\s*\{title\}\s*<\/span>/)
assert.match(source, /tooltip=\{item\.title\}/)
assert.match(source, /<span\b[^>]*\btitle=\{item\.title\}[^>]*>\s*\{item\.title\}\s*<\/span>/)
})
test("collapsed dashboard nav sections expose submenu flyouts on hover", () => {
assert.match(source, /useSidebar/)
assert.match(source, /state === "collapsed" && !isMobile/)
assert.match(source, /<DropdownMenuTrigger\s+openOnHover/)
assert.match(source, /render=\{<SidebarMenuButton \/>\}/)
assert.match(source, /<DropdownMenuContent[\s\S]*side="right"/)
assert.match(source, /<DropdownMenuGroup>[\s\S]*<DropdownMenuLabel/)
})