Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
},
Expand Down Expand Up @@ -119,6 +120,7 @@ export const config = convict({
httpsProxy: {
doc: 'HTTPS Proxy',
format: String,
nullable: true,
default: null,
env: 'CDP_HTTPS_PROXY'
},
Expand Down Expand Up @@ -193,20 +195,23 @@ export const config = convict({
oidcVerifyAud: {
doc: 'The audience used for verifying the OIDC JWT',
format: String,
nullable: true,
default: null,
env: 'OIDC_VERIFY_AUD'
},
/**@type {SchemaObj<string>} */
oidcVerifyIss: {
doc: 'The issuer used for verifying the OIDC JWT',
format: String,
nullable: true,
default: null,
env: 'OIDC_VERIFY_ISS'
},
/**@type {SchemaObj<string>} */
entitlementUrl: {
doc: 'Forms entitlements API URL',
format: String,
nullable: true,
default: null,
env: 'ENTITLEMENT_URL'
},
Expand All @@ -215,6 +220,7 @@ export const config = convict({
header: {
doc: 'CDP tracing header name',
format: String,
nullable: true,
default: null,
env: 'TRACING_HEADER'
}
Expand Down Expand Up @@ -265,13 +271,15 @@ export const config = convict({
sqsEventsDlqArn: {
doc: 'SQS deadletter queue ARN',
format: String,
nullable: true,
default: null,
env: 'EVENTS_SQS_DLQ_ARN'
},
/**@type {SchemaObj<number>} */
fileExpiryInMonths: {
doc: 'The number of months a file link is active for',
format: Number,
nullable: true,
default: null,
env: 'FILE_EXPIRY_IN_MONTHS'
}
Expand Down
6 changes: 3 additions & 3 deletions src/service/mappers/user-confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ ${formattedAnswers}
# Form submitted
${referenceNumber}We received your form submission for &lsquo;${escapeContent(formName)}&rsquo; 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.
Expand Down
20 changes: 10 additions & 10 deletions src/service/mappers/user-confirmation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ describe('user-confirmation', () => {

We received your form submission for &lsquo;My Form Name&rsquo; 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.
Expand Down Expand Up @@ -74,13 +74,13 @@ From Defra
# Form submitted
We received your form submission for &lsquo;My Form Name&rsquo; 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.
Expand Down Expand Up @@ -155,10 +155,10 @@ From Defra
# Form submitted
We received your form submission for &lsquo;My Form Name&rsquo; 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)
Expand All @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
Loading