Skip to content

Commit c16aa6c

Browse files
authored
CCM-8993: remove edit letter (#383)
1 parent 7f3e8cd commit c16aa6c

File tree

28 files changed

+652
-1628
lines changed

28 files changed

+652
-1628
lines changed

frontend/src/__tests__/app/preview-letter-template/page.test.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
* @jest-environment node
33
*/
44
import PreviewLetterTemplatePage from '@app/preview-letter-template/[templateId]/page';
5-
import { PreviewLetterTemplate } from '@forms/PreviewLetterTemplate/PreviewLetterTemplate';
65
import { type LetterTemplate } from 'nhs-notify-web-template-management-utils';
76
import { redirect } from 'next/navigation';
87
import { getTemplate } from '@utils/form-actions';
98
import { Language, LetterType, TemplateDto } from 'nhs-notify-backend-client';
109
import { EMAIL_TEMPLATE, NHS_APP_TEMPLATE, SMS_TEMPLATE } from '../../helpers';
10+
import { PreviewLetterTemplate } from '@organisms/PreviewLetterTemplate/PreviewLetterTemplate';
1111

1212
jest.mock('@utils/form-actions');
1313
jest.mock('next/navigation');
14-
jest.mock('@forms/PreviewLetterTemplate/PreviewLetterTemplate');
1514

1615
const redirectMock = jest.mocked(redirect);
1716
const getTemplateMock = jest.mocked(getTemplate);
@@ -59,9 +58,7 @@ describe('PreviewLetterTemplatePage', () => {
5958
}),
6059
});
6160

62-
expect(page).toEqual(
63-
<PreviewLetterTemplate initialState={letterTemplate} />
64-
);
61+
expect(page).toEqual(<PreviewLetterTemplate template={letterTemplate} />);
6562
});
6663

6764
it('should redirect to invalid-template when no template is found', async () => {

frontend/src/__tests__/components/forms/PreviewLetterTemplate/PreviewLetterTemplate.test.tsx

Lines changed: 0 additions & 186 deletions
This file was deleted.

0 commit comments

Comments
 (0)