fix(ui): render navbar brand prop outside slot
Quality / quality (ubuntu-latest) (push) Failing after 10m32s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-25 14:00:46 +05:30
parent 64db7da08d
commit 3cb6ba1233
4 changed files with 8 additions and 6 deletions
@@ -126,11 +126,14 @@ describe("@wrnexus/ui redesign component pack", () => {
expect(source).not.toContain(".wrn-navbar__topbar:not(:empty)");
});
test("Navbar exposes a brand slot while retaining the brand prop fallback", async () => {
test("Navbar renders its brand prop independently from the optional brand slot", async () => {
const source = await readFile(join(componentsDir, "Navbar.wrn"), "utf8");
expect(source).toContain('<slot name="brand">');
expect(source).toContain('<slot name="brand" />');
expect(source).toContain("brand.logo || brand.icon || brand.label || brand.description");
expect(source.indexOf("brand.logo || brand.icon || brand.label || brand.description")).toBeLessThan(
source.indexOf('<slot name="brand" />'),
);
});
test("Navbar renders slotted utilities before its built-in actions", async () => {