Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions app/src/pages/startPage/StartPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ describe('StartPage', () => {
);
expect(downloadOdsReport).toHaveLength(2);

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

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

expect(nationalServiceDeskLink[1]).toHaveAttribute(
expect(nationalServiceDeskLink).toHaveAttribute(
'href',
'https://digital.nhs.uk/about-nhs-digital/contact-us#nhs-digital-service-desks',
);
expect(nationalServiceDeskLink[1]).toHaveAttribute('target', '_blank');
expect(nationalServiceDeskLink).toHaveAttribute('target', '_blank');
});

it('pass accessibility checks', async () => {
Expand Down
26 changes: 0 additions & 26 deletions app/src/pages/startPage/StartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import useBaseAPIUrl from '../../helpers/hooks/useBaseAPIUrl';
import TestPanel from '../../components/blocks/testPanel/TestPanel';
import ServiceDeskLink from '../../components/generic/serviceDeskLink/ServiceDeskLink';
import useTitle from '../../helpers/hooks/useTitle';
import NotificationBanner from '../../components/layout/notificationBanner/NotificationBanner';

const StartPage = (): React.JSX.Element => {
const navigate = useNavigate();
Expand All @@ -27,36 +26,11 @@ const StartPage = (): React.JSX.Element => {
}
};

const nhsServiceDeskLink = <ServiceDeskLink />;
const nationalServiceDeskEmail = (
<a href="mailto:[email protected]">[email protected]</a>
);

const pageHeader = 'Access and store digital patient documents';
useTitle({ pageTitle: pageHeader });

return !isLoading ? (
<>
<NotificationBanner
title="Important"
className="start_page_notification_banner"
dataTestId="start_page_notification_banner"
scrollToRef={null}
>
<span>
<p>
<b>
There will be reduced support for this service between 24 December 2025
and 2 January 2026
</b>
</p>
<p>
If there is a problem with this service between these dates, contact the{' '}
{nhsServiceDeskLink} on 0300 303 5035, or email {nationalServiceDeskEmail}.
</p>
</span>
</NotificationBanner>

<h1>{pageHeader}</h1>
<p>
This service gives you access to Lloyd George digital health records. You may have
Expand Down
5 changes: 0 additions & 5 deletions app/src/styles/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1161,11 +1161,6 @@ $hunit: '%';
border-color: black;
}

.start_page_notification_banner {
background-color: #005eb8;
border-color: #005eb8;
}

.download-failed-banner {
max-width: fit-content;
}
Expand Down
Loading