From 674b8b61c6f6f5b0fe064d44e4eb185943c22903 Mon Sep 17 00:00:00 2001 From: Brad Bergeron Date: Fri, 22 Nov 2024 12:20:29 -0500 Subject: [PATCH] Updates UI description to fragment and matcher for schema (#33181) * Updates UI description to fragment and matcher for schema * cleans up unit test * Update display logic with fallback for service history sub heading * Adds missing period at end of paragraph --- .../33/serviceHistory/serviceHistory.js | 37 +++++++++++++++---- .../tests/form.unit.spec.js | 5 +-- 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/applications/my-education-benefits/config/chapters/33/serviceHistory/serviceHistory.js b/src/applications/my-education-benefits/config/chapters/33/serviceHistory/serviceHistory.js index 51dba61211e0..b1d0e89b6736 100644 --- a/src/applications/my-education-benefits/config/chapters/33/serviceHistory/serviceHistory.js +++ b/src/applications/my-education-benefits/config/chapters/33/serviceHistory/serviceHistory.js @@ -25,14 +25,9 @@ const checkBoxValidation = { const serviceHistory33 = { uiSchema: { 'view:subHeading': { - 'ui:description':

Review your service history

, - 'ui:options': { - hideIf: formData => formData?.showMebDgi40Features, - }, - }, - 'view:newSubHeading': { 'ui:description': ( <> +

Review your service history

The displayed service history is reported to VA by DOD and may include service which is not creditable for the Post-9/11 GI Bill. @@ -52,7 +47,35 @@ const serviceHistory33 = { ), 'ui:options': { - hideIf: formData => !formData?.showMebDgi40Features, + hideIf: formData => formData?.meb160630Automation, + }, + }, + 'view:newSubHeading': { + 'ui:description': ( + <> +

Review your service history

+

+ The displayed service history is reported to the VA by DOD and may + include service which is not creditable for the benefit you are + applying for. +

+

+ VA will only consider active duty service ( + + Authority 38 U.S.C. 3301(1) + + ) and a 6-year service obligation (you agreed to serve 6 years) in + the Selective Reserve when determining your eligibility. Please + review your service history and indicate if anything is incorrect. +

+ + ), + 'ui:options': { + hideIf: formData => !formData?.meb160630Automation, }, }, [formFields.toursOfDuty]: { diff --git a/src/applications/my-education-benefits/tests/form.unit.spec.js b/src/applications/my-education-benefits/tests/form.unit.spec.js index 77eabbc64c99..9b378ab888f3 100644 --- a/src/applications/my-education-benefits/tests/form.unit.spec.js +++ b/src/applications/my-education-benefits/tests/form.unit.spec.js @@ -7,12 +7,11 @@ describe('Service History Chapter', () => { uiSchema, } = formConfig?.chapters?.serviceHistoryChapter?.pages?.serviceHistory; - it('renders the old Service History header', () => { + it('renders original Ch33 Service History header', () => { expect(uiSchema['view:subHeading']).to.exist; expect(schema.properties['view:subHeading']).to.exist; }); - - it('renders the new Service History header', () => { + it('renders the new multiple chapter Service History header', () => { expect(uiSchema['view:newSubHeading']).to.exist; expect(schema.properties['view:newSubHeading']).to.exist; });