Fixed failing tests
All checks were successful
Sonar / SonarQube (push) Successful in 1m4s
Sonar / Docker stuff (push) Successful in 11s

This commit is contained in:
Liviu Burcusel 2025-12-11 12:35:26 +01:00
parent af3ddbf0c8
commit 9394813b4b
Signed by: liviu
GPG key ID: 6CDB37A4AD2C610C

View file

@ -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");
});
});