Skip to content

Commit

Permalink
Updates UI description to fragment and matcher for schema (#33181)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
bradbergeron-us authored Nov 22, 2024
1 parent 1020a4d commit 674b8b6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,9 @@ const checkBoxValidation = {
const serviceHistory33 = {
uiSchema: {
'view:subHeading': {
'ui:description': <h3>Review your service history</h3>,
'ui:options': {
hideIf: formData => formData?.showMebDgi40Features,
},
},
'view:newSubHeading': {
'ui:description': (
<>
<h3>Review your service history</h3>
<p>
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.
Expand All @@ -52,7 +47,35 @@ const serviceHistory33 = {
</>
),
'ui:options': {
hideIf: formData => !formData?.showMebDgi40Features,
hideIf: formData => formData?.meb160630Automation,
},
},
'view:newSubHeading': {
'ui:description': (
<>
<h3>Review your service history</h3>
<p>
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.
</p>
<p>
VA will only consider active duty service (
<a
target="_blank"
href="https://uscode.house.gov/view.xhtml?req=(title:38%20section:3301%20edition:prelim)%20OR%20(granuleid:USC-prelim-title38-section3301)&f=treesort&edition=prelim&num=0&jumpTo=true"
rel="noreferrer"
>
Authority 38 U.S.C. 3301(1)
</a>
) 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.
</p>
</>
),
'ui:options': {
hideIf: formData => !formData?.meb160630Automation,
},
},
[formFields.toursOfDuty]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit 674b8b6

Please sign in to comment.