File tree Expand file tree Collapse file tree 3 files changed +77
-23
lines changed
__tests__/app/create-and-submit-templates Expand file tree Collapse file tree 3 files changed +77
-23
lines changed Original file line number Diff line number Diff line change 1+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+ exports [` matches the snapshot 1` ] = `
4+ <div >
5+ <div
6+ class = " nhsuk-grid-row"
7+ data-testid = " page-content-wrapper"
8+ >
9+ <div
10+ class = " nhsuk-grid-column-two-thirds"
11+ >
12+ <h1
13+ class = " nhsuk-heading-xl"
14+ data-testid = " page-heading"
15+ >
16+ Create and submit a template to NHS Notify
17+ </h1 >
18+ <p >
19+ Use this tool to create and submit templates you want to send as messages using NHS Notify.
20+ </p >
21+ <p >
22+ You can create templates for:
23+ </p >
24+ <ul
25+ class = " nhsuk-list nhsuk-list--bullet"
26+ >
27+ <li >
28+ NHS App messages
29+ </li >
30+ <li >
31+ emails
32+ </li >
33+ <li >
34+ text messages (SMS)
35+ </li >
36+ </ul >
37+ <p >
38+ When you submit a template, it will be used by NHS Notify to set up the messages you want to send.
39+ </p >
40+ <h2
41+ class = " nhsuk-heading-l"
42+ data-testid = " page-sub-heading"
43+ >
44+ Before you start
45+ </h2 >
46+ <p >
47+ Only use this tool if your message content has been signed off by the relevant stakeholders in your team.
48+ </p >
49+ <p >
50+ You can save a template as a draft and edit it later.
51+ </p >
52+ <p >
53+ If you want to change a submitted template, you must create a new template to replace it.
54+ </p >
55+ <p >
56+ You can access this tool by signing in with your Care Identity.
57+ </p >
58+ <a
59+ aria-disabled = " false"
60+ class = " nhsuk-button"
61+ data-testid = " link-button"
62+ draggable = " false"
63+ href = " /templates/manage-templates"
64+ role = " button"
65+ >
66+ Start now
67+ </a >
68+ </div >
69+ </div >
70+ </div >
71+ ` ;
Original file line number Diff line number Diff line change 1- import { render , screen } from '@testing-library/react' ;
1+ import { render } from '@testing-library/react' ;
22import HomePage from '@app/create-and-submit-templates/page' ;
3- import content from '@content/content' ;
43
5- const homePageContent = content . pages . homePage ;
6-
7- describe ( 'Header component' , ( ) => {
8- it ( 'renders component correctly' , ( ) => {
9- render ( < HomePage /> ) ;
10-
11- expect ( screen . getByTestId ( 'page-content-wrapper' ) ) . toBeInTheDocument ( ) ;
12- expect ( screen . getByTestId ( 'page-heading' ) ) . toBeInTheDocument ( ) ;
13- expect ( screen . getByTestId ( 'page-sub-heading' ) ) . toBeInTheDocument ( ) ;
14- expect ( screen . getByTestId ( 'link-button' ) ) . toBeInTheDocument ( ) ;
15- expect ( screen . getByTestId ( 'link-button' ) ) . toHaveAttribute (
16- 'href' ,
17- homePageContent . linkButton . url
18- ) ;
19- expect ( screen . getByTestId ( 'link-button' ) ) . toHaveTextContent (
20- homePageContent . linkButton . text
21- ) ;
22- } ) ;
4+ it ( 'matches the snapshot' , ( ) => {
5+ const { container } = render ( < HomePage /> ) ;
6+ expect ( container ) . toMatchSnapshot ( ) ;
237} ) ;
Original file line number Diff line number Diff line change @@ -172,11 +172,10 @@ const homePage = {
172172 pageSubHeading : 'Before you start' ,
173173 text4 :
174174 'Only use this tool if your message content has been signed off by the relevant stakeholders in your team.' ,
175- text5 : 'You cannot save a template as a draft and edit it later.' ,
175+ text5 : 'You can save a template as a draft and edit it later.' ,
176176 text6 :
177177 'If you want to change a submitted template, you must create a new template to replace it.' ,
178- text7 :
179- 'You can access this tool by signing in with your NHSmail account or Care Identity.' ,
178+ text7 : 'You can access this tool by signing in with your Care Identity.' ,
180179 linkButton : {
181180 text : 'Start now' ,
182181 url : `${ getBasePath ( ) } /manage-templates` ,
You can’t perform that action at this time.
0 commit comments