diff --git a/packages/shared/src/components/notifications/NotificationItem.spec.tsx b/packages/shared/src/components/notifications/NotificationItem.spec.tsx index 05d315695d..24720508b3 100644 --- a/packages/shared/src/components/notifications/NotificationItem.spec.tsx +++ b/packages/shared/src/components/notifications/NotificationItem.spec.tsx @@ -176,3 +176,47 @@ describe('notification click if onClick prop is NOT provided', () => { expect(screen.queryByTestId('openNotification')).not.toBeInTheDocument(); }); }); + +describe('ExperienceCompanyEnriched notification', () => { + const experienceCompanyEnrichedNotification: NotificationItemProps = { + isUnread: true, + icon: NotificationIconType.Bell, + title: 'Your work experience has been linked to Acme Corp', + type: NotificationType.ExperienceCompanyEnriched, + targetUrl: '/recruiter/profile', + }; + + it('should display the title', async () => { + renderComponent( + , + ); + await screen.findByText( + 'Your work experience has been linked to Acme Corp', + ); + }); + + it('should display the Bell icon', async () => { + renderComponent( + , + ); + const icon = await screen.findByTestId('notification-Bell'); + expect(icon).toBeInTheDocument(); + }); + + it('should be clickable and navigate to targetUrl', async () => { + const mockOnClick = jest.fn(); + renderComponent( + , + ); + + const notificationLink = await screen.findByTestId('openNotification'); + expect(notificationLink).toBeInTheDocument(); + expect(notificationLink).toHaveAttribute('href', '/recruiter/profile'); + + fireEvent.click(notificationLink); + await waitFor(() => expect(mockOnClick).toBeCalledTimes(1)); + }); +}); diff --git a/packages/shared/src/components/notifications/utils.ts b/packages/shared/src/components/notifications/utils.ts index 8ed9a56e02..dfece71c2f 100644 --- a/packages/shared/src/components/notifications/utils.ts +++ b/packages/shared/src/components/notifications/utils.ts @@ -92,6 +92,7 @@ export enum NotificationType { PollResultAuthor = 'poll_result_author', NewOpportunityMatch = 'new_opportunity_match', WarmIntro = 'warm_intro', + ExperienceCompanyEnriched = 'experience_company_enriched', } export enum NotificationIconType {