Skip to content

Commit 2227f8e

Browse files
feat: address bugs
1 parent 6db4f3a commit 2227f8e

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

src/functions/sendCandidateResults/application/service/__mocks__/personalisation-catb-mock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const catBEnglishPassRenderedText = '\n' +
3232
'\n' +
3333
'Fuel-efficient driving is a style of safe driving that reduces your fuel use and helps the environment.\n' +
3434
'\n' +
35-
'Your driving examiner saw that you could improve the control and planning of your driving. You should aim to drive in a fuel-efficient manner, considering your impact on the environment.\n' +
35+
'Your driving examiner saw that you could improve the control and planning of your driving. You should aim to drive in a fuel-efficient manner, considering your effect on the environment.\n' +
3636
'\n' +
3737
'\n' +
3838
' \n' +
@@ -152,7 +152,7 @@ const catBEnglishFailRenderedText = '\n' +
152152
'\n' +
153153
'Fuel-efficient driving is a style of safe driving that reduces your fuel use and helps the environment.\n' +
154154
'\n' +
155-
'Your driving examiner saw that you could improve the control and planning of your driving. You should aim to drive in a fuel-efficient manner, considering your impact on the environment.\n' +
155+
'Your driving examiner saw that you could improve the control and planning of your driving. You should aim to drive in a fuel-efficient manner, considering your effect on the environment.\n' +
156156
'\n' +
157157
'\n' +
158158
' \n' +

src/functions/sendCandidateResults/application/service/template-selector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import {
1313
testExperienceSurveyRidingWelshTemplate,
1414
testExperienceSurveyTemplate,
1515
testExperienceSurveyTemplate3b,
16-
testExperienceSurveyWelshTemplate, testExperienceSurveyWelshTemplate3b,
16+
testExperienceSurveyWelshTemplate,
17+
testExperienceSurveyWelshTemplate3b,
1718
} from '../templates/test-experience-survey';
1819
import {dataPrivacyTemplate, dataPrivacyWelshTemplate} from '../templates/data-privacy';
1920
import {TestOutcome} from '../../domain/test-outcome';

src/functions/sendCandidateResults/application/templates/eco.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const ecoTemplate = (riding?: boolean): string => {
4141
Fuel-efficient ${riding ? 'riding' : 'driving'} is a style of safe driving that reduces your fuel use and helps the environment.
4242
{{/if}}
4343
44-
${riding ? 'The motorcycle' : 'Your driving'} examiner saw that you could improve the control and planning of your driving. You should aim to ${riding ? 'ride' : 'drive'} in a fuel-efficient manner, considering your impact on the environment.
44+
${riding ? 'The motorcycle' : 'Your driving'} examiner saw that you could improve the control and planning of your driving. You should aim to ${riding ? 'ride' : 'drive'} in a fuel-efficient manner, considering your effect on the environment.
4545
{{/if}}
4646
4747
`;

src/functions/sendCandidateResults/application/templates/next-steps.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {Correspondence} from '../../domain/template-id.model';
88
*/
99
Handlebars.registerHelper('displayUrlNextSteps', function (communicationMethod: string, urlDescriptor: string, url: string, caretFlag: boolean = true) {
1010
if (communicationMethod === Correspondence.EMAIL) {
11-
return `${caretFlag ? '^' : ''}[${urlDescriptor}](${url}).`;
11+
return `${caretFlag ? '^' : ''}[${urlDescriptor}](${url})`;
1212
} else return `${caretFlag ? '^' : ''}${urlDescriptor}: ${url}`;
1313
});
1414

@@ -499,16 +499,16 @@ export const nextStepsMod1PassTemplate = `
499499
500500
You now need to pass your motorcycle module 2 (on-road) test.
501501
502-
"If you’re upgrading your licence through {{displayUrlNextSteps communicationMethod "progressive access" "https://www.gov.uk/ride-motorcycle-moped/bike-categories-ages-and-licence-requirements?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass"}}, you must pass module 2 within 6 months. You have to pass module 1 again if you do not
502+
"If you’re upgrading your licence through {{displayUrlNextSteps communicationMethod "progressive access" "https://www.gov.uk/ride-motorcycle-moped/bike-categories-ages-and-licence-requirements?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass" false}}, you must pass module 2 within 6 months. You have to pass module 1 again if you do not.
503503
504-
You or your motorcycle instructor need to book your motorcycle module 2 test if it’s not already been booked. If you do it yourself, book at {{displayUrlNextSteps communicationMethod "www.gov.uk/book-driving-test" "https://www.gov.uk/book-driving-test?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass" false}}
504+
You or your motorcycle instructor need to book your motorcycle module 2 test if it’s not already been booked. If you do it yourself, book at {{displayUrlNextSteps communicationMethod "www.gov.uk/book-driving-test" "https://www.gov.uk/book-driving-test?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass" false}}.
505505
506506
When you take the off-road test, you must use:
507507
508508
- the same subcategory as the licence you’re applying for
509509
- a vehicle with the same type of transmission (manual, automatic or semi-automatic) that you used this time
510510
511-
{{displayUrlNextSteps communicationMethod "Find out more about the vehicles you can use for the tests" "https://www.gov.uk/motorcycle-test/motorcycles-mopeds-you-can-use?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass"}}
511+
{{displayUrlNextSteps communicationMethod "Find out more about the vehicles you can use for the tests" "https://www.gov.uk/motorcycle-test/motorcycles-mopeds-you-can-use?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass"}}.
512512
513513
---
514514
`;
@@ -518,9 +518,9 @@ export const nextStepsMod1PassWelshTemplate = `
518518
519519
Nawr mae angen basio y prawf gyrru beic modur modiwl 2 (ar y ffordd).
520520
521-
Os ydych chi’n uwchraddio’ch trwydded trwy ‘[mynediad cynyddol]( https://www.gov.uk/ride-motorcycle-moped/bike-categories-ages-and-licence-requirements?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass)’, mae rhaid pasio modiwl 2 o fewn 6 mis. Bydd rhaid pasio modiwl 1 eto os ydych yn aflwyddiannus.
521+
Os ydych chi’n uwchraddio’ch trwydded trwy {{displayUrlNextSteps communicationMethod "mynediad cynyddol" "https://www.gov.uk/ride-motorcycle-moped/bike-categories-ages-and-licence-requirements?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass" false}}, mae rhaid pasio modiwl 2 o fewn 6 mis. Bydd rhaid pasio modiwl 1 eto os ydych yn aflwyddiannus.
522522
523-
Mae angen i chi neu’ch hyfforddwr beic modur archebu prawf modiwl 2 eich beic modur os nad yw eisoes wedi’i archebu. Os ydych yn trefnu eich hun, ewch i {{displayUrlNextSteps communicationMethod "www.gov.uk/book-driving-test" "https://www.gov.uk/book-driving-test?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass" false}}
523+
Mae angen i chi neu’ch hyfforddwr beic modur archebu prawf modiwl 2 eich beic modur os nad yw eisoes wedi’i archebu. Os ydych yn trefnu eich hun, ewch i {{displayUrlNextSteps communicationMethod "www.gov.uk/book-driving-test" "https://www.gov.uk/book-driving-test?utm_source=dvsa&utm_medium=email&utm_campaign=motorcycle-module-1-test&utm_content=pass" false}}.
524524
525525
Pan fyddwch yn cymryd y prawf oddi ar y ffordd, bydd rhaid i chi ddefnyddio:
526526

src/functions/sendCandidateResults/application/templates/result-summary.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ export const failResultWelshTemplate = (testType: string, categorySwitch: TestCa
326326
^##Methiant Rheoli Risg
327327
{{/if}}
328328
329-
^sgôr cyffredinol: {{totalScore}} allan o 51
329+
^Sgôr cyffredinol: {{totalScore}} allan o 51
330330
331331
^Cynllunio gwersi: {{lessonPlanningScore}} allan o 12
332332
^Rheoli risg: {{riskManagementScore}} allan o 15
@@ -360,7 +360,7 @@ Mae'n ddrwg gennym ${thirdAttempt ? `${categorySwitch === TestCategory.ADI3 ? 'n
360360
##
361361
Mae'n ddrwg gennym nad oeddech yn llwyddiannus y tro hwn ac nad ydych wedi cymhwyso fel ADI.
362362
363-
Os ydych yn bwriadu ailgychwyn y broses gymhwyso, mae'n bwysig deall mwy am y cymwyseddau y cawsoch eich asesu arnynt.
363+
I paratoi ar gyfer eich prawf nesaf, mae'n bwysig deall mwy am y rhesymau nad ydych wedi bod yn llwyddiannus y tro hwn.
364364
`;
365365
break;
366366
default:
@@ -373,7 +373,7 @@ Os ydych yn bwriadu ailgychwyn y broses gymhwyso, mae'n bwysig deall mwy am y cy
373373
##
374374
Mae'n ddrwg gennym nad oeddech yn llwyddiannus y tro hwn ac nad ydych wedi cymhwyso fel ADI.
375375
376-
Os ydych yn bwriadu ailgychwyn y broses gymhwyso, mae'n bwysig deall mwy am y cymwyseddau y cawsoch eich asesu arnynt.
376+
I paratoi ar gyfer eich prawf nesaf, mae'n bwysig deall mwy am y rhesymau nad ydych wedi bod yn llwyddiannus y tro hwn.
377377
`;
378378
}
379379
return template;

0 commit comments

Comments
 (0)