From 094a0186f16807d5bc8536f68bbd9a0450446d30 Mon Sep 17 00:00:00 2001 From: Amar Trebinjac Date: Thu, 15 Jan 2026 02:12:10 +0100 Subject: [PATCH 1/2] feat: enrichment notification --- .../notifications/NotificationItem.spec.tsx | 44 +++++++++++++++++++ .../src/components/notifications/utils.ts | 1 + 2 files changed, 45 insertions(+) diff --git a/packages/shared/src/components/notifications/NotificationItem.spec.tsx b/packages/shared/src/components/notifications/NotificationItem.spec.tsx index 05d315695d..160fedb02c 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 experience at Acme Corp has been enriched

', + type: NotificationType.ExperienceCompanyEnriched, + targetUrl: '/recruiter/profile', + }; + + it('should display the title', async () => { + renderComponent( + , + ); + await screen.findByText(/Your experience at/); + await screen.findByText(/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 { From 104de900eb9ccdf01b127c3ef5796330ab11fc7b Mon Sep 17 00:00:00 2001 From: Amar Trebinjac Date: Thu, 15 Jan 2026 10:16:39 +0100 Subject: [PATCH 2/2] update test text --- .../components/notifications/NotificationItem.spec.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/shared/src/components/notifications/NotificationItem.spec.tsx b/packages/shared/src/components/notifications/NotificationItem.spec.tsx index 160fedb02c..24720508b3 100644 --- a/packages/shared/src/components/notifications/NotificationItem.spec.tsx +++ b/packages/shared/src/components/notifications/NotificationItem.spec.tsx @@ -181,8 +181,7 @@ describe('ExperienceCompanyEnriched notification', () => { const experienceCompanyEnrichedNotification: NotificationItemProps = { isUnread: true, icon: NotificationIconType.Bell, - title: - '

Your experience at Acme Corp has been enriched

', + title: 'Your work experience has been linked to Acme Corp', type: NotificationType.ExperienceCompanyEnriched, targetUrl: '/recruiter/profile', }; @@ -191,8 +190,9 @@ describe('ExperienceCompanyEnriched notification', () => { renderComponent( , ); - await screen.findByText(/Your experience at/); - await screen.findByText(/Acme Corp/); + await screen.findByText( + 'Your work experience has been linked to Acme Corp', + ); }); it('should display the Bell icon', async () => {