Skip to content

Commit d649b6e

Browse files
authored
CCM-10141: Update personalisation data copy (#570)
1 parent 08f29f0 commit d649b6e

File tree

9 files changed

+36
-36
lines changed

9 files changed

+36
-36
lines changed

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ exports[`Client-side validation triggers 1`] = `
432432
class="nhsuk-label nhsuk-label--s"
433433
for="letterTemplateCsv"
434434
>
435-
Text personalisation CSV (optional)
435+
Example personalisation CSV (optional)
436436
</label>
437437
<div
438438
class="nhsuk-hint"
439439
>
440-
If your letter template uses personalisation, upload your test personalisation data.
440+
If your letter template uses custom personalisation fields, upload your example personalisation data.
441441
</div>
442442
<p>
443443
<a
@@ -446,7 +446,7 @@ exports[`Client-side validation triggers 1`] = `
446446
rel="noopener noreferrer"
447447
target="_blank"
448448
>
449-
Learn how to provide test personalisation data (opens in a new tab)
449+
Learn how to provide example personalisation data (opens in a new tab)
450450
</a>
451451
</p>
452452
<div
@@ -859,12 +859,12 @@ exports[`hides right-to-left language warning when language changes 1`] = `
859859
class="nhsuk-label nhsuk-label--s"
860860
for="letterTemplateCsv"
861861
>
862-
Text personalisation CSV (optional)
862+
Example personalisation CSV (optional)
863863
</label>
864864
<div
865865
class="nhsuk-hint"
866866
>
867-
If your letter template uses personalisation, upload your test personalisation data.
867+
If your letter template uses custom personalisation fields, upload your example personalisation data.
868868
</div>
869869
<p>
870870
<a
@@ -873,7 +873,7 @@ exports[`hides right-to-left language warning when language changes 1`] = `
873873
rel="noopener noreferrer"
874874
target="_blank"
875875
>
876-
Learn how to provide test personalisation data (opens in a new tab)
876+
Learn how to provide example personalisation data (opens in a new tab)
877877
</a>
878878
</p>
879879
<div
@@ -1343,12 +1343,12 @@ exports[`renders page one error 1`] = `
13431343
class="nhsuk-label nhsuk-label--s"
13441344
for="letterTemplateCsv"
13451345
>
1346-
Text personalisation CSV (optional)
1346+
Example personalisation CSV (optional)
13471347
</label>
13481348
<div
13491349
class="nhsuk-hint"
13501350
>
1351-
If your letter template uses personalisation, upload your test personalisation data.
1351+
If your letter template uses custom personalisation fields, upload your example personalisation data.
13521352
</div>
13531353
<p>
13541354
<a
@@ -1357,7 +1357,7 @@ exports[`renders page one error 1`] = `
13571357
rel="noopener noreferrer"
13581358
target="_blank"
13591359
>
1360-
Learn how to provide test personalisation data (opens in a new tab)
1360+
Learn how to provide example personalisation data (opens in a new tab)
13611361
</a>
13621362
</p>
13631363
<div
@@ -1853,12 +1853,12 @@ exports[`renders page with multiple errors 1`] = `
18531853
class="nhsuk-label nhsuk-label--s"
18541854
for="letterTemplateCsv"
18551855
>
1856-
Text personalisation CSV (optional)
1856+
Example personalisation CSV (optional)
18571857
</label>
18581858
<div
18591859
class="nhsuk-hint"
18601860
>
1861-
If your letter template uses personalisation, upload your test personalisation data.
1861+
If your letter template uses custom personalisation fields, upload your example personalisation data.
18621862
</div>
18631863
<p>
18641864
<a
@@ -1867,7 +1867,7 @@ exports[`renders page with multiple errors 1`] = `
18671867
rel="noopener noreferrer"
18681868
target="_blank"
18691869
>
1870-
Learn how to provide test personalisation data (opens in a new tab)
1870+
Learn how to provide example personalisation data (opens in a new tab)
18711871
</a>
18721872
</p>
18731873
<div
@@ -2316,12 +2316,12 @@ exports[`renders page with preloaded field values 1`] = `
23162316
class="nhsuk-label nhsuk-label--s"
23172317
for="letterTemplateCsv"
23182318
>
2319-
Text personalisation CSV (optional)
2319+
Example personalisation CSV (optional)
23202320
</label>
23212321
<div
23222322
class="nhsuk-hint"
23232323
>
2324-
If your letter template uses personalisation, upload your test personalisation data.
2324+
If your letter template uses custom personalisation fields, upload your example personalisation data.
23252325
</div>
23262326
<p>
23272327
<a
@@ -2330,7 +2330,7 @@ exports[`renders page with preloaded field values 1`] = `
23302330
rel="noopener noreferrer"
23312331
target="_blank"
23322332
>
2333-
Learn how to provide test personalisation data (opens in a new tab)
2333+
Learn how to provide example personalisation data (opens in a new tab)
23342334
</a>
23352335
</p>
23362336
<div
@@ -2769,12 +2769,12 @@ exports[`shows right-to-left language warning when language changes 1`] = `
27692769
class="nhsuk-label nhsuk-label--s"
27702770
for="letterTemplateCsv"
27712771
>
2772-
Text personalisation CSV (optional)
2772+
Example personalisation CSV (optional)
27732773
</label>
27742774
<div
27752775
class="nhsuk-hint"
27762776
>
2777-
If your letter template uses personalisation, upload your test personalisation data.
2777+
If your letter template uses custom personalisation fields, upload your example personalisation data.
27782778
</div>
27792779
<p>
27802780
<a
@@ -2783,7 +2783,7 @@ exports[`shows right-to-left language warning when language changes 1`] = `
27832783
rel="noopener noreferrer"
27842784
target="_blank"
27852785
>
2786-
Learn how to provide test personalisation data (opens in a new tab)
2786+
Learn how to provide example personalisation data (opens in a new tab)
27872787
</a>
27882788
</p>
27892789
<div

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ exports[`PreviewTemplateDetailsLetter matches snapshot when proofs are present,
320320
<dt
321321
class="nhsuk-summary-list__key"
322322
>
323-
Test personalisation file
323+
Example personalisation file
324324
</dt>
325325
<dd
326326
class="nhsuk-summary-list__value"
@@ -638,7 +638,7 @@ exports[`PreviewTemplateDetailsLetter matches snapshot without proofs 1`] = `
638638
<dt
639639
class="nhsuk-summary-list__key"
640640
>
641-
Test personalisation file
641+
Example personalisation file
642642
</dt>
643643
<dd
644644
class="nhsuk-summary-list__value"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ exports[`PreviewLetterTemplate component matches snapshot when template status i
928928
>
929929
Error:
930930
</span>
931-
Check that the personalisation fields in your template file match the fields in your test personalisation file
931+
Check that the personalisation fields in your template file match the fields in your example personalisation file
932932
</span>
933933
</div>
934934
<h1
@@ -1030,7 +1030,7 @@ exports[`PreviewLetterTemplate component matches snapshot when template status i
10301030
<dt
10311031
class="nhsuk-summary-list__key"
10321032
>
1033-
Test personalisation file
1033+
Example personalisation file
10341034
</dt>
10351035
<dd
10361036
class="nhsuk-summary-list__value"

frontend/src/components/molecules/PreviewTemplateDetails/PreviewTemplateDetailsLetter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function PreviewTemplateDetailsLetter({
5151
{template.files.testDataCsv?.fileName && (
5252
<SummaryList.Row>
5353
<SummaryList.Key>
54-
{rowHeadings.testPersonalisationFile}
54+
{rowHeadings.examplePersonalisationFile}
5555
</SummaryList.Key>
5656
<SummaryList.Value>
5757
<Filename filename={template.files.testDataCsv.fileName} />

frontend/src/content/content.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ const previewLetterTemplate = {
263263
validationError:
264264
'The personalisation fields in your files are missing or do not match.',
265265
validationErrorAction:
266-
'Check that the personalisation fields in your template file match the fields in your test personalisation file',
266+
'Check that the personalisation fields in your template file match the fields in your example personalisation file',
267267
preSubmissionText: previewLetterPreSubmissionText,
268268
};
269269

@@ -327,7 +327,7 @@ const previewTemplateDetails = {
327327
templateProofFiles: 'Template proof files',
328328
templateStatus: 'Status',
329329
templateType: 'Type',
330-
testPersonalisationFile: 'Test personalisation file',
330+
examplePersonalisationFile: 'Example personalisation file',
331331
},
332332
};
333333

@@ -557,13 +557,13 @@ const templateFormLetter = {
557557
templatePdfGuidanceLink: '/using-nhs-notify/letter-templates',
558558
templatePdfGuidanceLinkText:
559559
'Learn how to create letter templates to our specification (opens in a new tab)',
560-
templateCsvLabelText: 'Text personalisation CSV (optional)',
560+
templateCsvLabelText: 'Example personalisation CSV (optional)',
561561
templateCsvHintText:
562-
'If your letter template uses personalisation, upload your test personalisation data.',
562+
'If your letter template uses custom personalisation fields, upload your example personalisation data.',
563563
templateCsvGuidanceLink:
564564
'/using-nhs-notify/personalisation#providing-example-data',
565565
templateCsvGuidanceLinkText:
566-
'Learn how to provide test personalisation data (opens in a new tab)',
566+
'Learn how to provide example personalisation data (opens in a new tab)',
567567
buttonText: 'Save and upload',
568568
form: {
569569
letterTemplateName: {

lambdas/sftp-letters/src/__tests__/domain/test-data.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { parseTestPersonalisation } from '../../domain/test-data';
1+
import { parseExamplePersonalisation } from '../../domain/test-data';
22

33
const testDataCsv = `Personalisation field,Short length data example,Medium length data example,Long length data example
44
appointment_date,Monday 1 May 2025,Saturday 10 April 2025,Wednesday 10 September 2025
@@ -12,9 +12,9 @@ appointment_date,Wednesday 10 September 2025
1212
appointment_time,12:56pm,11:56am,1:56pm
1313
`;
1414

15-
describe('parseTestPersonalisation', () => {
15+
describe('parseExamplePersonalisation', () => {
1616
test('parses valid test data', () => {
17-
expect(parseTestPersonalisation(testDataCsv)).toEqual([
17+
expect(parseExamplePersonalisation(testDataCsv)).toEqual([
1818
{
1919
appointment_date: 'Monday 1 May 2025',
2020
appointment_location:
@@ -40,7 +40,7 @@ describe('parseTestPersonalisation', () => {
4040
});
4141

4242
test('rejects invalid test data', () => {
43-
expect(() => parseTestPersonalisation(testDataCsvInvalid)).toThrow(
43+
expect(() => parseExamplePersonalisation(testDataCsvInvalid)).toThrow(
4444
'Invalid Record Length: expect 4, got 2 on line 2'
4545
);
4646
});

lambdas/sftp-letters/src/app/request-proof.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { UserDataRepository } from '../infra/user-data-repository';
22
import type { Logger } from 'nhs-notify-web-template-management-utils/logger';
33
import type { SyntheticBatch } from '../domain/synthetic-batch';
44
import type { TemplateLockRepository } from '../infra/template-lock-repository';
5-
import { parseTestPersonalisation } from '../domain/test-data';
5+
import { parseExamplePersonalisation } from '../domain/test-data';
66
import { serialiseCsv } from '../infra/serialise-csv';
77
import { z } from 'zod';
88
import path from 'node:path';
@@ -183,7 +183,7 @@ export class App {
183183
);
184184

185185
const parsedTestData = userData.testData
186-
? parseTestPersonalisation(userData.testData)
186+
? parseExamplePersonalisation(userData.testData)
187187
: undefined;
188188

189189
const batchRows = this.batch.buildBatch(

lambdas/sftp-letters/src/domain/test-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { z } from 'zod';
22
import { parse } from 'csv-parse/sync';
33
import { staticPdsExampleData } from './synthetic-batch-data';
44

5-
export function parseTestPersonalisation(csv: string) {
5+
export function parseExamplePersonalisation(csv: string) {
66
const [, ...rows] = parse(csv);
77

88
const input = z

tests/test-team/template-mgmt-component-tests/letter/template-mgmt-create-letter-template-page.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ test.describe('Create Letter Template Page', () => {
145145
url: 'using-nhs-notify/letter-templates',
146146
},
147147
{
148-
name: 'Learn how to provide test personalisation data (opens in a new tab)',
148+
name: 'Learn how to provide example personalisation data (opens in a new tab)',
149149
url: 'using-nhs-notify/personalisation#providing-example-data',
150150
},
151151
];

0 commit comments

Comments
 (0)