Skip to content

Commit b780fbb

Browse files
[PRMP-1051] Add Christmas notification banner (#935)
Co-authored-by: DuncanSangsterNHS <[email protected]>
1 parent 8b52919 commit b780fbb

File tree

3 files changed

+43
-11
lines changed

3 files changed

+43
-11
lines changed

app/src/pages/startPage/StartPage.test.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ describe('StartPage', () => {
5151
);
5252
expect(downloadOdsReport).toHaveLength(2);
5353

54-
expect(screen.getByText(/Contact the/i)).toBeInTheDocument();
55-
expect(
56-
screen.getByRole('link', {
57-
name: /NHS National Service Desk/i,
58-
}),
59-
).toBeInTheDocument();
54+
const contact = screen.getAllByText(/Contact the/i);
55+
expect(contact.length).toBe(2);
56+
const contactLinks = screen.getAllByRole('link', {
57+
name: /NHS National Service Desk/i,
58+
});
59+
expect(contactLinks.length).toBe(2);
6060
expect(
6161
screen.getByText(/if there is an issue with this service or call 0300 303 5035\./i),
6262
).toBeInTheDocument();
@@ -65,19 +65,20 @@ describe('StartPage', () => {
6565
it('renders a service link that takes you to service help-desk in a new tab', () => {
6666
render(<StartPage />);
6767

68-
expect(screen.getByText(/Contact the/i)).toBeInTheDocument();
69-
const nationalServiceDeskLink = screen.getByRole('link', {
68+
const contactTexts = screen.getAllByText(/Contact the/i);
69+
expect(contactTexts.length).toBe(2);
70+
const nationalServiceDeskLink = screen.getAllByRole('link', {
7071
name: /NHS National Service Desk/i,
7172
});
7273
expect(
7374
screen.getByText(/if there is an issue with this service or call 0300 303 5035/i),
7475
).toBeInTheDocument();
7576

76-
expect(nationalServiceDeskLink).toHaveAttribute(
77+
expect(nationalServiceDeskLink[1]).toHaveAttribute(
7778
'href',
7879
'https://digital.nhs.uk/about-nhs-digital/contact-us#nhs-digital-service-desks',
7980
);
80-
expect(nationalServiceDeskLink).toHaveAttribute('target', '_blank');
81+
expect(nationalServiceDeskLink[1]).toHaveAttribute('target', '_blank');
8182
});
8283

8384
it('pass accessibility checks', async () => {

app/src/pages/startPage/StartPage.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import useBaseAPIUrl from '../../helpers/hooks/useBaseAPIUrl';
1010
import TestPanel from '../../components/blocks/testPanel/TestPanel';
1111
import ServiceDeskLink from '../../components/generic/serviceDeskLink/ServiceDeskLink';
1212
import useTitle from '../../helpers/hooks/useTitle';
13+
import NotificationBanner from '../../components/layout/notificationBanner/NotificationBanner';
1314

1415
const StartPage = (): React.JSX.Element => {
1516
const navigate = useNavigate();
@@ -26,11 +27,36 @@ const StartPage = (): React.JSX.Element => {
2627
}
2728
};
2829

30+
const nhsServiceDeskLink = <ServiceDeskLink />;
31+
const nationalServiceDeskEmail = (
32+
33+
);
34+
2935
const pageHeader = 'Access and store digital patient documents';
3036
useTitle({ pageTitle: pageHeader });
3137

3238
return !isLoading ? (
3339
<>
40+
<NotificationBanner
41+
title="Important"
42+
className="start_page_notification_banner"
43+
dataTestId="start_page_notification_banner"
44+
scrollToRef={null}
45+
>
46+
<span>
47+
<p>
48+
<b>
49+
There will be reduced support for this service between 24 December 2025
50+
and 2 January 2026
51+
</b>
52+
</p>
53+
<p>
54+
If there is a problem with this service between these dates, contact the{' '}
55+
{nhsServiceDeskLink} on 0300 303 5035, or email {nationalServiceDeskEmail}.
56+
</p>
57+
</span>
58+
</NotificationBanner>
59+
3460
<h1>{pageHeader}</h1>
3561
<p>
3662
This service gives you access to Lloyd George digital health records. You may have

app/src/styles/App.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,11 @@ $hunit: '%';
11671167
border-color: black;
11681168
}
11691169

1170+
.start_page_notification_banner {
1171+
background-color: #005eb8;
1172+
border-color: #005eb8;
1173+
}
1174+
11701175
.download-failed-banner {
11711176
max-width: fit-content;
11721177
}
@@ -1309,4 +1314,4 @@ progress:not(.continuous-progress-bar) {
13091314
}
13101315
}
13111316

1312-
@import '../components/blocks/_patientDocuments/documentSearchResults/DocumentSearchResults.scss'
1317+
@import '../components/blocks/_patientDocuments/documentSearchResults/DocumentSearchResults.scss';

0 commit comments

Comments
 (0)