Skip to content

Commit 3b4d25d

Browse files
committed
CCM-11494 Update tests and snapshots
1 parent 012007e commit 3b4d25d

File tree

13 files changed

+44
-44
lines changed

13 files changed

+44
-44
lines changed

frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ exports[`ChooseTemplatesPage renders correctly for a message plan with multiple
760760
<li>
761761
<a
762762
class="nhsuk-link nhsuk-link--no-visited-state"
763-
data-testid="choose-template-link-q4"
763+
data-testid="choose-template-link-x1"
764764
href="/message-plans/choose-large-print-letter-template/fbb81055-79b9-4759-ac07-d191ae57be34"
765765
>
766766
Choose

frontend/src/__tests__/components/molecules/MessagePlanBlock.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ describe('MessagePlanBlock', () => {
218218
...buildCascadeItem('LETTER'),
219219
conditionalTemplates: [
220220
{
221-
accessibleFormat: 'q4',
221+
accessibleFormat: 'x1',
222222
templateId: 'large-print-id',
223223
},
224224
],

frontend/src/__tests__/components/molecules/MessagePlanChannelTemplate.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('MessagePlanAccessibleFormatTemplate', () => {
172172
it('should display the accessible format heading', () => {
173173
render(
174174
<MessagePlanAccessibleFormatTemplate
175-
accessibleFormat='q4'
175+
accessibleFormat='x1'
176176
routingConfigId={routingConfigId}
177177
/>
178178
);
@@ -189,7 +189,7 @@ describe('MessagePlanAccessibleFormatTemplate', () => {
189189
beforeEach(() => {
190190
render(
191191
<MessagePlanAccessibleFormatTemplate
192-
accessibleFormat='q4'
192+
accessibleFormat='x1'
193193
routingConfigId={routingConfigId}
194194
/>
195195
);
@@ -219,7 +219,7 @@ describe('MessagePlanAccessibleFormatTemplate', () => {
219219
beforeEach(() => {
220220
render(
221221
<MessagePlanAccessibleFormatTemplate
222-
accessibleFormat='q4'
222+
accessibleFormat='x1'
223223
template={testTemplate}
224224
routingConfigId={routingConfigId}
225225
/>
@@ -247,7 +247,7 @@ describe('MessagePlanAccessibleFormatTemplate', () => {
247247
expect(removeButton).toBeInTheDocument();
248248
});
249249

250-
it.each(['q4'] as const)(
250+
it.each(['x1'] as const)(
251251
'should match snapshot for empty state for letter type (%s)',
252252
(accessibleFormat) => {
253253
const { container } = render(
@@ -261,7 +261,7 @@ describe('MessagePlanAccessibleFormatTemplate', () => {
261261
}
262262
);
263263

264-
it.each(['q4'] as const)(
264+
it.each(['x1'] as const)(
265265
'should match snapshot for template selected state for letter type (%s)',
266266
(accessibleFormat) => {
267267
const { container } = render(

frontend/src/__tests__/components/molecules/MessagePlanConditionalTemplates.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ describe('MessagePlanConditionalLetterTemplates', () => {
228228
beforeEach(() => {
229229
cascadeItem = buildLetterCascadeItem([
230230
{
231-
accessibleFormat: 'q4',
231+
accessibleFormat: 'x1',
232232
templateId: 'large-print-id',
233233
},
234234
]);
@@ -248,7 +248,7 @@ describe('MessagePlanConditionalLetterTemplates', () => {
248248
/>
249249
);
250250

251-
const templateName = screen.getByTestId('template-name-q4');
251+
const templateName = screen.getByTestId('template-name-x1');
252252
expect(templateName).toHaveTextContent('Large print covid reminder');
253253
});
254254

@@ -359,7 +359,7 @@ describe('MessagePlanConditionalLetterTemplates', () => {
359359
it('should match snapshot with all conditional template types selected', () => {
360360
const cascadeItem = buildLetterCascadeItem([
361361
{
362-
accessibleFormat: 'q4',
362+
accessibleFormat: 'x1',
363363
templateId: 'large-print-id',
364364
},
365365
{

frontend/src/__tests__/components/molecules/__snapshots__/MessagePlanBlock.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ exports[`MessagePlanBlock for channel LETTER with no template should match snaps
300300
<li>
301301
<a
302302
class="nhsuk-link nhsuk-link--no-visited-state"
303-
data-testid="choose-template-link-q4"
303+
data-testid="choose-template-link-x1"
304304
href="/message-plans/choose-large-print-letter-template/test-routing-config-id"
305305
>
306306
Choose
@@ -551,7 +551,7 @@ exports[`MessagePlanBlock for channel LETTER with template should match snapshot
551551
<li>
552552
<a
553553
class="nhsuk-link nhsuk-link--no-visited-state"
554-
data-testid="choose-template-link-q4"
554+
data-testid="choose-template-link-x1"
555555
href="/message-plans/choose-large-print-letter-template/test-routing-config-id"
556556
>
557557
Choose

frontend/src/__tests__/components/molecules/__snapshots__/MessagePlanChannelTemplate.test.tsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`MessagePlanAccessibleFormatTemplate when a template has been selected should match snapshot for empty state for letter type (q4) 1`] = `
3+
exports[`MessagePlanAccessibleFormatTemplate when a template has been selected should match snapshot for empty state for letter type (x1) 1`] = `
44
<div>
55
<div
66
class="channel-template-outer"
@@ -19,7 +19,7 @@ exports[`MessagePlanAccessibleFormatTemplate when a template has been selected s
1919
<li>
2020
<a
2121
class="nhsuk-link nhsuk-link--no-visited-state"
22-
data-testid="choose-template-link-q4"
22+
data-testid="choose-template-link-x1"
2323
href="/message-plans/choose-large-print-letter-template/test-routing-config-id"
2424
>
2525
Choose
@@ -38,7 +38,7 @@ exports[`MessagePlanAccessibleFormatTemplate when a template has been selected s
3838
</div>
3939
`;
4040

41-
exports[`MessagePlanAccessibleFormatTemplate when a template has been selected should match snapshot for template selected state for letter type (q4) 1`] = `
41+
exports[`MessagePlanAccessibleFormatTemplate when a template has been selected should match snapshot for template selected state for letter type (x1) 1`] = `
4242
<div>
4343
<div
4444
class="channel-template-outer"
@@ -57,7 +57,7 @@ exports[`MessagePlanAccessibleFormatTemplate when a template has been selected s
5757
>
5858
<p
5959
class="nhsuk-u-margin-bottom-1"
60-
data-testid="template-name-q4"
60+
data-testid="template-name-x1"
6161
>
6262
Large print letter template
6363
</p>
@@ -68,7 +68,7 @@ exports[`MessagePlanAccessibleFormatTemplate when a template has been selected s
6868
<li>
6969
<a
7070
class="nhsuk-link nhsuk-link--no-visited-state"
71-
data-testid="change-template-link-q4"
71+
data-testid="change-template-link-x1"
7272
href="/message-plans/choose-large-print-letter-template/test-routing-config-id"
7373
>
7474
Change
@@ -95,7 +95,7 @@ exports[`MessagePlanAccessibleFormatTemplate when a template has been selected s
9595
/>
9696
<button
9797
class="channel-template-link--remove nhsuk-link"
98-
data-testid="remove-template-link-q4"
98+
data-testid="remove-template-link-x1"
9999
formaction="javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
100100
type="submit"
101101
>

frontend/src/__tests__/components/molecules/__snapshots__/MessagePlanConditionalTemplates.test.tsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ exports[`MessagePlanConditionalLetterTemplates with no templates selected should
108108
<li>
109109
<a
110110
class="nhsuk-link nhsuk-link--no-visited-state"
111-
data-testid="choose-template-link-q4"
111+
data-testid="choose-template-link-x1"
112112
href="/message-plans/choose-large-print-letter-template/test-routing-config-id"
113113
>
114114
Choose
@@ -274,7 +274,7 @@ exports[`MessagePlanConditionalLetterTemplates with templates selected should ma
274274
>
275275
<p
276276
class="nhsuk-u-margin-bottom-1"
277-
data-testid="template-name-q4"
277+
data-testid="template-name-x1"
278278
>
279279
Large print template
280280
</p>
@@ -285,7 +285,7 @@ exports[`MessagePlanConditionalLetterTemplates with templates selected should ma
285285
<li>
286286
<a
287287
class="nhsuk-link nhsuk-link--no-visited-state"
288-
data-testid="change-template-link-q4"
288+
data-testid="change-template-link-x1"
289289
href="/message-plans/choose-large-print-letter-template/test-routing-config-id"
290290
>
291291
Change
@@ -312,7 +312,7 @@ exports[`MessagePlanConditionalLetterTemplates with templates selected should ma
312312
/>
313313
<button
314314
class="channel-template-link--remove nhsuk-link"
315-
data-testid="remove-template-link-q4"
315+
data-testid="remove-template-link-x1"
316316
formaction="javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
317317
type="submit"
318318
>

frontend/src/__tests__/components/organisms/__snapshots__/CreateEditMessagePlan.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ exports[`CreateEditMessagePlan should match snapshot for a typical message plan
636636
<li>
637637
<a
638638
class="nhsuk-link nhsuk-link--no-visited-state"
639-
data-testid="choose-template-link-q4"
639+
data-testid="choose-template-link-x1"
640640
href="/message-plans/choose-large-print-letter-template/30fd1e1c-a608-47cf-9cc2-eabaeeeebeca"
641641
>
642642
Choose
@@ -1338,7 +1338,7 @@ exports[`CreateEditMessagePlan should match snapshot for a typical message plan
13381338
<li>
13391339
<a
13401340
class="nhsuk-link nhsuk-link--no-visited-state"
1341-
data-testid="choose-template-link-q4"
1341+
data-testid="choose-template-link-x1"
13421342
href="/message-plans/choose-large-print-letter-template/30fd1e1c-a608-47cf-9cc2-eabaeeeebeca"
13431343
>
13441344
Choose

frontend/src/__tests__/components/organisms/__snapshots__/MessagePlanChannelList.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ exports[`MessagePlanChannelList should match snapshot for a routing plan with a
997997
<li>
998998
<a
999999
class="nhsuk-link nhsuk-link--no-visited-state"
1000-
data-testid="choose-template-link-q4"
1000+
data-testid="choose-template-link-x1"
10011001
href="/message-plans/choose-large-print-letter-template/routingconfig-1"
10021002
>
10031003
Choose

frontend/src/components/molecules/MessagePlanConditionalTemplates/MessagePlanConditionalTemplates.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { MessagePlanFallbackConditions } from '@molecules/MessagePlanFallbackCon
1515

1616
import styles from './MessagePlanConditionalTemplates.module.scss';
1717

18-
const ACCESSIBLE_FORMATS: LetterType[] = ['q4']; // Large print only
18+
const ACCESSIBLE_FORMATS: LetterType[] = ['x1']; // Large print only
1919

2020
export function MessagePlanConditionalLetterTemplates({
2121
cascadeItem,

0 commit comments

Comments
 (0)