Skip to content

Commit a04a5cf

Browse files
authored
CCM-11474: message plan name screen (#722)
1 parent ce7d57d commit a04a5cf

File tree

118 files changed

+3641
-614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3641
-614
lines changed

frontend/src/__tests__/app/edit-nhs-app-template/page.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import EditNhsAppTemplatePage, {
99
generateMetadata,
1010
} from '@app/edit-nhs-app-template/[templateId]/page';
1111
import { TemplateDto } from 'nhs-notify-backend-client';
12-
import { EMAIL_TEMPLATE, LETTER_TEMPLATE, SMS_TEMPLATE } from '../../helpers';
12+
import {
13+
EMAIL_TEMPLATE,
14+
LETTER_TEMPLATE,
15+
SMS_TEMPLATE,
16+
} from '@testhelpers/helpers';
1317
import content from '@content/content';
1418

1519
const { editPageTitle } = content.components.templateFormNhsApp;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import LetterTemplateSubmittedPage, {
66
} from '@app/letter-template-submitted/[templateId]/page';
77
import content from '@content/content';
88
import { TemplateSubmitted } from '@molecules/TemplateSubmitted/TemplateSubmitted';
9-
import { LETTER_TEMPLATE } from '@testhelpers';
9+
import { LETTER_TEMPLATE } from '@testhelpers/helpers';
1010
import { getTemplate } from '@utils/form-actions';
1111
import { redirect } from 'next/navigation';
1212

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`matches snapshot 1`] = `
4+
<DocumentFragment>
5+
<main
6+
class="nhsuk-main-wrapper"
7+
id="maincontent"
8+
role="main"
9+
>
10+
<div
11+
class="nhsuk-grid-row"
12+
data-testid="page-content-wrapper"
13+
>
14+
<div
15+
class="nhsuk-grid-column-two-thirds"
16+
>
17+
<h1
18+
class="nhsuk-heading-xl"
19+
data-testid="page-heading"
20+
>
21+
You cannot create message plans yet
22+
</h1>
23+
<p>
24+
To get access, contact your onboarding manager and give them this error message:
25+
</p>
26+
<div
27+
class="nhsuk-inset-text"
28+
>
29+
<p>
30+
Account needs a campaign ID
31+
</p>
32+
</div>
33+
<p>
34+
<a
35+
data-testid="back-link"
36+
href="/message-plans"
37+
>
38+
Go back
39+
</a>
40+
</p>
41+
</div>
42+
</div>
43+
</main>
44+
</DocumentFragment>
45+
`;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { render } from '@testing-library/react';
2+
import MessagePlanCampaignIdRequiredPage from '@app/message-plans/campaign-id-required/page';
3+
4+
test('matches snapshot', () => {
5+
const container = render(MessagePlanCampaignIdRequiredPage());
6+
7+
expect(container.asFragment()).toMatchSnapshot();
8+
});

0 commit comments

Comments
 (0)