From 9394813b4b8d2ce8c2c4bae26960658d2bdeab49 Mon Sep 17 00:00:00 2001 From: Liviu Burcusel Date: Thu, 11 Dec 2025 12:35:26 +0100 Subject: [PATCH] Fixed failing tests --- tests/layouts/default/Topbar.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/layouts/default/Topbar.test.ts b/tests/layouts/default/Topbar.test.ts index 4e851f6..5e8f477 100644 --- a/tests/layouts/default/Topbar.test.ts +++ b/tests/layouts/default/Topbar.test.ts @@ -26,7 +26,7 @@ describe("Topbar.vue", () => { it("renders the logo image and text", () => { const logo = wrapper.find(".layout-topbar-logo"); expect(logo.exists()).toBe(true); - expect(logo.find("img").attributes("alt")).toBe("Two stick silhouettes admiring fireworks in the sky"); + expect(logo.find("img").attributes("alt")).toBe("Git like tree using red, white-ish and blue colours."); expect(logo.text()).toContain("Glowing Fiesta"); }); @@ -81,12 +81,16 @@ describe("Topbar.vue", () => { it("updates isDarkTheme ref when toggled", async () => { const darkModeButton = wrapper.find(".layout-topbar-action-highlight"); + // @ts-expect-error: it's a test accessing vm property expect(wrapper.vm.isDarkTheme).toBe(false); await darkModeButton.trigger("click"); + + // @ts-expect-error: it's a test accessing vm property expect(wrapper.vm.isDarkTheme).toBe(true); await darkModeButton.trigger("click"); + // @ts-expect-error: it's a test accessing vm property expect(wrapper.vm.isDarkTheme).toBe(false); }); }); @@ -123,7 +127,7 @@ describe("Topbar.vue", () => { it("has correct image source", () => { const img = wrapper.find(".layout-topbar-logo img"); - expect(img.attributes("src")).toContain("logo.png"); + expect(img.attributes("src")).toContain("data:image/svg+xml"); }); });