diff --git a/tests/unit/design-system/components/user-avatar/UserAvatar.spec.jsx b/tests/unit/design-system/components/user-avatar/UserAvatar.spec.jsx index fe41a4a3e..99211ef08 100644 --- a/tests/unit/design-system/components/user-avatar/UserAvatar.spec.jsx +++ b/tests/unit/design-system/components/user-avatar/UserAvatar.spec.jsx @@ -51,4 +51,22 @@ describe('UserAvatar Component', () => { expect(onlineStatus).not.toBeInTheDocument(); }); + it('should trigger onClick callback when clicked', () => { + const handleClick = vi.fn(); + + render( + + ); + + const avatarElement = document.querySelector('.s2s-avatar'); + avatarElement.click(); + + expect(handleClick).toHaveBeenCalledTimes(1); + }); + });