Skip to content

Commit 23f29b4

Browse files
committed
CCM-15018: refactor page to show RequestProof banner on the page when routing is disabled
1 parent ebc2e92 commit 23f29b4

10 files changed

Lines changed: 474 additions & 150 deletions

File tree

frontend/src/__tests__/app/request-a-proof/__snapshots__/page.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ exports[`RequestADigitalProofPage matches snapshot 1`] = `
9595
</ul>
9696
<p>
9797
<a
98-
href="#"
98+
href="https://nhsdigitallive.service-now.com/csm?id=sc_cat_item&sys_id=ce81c3ae1b1c5190892d4046b04bcb83"
9999
rel="noopener noreferrer"
100100
target="_blank"
101101
>
102-
Request a proof using our online form (opens in a new tab)
102+
Request a proof using ServiceNow (opens in a new tab)
103103
</a>
104104
.
105105
</p>

frontend/src/__tests__/components/forms/PreviewEmailTemplate/__snapshots__/PreviewEmailTemplate.test.tsx.snap

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,24 @@ exports[`Preview email form renders Routing feature flag - Disabled Client-side
167167
</div>
168168
</dl>
169169
</div>
170+
<div
171+
class="nhsuk-summary-list message-banner"
172+
>
173+
<div
174+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
175+
data-testid="request-proof-message-banner"
176+
>
177+
This is only a basic preview.
178+
<a
179+
href="/templates/request-a-proof/template-id"
180+
rel=""
181+
target=""
182+
>
183+
Request a proof
184+
</a>
185+
to preview this template properly.
186+
</div>
187+
</div>
170188
<form
171189
action="/action"
172190
>
@@ -446,6 +464,24 @@ exports[`Preview email form renders Routing feature flag - Disabled matches erro
446464
</div>
447465
</dl>
448466
</div>
467+
<div
468+
class="nhsuk-summary-list message-banner"
469+
>
470+
<div
471+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
472+
data-testid="request-proof-message-banner"
473+
>
474+
This is only a basic preview.
475+
<a
476+
href="/templates/request-a-proof/template-id"
477+
rel=""
478+
target=""
479+
>
480+
Request a proof
481+
</a>
482+
to preview this template properly.
483+
</div>
484+
</div>
449485
<form
450486
action="/action"
451487
>
@@ -705,6 +741,24 @@ exports[`Preview email form renders matches snapshot when navigating from edit s
705741
</div>
706742
</dl>
707743
</div>
744+
<div
745+
class="nhsuk-summary-list message-banner"
746+
>
747+
<div
748+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
749+
data-testid="request-proof-message-banner"
750+
>
751+
This is only a basic preview.
752+
<a
753+
href="/templates/request-a-proof/template-id"
754+
rel=""
755+
target=""
756+
>
757+
Request a proof
758+
</a>
759+
to preview this template properly.
760+
</div>
761+
</div>
708762
<form
709763
action="/action"
710764
>
@@ -957,7 +1011,7 @@ exports[`Preview email form renders matches snapshot when navigating from edit s
9571011
>
9581012
<div
9591013
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
960-
data-testid="message-banner"
1014+
data-testid="request-proof-message-banner"
9611015
>
9621016
This is only a basic preview.
9631017
<a
@@ -1136,6 +1190,24 @@ exports[`Preview email form renders matches snapshot when navigating from manage
11361190
</div>
11371191
</dl>
11381192
</div>
1193+
<div
1194+
class="nhsuk-summary-list message-banner"
1195+
>
1196+
<div
1197+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
1198+
data-testid="request-proof-message-banner"
1199+
>
1200+
This is only a basic preview.
1201+
<a
1202+
href="/templates/request-a-proof/template-id"
1203+
rel=""
1204+
target=""
1205+
>
1206+
Request a proof
1207+
</a>
1208+
to preview this template properly.
1209+
</div>
1210+
</div>
11391211
<form
11401212
action="/action"
11411213
>
@@ -1383,7 +1455,7 @@ exports[`Preview email form renders matches snapshot when navigating from manage
13831455
>
13841456
<div
13851457
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
1386-
data-testid="message-banner"
1458+
data-testid="request-proof-message-banner"
13871459
>
13881460
This is only a basic preview.
13891461
<a

frontend/src/__tests__/components/forms/PreviewNHSAppTemplate/__snapshots__/PreviewNHSAppTemplate.test.tsx.snap

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,24 @@ exports[`Preview nhs app form renders Routing feature flag - Disabled Client-sid
142142
</div>
143143
</dl>
144144
</div>
145+
<div
146+
class="nhsuk-summary-list message-banner"
147+
>
148+
<div
149+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
150+
data-testid="request-proof-message-banner"
151+
>
152+
This is only a basic preview.
153+
<a
154+
href="/templates/request-a-proof/template-id"
155+
rel=""
156+
target=""
157+
>
158+
Request a proof
159+
</a>
160+
to preview this template properly.
161+
</div>
162+
</div>
145163
<form
146164
action="/action"
147165
>
@@ -397,6 +415,24 @@ exports[`Preview nhs app form renders Routing feature flag - Disabled matches er
397415
</div>
398416
</dl>
399417
</div>
418+
<div
419+
class="nhsuk-summary-list message-banner"
420+
>
421+
<div
422+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
423+
data-testid="request-proof-message-banner"
424+
>
425+
This is only a basic preview.
426+
<a
427+
href="/templates/request-a-proof/template-id"
428+
rel=""
429+
target=""
430+
>
431+
Request a proof
432+
</a>
433+
to preview this template properly.
434+
</div>
435+
</div>
400436
<form
401437
action="/action"
402438
>
@@ -632,6 +668,24 @@ exports[`Preview nhs app form renders matches snapshot when navigating from edit
632668
</div>
633669
</dl>
634670
</div>
671+
<div
672+
class="nhsuk-summary-list message-banner"
673+
>
674+
<div
675+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
676+
data-testid="request-proof-message-banner"
677+
>
678+
This is only a basic preview.
679+
<a
680+
href="/templates/request-a-proof/template-id"
681+
rel=""
682+
target=""
683+
>
684+
Request a proof
685+
</a>
686+
to preview this template properly.
687+
</div>
688+
</div>
635689
<form
636690
action="/action"
637691
>
@@ -860,7 +914,7 @@ exports[`Preview nhs app form renders matches snapshot when navigating from edit
860914
>
861915
<div
862916
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
863-
data-testid="message-banner"
917+
data-testid="request-proof-message-banner"
864918
>
865919
This is only a basic preview.
866920
<a
@@ -1015,6 +1069,24 @@ exports[`Preview nhs app form renders matches snapshot when navigating from mana
10151069
</div>
10161070
</dl>
10171071
</div>
1072+
<div
1073+
class="nhsuk-summary-list message-banner"
1074+
>
1075+
<div
1076+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
1077+
data-testid="request-proof-message-banner"
1078+
>
1079+
This is only a basic preview.
1080+
<a
1081+
href="/templates/request-a-proof/template-id"
1082+
rel=""
1083+
target=""
1084+
>
1085+
Request a proof
1086+
</a>
1087+
to preview this template properly.
1088+
</div>
1089+
</div>
10181090
<form
10191091
action="/action"
10201092
>
@@ -1238,7 +1310,7 @@ exports[`Preview nhs app form renders matches snapshot when navigating from mana
12381310
>
12391311
<div
12401312
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
1241-
data-testid="message-banner"
1313+
data-testid="request-proof-message-banner"
12421314
>
12431315
This is only a basic preview.
12441316
<a

frontend/src/__tests__/components/forms/PreviewSMSTemplate/__snapshots__/PreviewSMSTemplate.test.tsx.snap

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,24 @@ exports[`Review sms form renders Routing feature flag - Disabled Client-side val
142142
</div>
143143
</dl>
144144
</div>
145+
<div
146+
class="nhsuk-summary-list message-banner"
147+
>
148+
<div
149+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
150+
data-testid="request-proof-message-banner"
151+
>
152+
This is only a basic preview.
153+
<a
154+
href="/templates/request-a-proof/template-id"
155+
rel=""
156+
target=""
157+
>
158+
Request a proof
159+
</a>
160+
to preview this template properly.
161+
</div>
162+
</div>
145163
<form
146164
action="/action"
147165
>
@@ -396,6 +414,24 @@ exports[`Review sms form renders Routing feature flag - Disabled matches error s
396414
</div>
397415
</dl>
398416
</div>
417+
<div
418+
class="nhsuk-summary-list message-banner"
419+
>
420+
<div
421+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
422+
data-testid="request-proof-message-banner"
423+
>
424+
This is only a basic preview.
425+
<a
426+
href="/templates/request-a-proof/template-id"
427+
rel=""
428+
target=""
429+
>
430+
Request a proof
431+
</a>
432+
to preview this template properly.
433+
</div>
434+
</div>
399435
<form
400436
action="/action"
401437
>
@@ -630,6 +666,24 @@ exports[`Review sms form renders matches snapshot when navigating from edit scre
630666
</div>
631667
</dl>
632668
</div>
669+
<div
670+
class="nhsuk-summary-list message-banner"
671+
>
672+
<div
673+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
674+
data-testid="request-proof-message-banner"
675+
>
676+
This is only a basic preview.
677+
<a
678+
href="/templates/request-a-proof/template-id"
679+
rel=""
680+
target=""
681+
>
682+
Request a proof
683+
</a>
684+
to preview this template properly.
685+
</div>
686+
</div>
633687
<form
634688
action="/action"
635689
>
@@ -857,7 +911,7 @@ exports[`Review sms form renders matches snapshot when navigating from edit scre
857911
>
858912
<div
859913
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
860-
data-testid="message-banner"
914+
data-testid="request-proof-message-banner"
861915
>
862916
This is only a basic preview.
863917
<a
@@ -1011,6 +1065,24 @@ exports[`Review sms form renders matches snapshot when navigating from manage te
10111065
</div>
10121066
</dl>
10131067
</div>
1068+
<div
1069+
class="nhsuk-summary-list message-banner"
1070+
>
1071+
<div
1072+
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
1073+
data-testid="request-proof-message-banner"
1074+
>
1075+
This is only a basic preview.
1076+
<a
1077+
href="/templates/request-a-proof/template-id"
1078+
rel=""
1079+
target=""
1080+
>
1081+
Request a proof
1082+
</a>
1083+
to preview this template properly.
1084+
</div>
1085+
</div>
10141086
<form
10151087
action="/action"
10161088
>
@@ -1233,7 +1305,7 @@ exports[`Review sms form renders matches snapshot when navigating from manage te
12331305
>
12341306
<div
12351307
class="nhs_notify_warning_callout nhsuk-u-padding-4 nhsuk-u-margin-bottom-6 nhsuk-u-reading-width message-banner__callout"
1236-
data-testid="message-banner"
1308+
data-testid="request-proof-message-banner"
12371309
>
12381310
This is only a basic preview.
12391311
<a

0 commit comments

Comments
 (0)