Skip to content

Commit

Permalink
[PRMDR-803] add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelHowellNHS committed May 16, 2024
1 parent 39e6da3 commit 6f3bbfa
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const mockSetDownloadStage = jest.fn();
const mockPatient = buildPatientDetails();
const mockedUsePatient = usePatient as jest.Mock;
const numberOfFiles = 7;
const selectedDocuments = ['selected-doc-id-1', 'selected-doc-id-2'];
const selectedDocuments = ['test-id-1', 'test-id-2'];
const downloadAllSelectedDocuments: Array<string> = [];
const searchResults = [
{
Expand All @@ -30,6 +30,12 @@ const searchResults = [
virusScannerResult: 'Clean',
ID: 'test-id-2',
},
{
fileName: '1of1_test.pdf',
created: '2024-02-01T14:52:00.827602Z',
virusScannerResult: 'Clean',
ID: 'test-id-3',
},
];

describe('LloydGeorgeDownloadComplete', () => {
Expand Down Expand Up @@ -176,6 +182,8 @@ describe('LloydGeorgeDownloadComplete', () => {
),
).toBeInTheDocument();
expect(screen.getByText('Hide files')).toBeInTheDocument();
expect(screen.getByText('1of2_test.pdf')).toBeInTheDocument();
expect(screen.getByText('2of2_test.pdf')).toBeInTheDocument();
expect(screen.getByText('Your responsibilities with this record')).toBeInTheDocument();
expect(
screen.getByText('Follow the Record Management Code of Practice'),
Expand Down

0 comments on commit 6f3bbfa

Please sign in to comment.