diff --git a/src/applications/simple-forms-form-engine/shared/tests/unit/utils/formConfig.unit.spec.js b/src/applications/simple-forms-form-engine/shared/tests/unit/utils/formConfig.unit.spec.js index c5b1eebbcfef..dea57b2f1497 100644 --- a/src/applications/simple-forms-form-engine/shared/tests/unit/utils/formConfig.unit.spec.js +++ b/src/applications/simple-forms-form-engine/shared/tests/unit/utils/formConfig.unit.spec.js @@ -8,7 +8,11 @@ import { render } from '@testing-library/react'; import * as digitalFormPatterns from '../../../utils/digitalFormPatterns'; import * as IntroductionPage from '../../../containers/IntroductionPage'; import { normalizedForm } from '../../../_config/formConfig'; -import { createFormConfig, formatPages } from '../../../utils/formConfig'; +import { + createFormConfig, + formatPages, + statementOfTruthBody, +} from '../../../utils/formConfig'; const [ yourPersonalInfo, @@ -86,6 +90,13 @@ describe('createFormConfig', () => { `resBurden: ${normalizedForm.ombInfo.resBurden}`, ); }); + + it('includes a statement of truth', () => { + const statementOfTruth = formConfig.preSubmitInfo.statementOfTruth; + + expect(statementOfTruth.body).to.eq(statementOfTruthBody); + expect(statementOfTruth.fullNamePath).to.eq('fullName'); + }); }); describe('formatPages', () => { diff --git a/src/applications/simple-forms-form-engine/shared/utils/formConfig.js b/src/applications/simple-forms-form-engine/shared/utils/formConfig.js index bdfc9501e4aa..65a2e16ac907 100644 --- a/src/applications/simple-forms-form-engine/shared/utils/formConfig.js +++ b/src/applications/simple-forms-form-engine/shared/utils/formConfig.js @@ -45,21 +45,33 @@ const formatChapters = chapters => {}, ); +export const statementOfTruthBody = + 'I confirm that the identifying information in this form is accurate and ' + + 'has been represented correctly.'; + +/** @returns {FormConfig} */ export const createFormConfig = (form, options) => { const { chapters, formId, ombInfo, title } = form; const { rootUrl, trackingPrefix } = options; const subTitle = `VA Form ${formId}`; return { + preSubmitInfo: { + statementOfTruth: { + body: statementOfTruthBody, + messageAriaDescribedby: statementOfTruthBody, + fullNamePath: 'fullName', + }, + }, rootUrl, urlPrefix: '/', - trackingPrefix, // eslint-disable-next-line no-console submit: () => console.log(`Submitted ${subTitle}`), introduction: props => , confirmation: ConfirmationPage, formId, saveInProgress: {}, + trackingPrefix, version: 0, prefillEnabled: true, savedFormMessages: {