From 01b1d733f3d95676c9933978d9e1d1ecc257d50a Mon Sep 17 00:00:00 2001
From: fatmakhan0395 <145523589+fatmakhan0395@users.noreply.github.com>
Date: Mon, 29 Apr 2024 12:28:30 -0700
Subject: [PATCH] Vfep 1324 (#29464)
* Updated direct deposit instructions for 5490 form
* added unit tests
---
.../edu-benefits/5490/config/form.js | 9 +-
.../5490/content/directDepositUpdate.jsx | 134 ++++++++++++++++++
.../edu-benefits/5490/helpers.jsx | 13 +-
.../tests/content/directDeposit.unit.spec.jsx | 3 +
.../content/directDepositUpdate.unit.spec.jsx | 66 +++++++++
5 files changed, 222 insertions(+), 3 deletions(-)
create mode 100644 src/applications/edu-benefits/5490/content/directDepositUpdate.jsx
create mode 100644 src/applications/edu-benefits/5490/tests/content/directDepositUpdate.unit.spec.jsx
diff --git a/src/applications/edu-benefits/5490/config/form.js b/src/applications/edu-benefits/5490/config/form.js
index a96c547c5423..61f8457ec7f5 100644
--- a/src/applications/edu-benefits/5490/config/form.js
+++ b/src/applications/edu-benefits/5490/config/form.js
@@ -18,6 +18,7 @@ import {
benefitsDisclaimerSpouse,
relationshipAndChildTypeLabels,
transform,
+ isProductionOfTestProdEnv,
} from '../helpers';
import { urlMigration } from '../../config/migrations';
@@ -38,6 +39,7 @@ import ConfirmationPage from '../containers/ConfirmationPage';
import benefitSelectionWarning from '../components/BenefitSelectionWarning';
import manifest from '../manifest.json';
+import createDirectDepositPageUpdate from '../content/directDepositUpdate';
const {
benefit,
@@ -644,8 +646,6 @@ const formConfig = {
fullSchema5490,
'relativeAddress',
),
-
- directDeposit: createDirectDepositPage5490(),
},
},
GuardianInformation: {
@@ -656,5 +656,10 @@ const formConfig = {
},
},
};
+if (isProductionOfTestProdEnv()) {
+ formConfig.chapters.personalInformation.pages.directDeposit = createDirectDepositPage5490();
+} else {
+ formConfig.chapters.personalInformation.pages.directDeposit = createDirectDepositPageUpdate();
+}
export default formConfig;
diff --git a/src/applications/edu-benefits/5490/content/directDepositUpdate.jsx b/src/applications/edu-benefits/5490/content/directDepositUpdate.jsx
new file mode 100644
index 000000000000..b5f20bff709b
--- /dev/null
+++ b/src/applications/edu-benefits/5490/content/directDepositUpdate.jsx
@@ -0,0 +1,134 @@
+import React from 'react';
+import { isValidRoutingNumber } from 'platform/forms/validations';
+import merge from 'lodash/merge';
+
+export const gaBankInfoHelpText = () => {
+ window.dataLayer.push({
+ event: 'edu-5490--form-help-text-clicked',
+ 'help-text-label': 'What if I don’t have a bank account?',
+ });
+};
+
+const bankInfoHelpText = (
+
+ The{' '}
+
+ Veterans Benefits Banking Program (VBBP)
+ {' '}
+ provides a list of Veteran-friendly banks and credit unions. They’ll
+ work with you to set up an account, or help you qualify for an account,
+ so you can use direct deposit. To get started, call one of the
+ participating banks or credit unions listed on the VBBP website. Be sure
+ to mention the Veterans Benefits Banking Program.
+
+ Direct Deposit information is not required to determine eligibility. + However, benefits cannot be paid without this information per U.S. + Treasury regulation 31 C.F.R. § 208.3. +
+ <>{bankInfoHelpText}> ++ Note: Federal regulation, found in 31 C.F.R. § 208.3 provides that, + subject to section 208.4, "all Federal payments made by an agency shall be + made by electronic funds transfer" (EFT). +
++ Note: Any bank account information you enter here will update all other + existing Veteran benefits, including Compensation, Pension, and benefits + for certain children with disabilities (Chapter 18) payments. Information + entered here WILL NOT change your existing bank account for VA health + benefits. +
+
diff --git a/src/applications/edu-benefits/5490/tests/content/directDeposit.unit.spec.jsx b/src/applications/edu-benefits/5490/tests/content/directDeposit.unit.spec.jsx
index df41aec68fe0..76526d461b89 100644
--- a/src/applications/edu-benefits/5490/tests/content/directDeposit.unit.spec.jsx
+++ b/src/applications/edu-benefits/5490/tests/content/directDeposit.unit.spec.jsx
@@ -15,6 +15,7 @@ describe('Edu 5490 personalInformation directDeposit', () => {
uiSchema,
} = formConfig.chapters.personalInformation.pages.directDeposit;
it('should render', () => {
+ global.window.buildType = true;
const form = ReactTestUtils.renderIntoDocument(