fix(ui): render active breadcrumb pages
This commit is contained in:
@@ -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");
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user