-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vebt-179 added Rudisill question to 1995 (#33742)
* vebt-179 added Rudisill question to 1995 * updated radio-widget to radioUi * update featured toggle and fixed unit tests * added required to benefitAppliedFor * Deleted cypress
- Loading branch information
1 parent
d56bb41
commit e066f08
Showing
11 changed files
with
107 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/applications/edu-benefits/1995/pages/changeAnotherBenefit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import fullSchema from 'vets-json-schema/dist/22-1995-schema.json'; | ||
import React from 'react'; | ||
import { benefitsLabelsUpdate } from '../../utils/labels'; | ||
|
||
const { changeAnotherBenefit, benefitAppliedFor } = fullSchema.properties; | ||
|
||
const displayNewBenefit = { | ||
...benefitAppliedFor, | ||
enum: [...(benefitAppliedFor?.enum || [])], | ||
}; | ||
const changeAnotherBenefitDescription = ( | ||
<p className="vads-u-color--gray-medium"> | ||
Note: if you select yes, this change will be applied with your next | ||
enrollment certification if you are eligible for the benefit selected. | ||
</p> | ||
); | ||
displayNewBenefit.enum.splice(0, 1, 'chapter33'); | ||
displayNewBenefit.enum.splice(1, 1, 'fryScholarship'); | ||
export const uiSchema = { | ||
changeAnotherBenefit: { | ||
'ui:title': 'Do you want to change to another benefit?', | ||
'ui:description': changeAnotherBenefitDescription, | ||
'ui:widget': 'radio', | ||
}, | ||
benefitAppliedFor: { | ||
'ui:widget': 'radio', | ||
'ui:title': 'Which benefit do you want to change to?', | ||
'ui:required': formData => formData.changeAnotherBenefit === 'Yes', | ||
'ui:options': { | ||
labels: benefitsLabelsUpdate, | ||
hideIf: formData => formData.changeAnotherBenefit !== 'Yes', | ||
}, | ||
}, | ||
}; | ||
|
||
export const schema = { | ||
type: 'object', | ||
properties: { | ||
changeAnotherBenefit, | ||
benefitAppliedFor: displayNewBenefit, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
src/applications/edu-benefits/1995/tests/e2e/edu-1995-application-status.cypress.spec.js
This file was deleted.
Oops, something went wrong.
65 changes: 0 additions & 65 deletions
65
src/applications/edu-benefits/1995/tests/e2e/edu-1995.cypress.spec.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters