From 26875e33f3b0edc7205f23dad699cf2b58a35f2b Mon Sep 17 00:00:00 2001 From: Aaron Scully Date: Wed, 29 Apr 2026 14:41:23 +0100 Subject: [PATCH 1/2] Updating e-mail header levels as requested. --- src/config/index.js | 9 +++++++++ src/service/mappers/user-confirmation.js | 6 +++--- src/service/mappers/user-confirmation.test.js | 20 +++++++++---------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/config/index.js b/src/config/index.js index 1ff40ec..dcb1d0e 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -48,6 +48,7 @@ export const config = convict({ cdpEnvironment: { doc: 'The CDP environment the app is running in. With the addition of "local" for local development', format: ['local', 'dev', 'test', 'perf-test', 'prod', 'ext-test'], + nullable: true, default: null, env: 'ENVIRONMENT' }, @@ -119,6 +120,7 @@ export const config = convict({ httpsProxy: { doc: 'HTTPS Proxy', format: String, + nullable: true, default: null, env: 'CDP_HTTPS_PROXY' }, @@ -186,6 +188,7 @@ export const config = convict({ oidcJwksUri: { doc: 'The URI that defines the OIDC json web key set', format: String, + nullable: true, default: null, env: 'OIDC_JWKS_URI' }, @@ -193,6 +196,7 @@ export const config = convict({ oidcVerifyAud: { doc: 'The audience used for verifying the OIDC JWT', format: String, + nullable: true, default: null, env: 'OIDC_VERIFY_AUD' }, @@ -200,6 +204,7 @@ export const config = convict({ oidcVerifyIss: { doc: 'The issuer used for verifying the OIDC JWT', format: String, + nullable: true, default: null, env: 'OIDC_VERIFY_ISS' }, @@ -207,6 +212,7 @@ export const config = convict({ entitlementUrl: { doc: 'Forms entitlements API URL', format: String, + nullable: true, default: null, env: 'ENTITLEMENT_URL' }, @@ -215,6 +221,7 @@ export const config = convict({ header: { doc: 'CDP tracing header name', format: String, + nullable: true, default: null, env: 'TRACING_HEADER' } @@ -265,6 +272,7 @@ export const config = convict({ sqsEventsDlqArn: { doc: 'SQS deadletter queue ARN', format: String, + nullable: true, default: null, env: 'EVENTS_SQS_DLQ_ARN' }, @@ -272,6 +280,7 @@ export const config = convict({ fileExpiryInMonths: { doc: 'The number of months a file link is active for', format: Number, + nullable: true, default: null, env: 'FILE_EXPIRY_IN_MONTHS' } diff --git a/src/service/mappers/user-confirmation.js b/src/service/mappers/user-confirmation.js index acfcef8..587dadf 100644 --- a/src/service/mappers/user-confirmation.js +++ b/src/service/mappers/user-confirmation.js @@ -81,13 +81,13 @@ ${formattedAnswers} # Form submitted ${referenceNumber}We received your form submission for ‘${escapeContent(formName)}’ at ${formattedSubmissionDate}. ${paymentSection} -## What happens next +# What happens next ${submissionGuidance ?? submisionGuidancePlaceholder} -## Get help +# Get help ${contactDetails} -## Your answers +# Your answers Find a copy of your answers at the bottom of this email. Do not reply to this email. We do not monitor replies to this email address. diff --git a/src/service/mappers/user-confirmation.test.js b/src/service/mappers/user-confirmation.test.js index 1a62ffc..b30b6af 100644 --- a/src/service/mappers/user-confirmation.test.js +++ b/src/service/mappers/user-confirmation.test.js @@ -40,13 +40,13 @@ describe('user-confirmation', () => { We received your form submission for ‘My Form Name’ at 2:21pm on Tuesday 4 November 2025. -## What happens next +# What happens next Some submission guidance -## Get help +# Get help -## Your answers +# Your answers Find a copy of your answers at the bottom of this email. Do not reply to this email. We do not monitor replies to this email address. @@ -74,13 +74,13 @@ From Defra # Form submitted We received your form submission for ‘My Form Name’ at 2:21pm on Tuesday 4 November 2025. -## What happens next +# What happens next Define this text in the 'What happens next' section of the form overview -## Get help +# Get help -## Your answers +# Your answers Find a copy of your answers at the bottom of this email. Do not reply to this email. We do not monitor replies to this email address. @@ -155,10 +155,10 @@ From Defra # Form submitted We received your form submission for ‘My Form Name’ at 2:21pm on Tuesday 4 November 2025. -## What happens next +# What happens next Some submission guidance -## Get help +# Get help 0121 123456789 [our-email@test.com](mailto:our-email@test.com) @@ -168,7 +168,7 @@ We will respond within 5 working days -## Your answers +# Your answers Find a copy of your answers at the bottom of this email. Do not reply to this email. We do not monitor replies to this email address. @@ -300,7 +300,7 @@ From Defra const paymentIndex = result.indexOf( '# Your payment of £50.00 was successful' ) - const whatHappensNextIndex = result.indexOf('## What happens next') + const whatHappensNextIndex = result.indexOf('# What happens next') expect(paymentIndex).toBeGreaterThan(submissionTextIndex) expect(paymentIndex).toBeLessThan(whatHappensNextIndex) From 4e45cee1afd17ed99a32e74f3710e6fd4cc5e4dd Mon Sep 17 00:00:00 2001 From: Aaron Scully Date: Fri, 1 May 2026 10:59:52 +0100 Subject: [PATCH 2/2] Fix incorrect modification --- src/config/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config/index.js b/src/config/index.js index dcb1d0e..b7ce014 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -188,7 +188,6 @@ export const config = convict({ oidcJwksUri: { doc: 'The URI that defines the OIDC json web key set', format: String, - nullable: true, default: null, env: 'OIDC_JWKS_URI' },