fix(ui): render active breadcrumb pages
Quality / quality (ubuntu-latest) (push) Failing after 10m0s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-25 16:21:53 +05:30
parent 027873459d
commit 1ff2c3339c
5 changed files with 43 additions and 3 deletions
+15
View File
@@ -3169,6 +3169,21 @@ test("breadcrumb marks the trail end without emitting an empty aria-current", as
expect(dom.querySelectorAll(".wrn-breadcrumb__item").length).toBeGreaterThanOrEqual(3);
});
test("breadcrumb renders a standalone active page with its icon", async () => {
const source = readFileSync(uiComponentPath("Breadcrumb"), "utf8");
const html = await renderComponent(source, {
showHome: true,
items: [{ label: "Products", href: "/products", icon: "icon-[lucide--blocks]" }],
active: "CRM",
activeIcon: "icon-[lucide--contact-round]",
});
expect(html).toContain("CRM");
expect(html).toContain("icon-[lucide--contact-round]");
expect(html).toMatch(/aria-current="page"/);
const dom = mountHtml(html);
expect(dom.querySelectorAll(".wrn-breadcrumb__item").length).toBe(3);
});
test("mega menu bridges the gap between its trigger and panel", async () => {
const source = readFileSync(uiComponentPath("MegaMenu"), "utf8");
/*