Skip to content

Commit

Permalink
Merge branch 'main' into PRMP-1349
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbeumkes-nhs authored Dec 9, 2024
2 parents 48c657c + 9e359f6 commit e225989
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('GP Workflow: Patient search and verify', () => {
cy.get('#nhs-number-input').type(testPatient);
cy.title().should(
'eq',
'Search for patient - Access and store digital patient documents',
'Search for a patient - Access and store digital patient documents',
);

cy.get('#search-submit').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ describe('GP Workflow: View Lloyd George record', () => {

// cancel delete
cy.wait('@searchDocs');
cy.getByTestId('start-again-btn').click();
cy.contains('Go back').click();

// assert user is returned to view Lloyd George page
cy.contains('Lloyd George record').should('be.visible');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ describe('RemoveRecordStage', () => {
).toBeInTheDocument();
});

expect(screen.getByRole('button', { name: 'Start again' })).toBeInTheDocument();
expect(
screen.queryByRole('button', { name: 'Remove all files' }),
).not.toBeInTheDocument();
Expand All @@ -124,7 +123,6 @@ describe('RemoveRecordStage', () => {
).toBeInTheDocument();
});

expect(screen.getByRole('button', { name: 'Start again' })).toBeInTheDocument();
expect(screen.getByText(searchResults[0].fileName)).toBeInTheDocument();
expect(screen.getByText(searchResults[1].fileName)).toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react';
import useTitle from '../../../../helpers/hooks/useTitle';
import { Button, Table, WarningCallout } from 'nhsuk-react-components';
import LinkButton from '../../../generic/linkButton/LinkButton';
import { SearchResult } from '../../../../types/generic/searchResult';
import getDocumentSearchResults from '../../../../helpers/requests/getDocumentSearchResults';
import usePatient from '../../../../helpers/hooks/usePatient';
Expand Down Expand Up @@ -165,17 +164,6 @@ function RemoveRecordStage({ numberOfFiles, recordType, setDownloadStage, resetD
Remove all files
</Button>
)}
<LinkButton
id="start-again-link"
data-testid="start-again-btn"
type="button"
className="mb-7 ml-3"
onClick={() => {
navigate(routes.LLOYD_GEORGE);
}}
>
Start again
</LinkButton>
</div>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('LloydGeorgeUploadInfectedStage', () => {
});

describe('Navigation', () => {
it('navigates to search for patient page when button is clicked', () => {
it('navigates to search for a patient page when button is clicked', () => {
render(
<LloydGeorgeUploadInfectedStage
documents={[uploadDocument]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,21 @@ function LloydGeorgeViewRecordStage({

<h1>{pageHeader}</h1>
<PatientSimpleSummary />
{fullScreen ? (
<p>
To search within this record use <strong>Control</strong> and <strong>F</strong>
</p>
) : (
<p />
)}

{!fullScreen ? (
<div className="lloydgeorge_record-stage_flex">
<RecordMenuCard
recordLinks={recordLinksToShow}
setStage={setStage}
showMenu={showMenu}
/>

<div
className={`lloydgeorge_record-stage_flex-row lloydgeorge_record-stage_flex-row${menuClass}`}
>
Expand Down
4 changes: 4 additions & 0 deletions app/src/components/generic/recordCard/RecordCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ function RecordCard({
View in full screen
</button>
)}
<p>
To search within this record use <strong>Control</strong> and{' '}
<strong>F</strong>
</p>
</Card.Content>
<div>{children}</div>
</Card>
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/patientSearchPage/PatientSearchPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('PatientSearchPage', () => {
mockedUseRole.mockReturnValue(role);

renderPatientSearchPage();
expect(screen.getByText('Search for patient')).toBeInTheDocument();
expect(screen.getByText('Search for a patient')).toBeInTheDocument();
expect(
screen.getByRole('textbox', { name: 'Enter NHS number' }),
).toBeInTheDocument();
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/patientSearchPage/PatientSearchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function PatientSearchPage() {
setSubmissionState(SEARCH_STATES.SUCCEEDED);
navigate(routes.VERIFY_PATIENT);
};
const pageTitle = 'Search for patient';
const pageTitle = 'Search for a patient';
useTitle({ pageTitle: pageTitle });

const handleSearch = async (data: FieldValues) => {
Expand Down

0 comments on commit e225989

Please sign in to comment.