diff --git a/src/config/index.js b/src/config/index.js index 1ff40ec..b7ce014 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' }, @@ -193,6 +195,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 +203,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 +211,7 @@ export const config = convict({ entitlementUrl: { doc: 'Forms entitlements API URL', format: String, + nullable: true, default: null, env: 'ENTITLEMENT_URL' }, @@ -215,6 +220,7 @@ export const config = convict({ header: { doc: 'CDP tracing header name', format: String, + nullable: true, default: null, env: 'TRACING_HEADER' } @@ -265,6 +271,7 @@ export const config = convict({ sqsEventsDlqArn: { doc: 'SQS deadletter queue ARN', format: String, + nullable: true, default: null, env: 'EVENTS_SQS_DLQ_ARN' }, @@ -272,6 +279,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)