[#32] added check is no name or lastname

This commit is contained in:
Camille Moussu
2025-08-20 10:20:30 +02:00
committed by Benoit TELLIER
parent b9d2a16984
commit 9a58c485ac
2 changed files with 25 additions and 3 deletions
+17
View File
@@ -38,6 +38,23 @@ describe("Calendar App Component Display Tests", () => {
expect(screen.getByText("JD")).toBeInTheDocument();
});
it("shows avatar with email initials when no user name", () => {
(window as any).appList = [{ name: "test", icon: "test", link: "test" }];
const preloadedState = {
user: {
userData: {
sub: "test",
email: "test@test.com",
family_name: "Doe",
sid: "mockSid",
openpaasId: "667037022b752d0026472254",
},
},
};
renderWithProviders(<Menubar />, preloadedState);
expect(screen.getByText("t")).toBeInTheDocument();
});
it("shows AppsIcon when applist is not empty", () => {
(window as any).appList = [{ name: "test", icon: "test", link: "test" }];
renderWithProviders(<Menubar />, preloadedState);