From bfd5397cbd8034db663763913e0b25a5c7c5188b Mon Sep 17 00:00:00 2001 From: jsimonVA <88905347+jsimonVA@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:20:35 -0500 Subject: [PATCH] #VYE-360 #comment new format for enrollment logic (#29459) * #VYE-360 #comment new format for enrollment logic * #VYE-360 #comment updated unit tests * #VYE-360 #comment updated e2e test * #VYE-360 #comment update mock data * #VYE-360 #comment update enrollment-verification cypress test * #VYE-360 #comment removed old code not in use --- .../verify-your-enrollment/actions/index.js | 4 +- .../components/Enrollmentcard.jsx | 34 +- .../components/PeriodsToVerify.jsx | 32 +- .../PreviousEnrollmentVerifications.jsx | 163 +++- .../constants/mockData.js | 768 ++++++------------ .../containers/VerificationReviewWrapper.jsx | 52 +- .../verify-your-enrollment/helpers.jsx | 366 +++++---- .../reducers/mockData.js | 6 +- .../components/PeriodsToVerify.unit.spec.js | 23 +- ...eviousEnrollmentVerifications.unit.spec.js | 48 +- .../enrollment-verification.cypress.spec.js | 4 +- .../helpers/getPeriodsToVerify.unit.spec.js | 69 +- 12 files changed, 696 insertions(+), 873 deletions(-) diff --git a/src/applications/verify-your-enrollment/actions/index.js b/src/applications/verify-your-enrollment/actions/index.js index 5261654f67e1..4d1574af9422 100644 --- a/src/applications/verify-your-enrollment/actions/index.js +++ b/src/applications/verify-your-enrollment/actions/index.js @@ -1,6 +1,6 @@ import { apiRequest } from '@department-of-veterans-affairs/platform-utilities/api'; import environment from '@department-of-veterans-affairs/platform-utilities/environment'; -import { USER_MOCK_DATA } from '../constants/mockData'; +import { UPDATED_USER_MOCK_DATA } from '../constants/mockData'; // Action Types export const UPDATE_PENDING_VERIFICATIONS = 'UPDATE_PENDING_VERIFICATIONS'; export const UPDATE_VERIFICATIONS = 'UPDATE_VERIFICATIONS'; @@ -67,7 +67,7 @@ export const getData = () => { setTimeout(() => { disptach({ type: GET_DATA_SUCCESS, - response: USER_MOCK_DATA, + response: UPDATED_USER_MOCK_DATA, }); }, 1000); }; diff --git a/src/applications/verify-your-enrollment/components/Enrollmentcard.jsx b/src/applications/verify-your-enrollment/components/Enrollmentcard.jsx index 8c693280cb16..dd6c0a0177bf 100644 --- a/src/applications/verify-your-enrollment/components/Enrollmentcard.jsx +++ b/src/applications/verify-your-enrollment/components/Enrollmentcard.jsx @@ -7,11 +7,7 @@ import { getPeriodsToVerify, } from '../helpers'; -const EnrollmentCard = ({ - enrollmentPeriods, - confirmationPage = false, - confirmedEnrollment = false, -}) => { +const EnrollmentCard = ({ enrollmentPeriods, confirmationPage = false }) => { const getCards = () => { const combinedEnrollmentsObj = combineEnrollmentsWithStartMonth( enrollmentPeriods, @@ -23,10 +19,10 @@ const EnrollmentCard = ({ // if there are more than one enrollment periods that startd in the same month // then the records are combined into the same array // if else is in place to take account for arrays that have multiple objects - return combinedEnrollmentsValues.map(enrollment => { + return combinedEnrollmentsValues.map((enrollment, index) => { if (enrollment.length > 1) { return ( -
+

{translateDateIntoMonthYearFormat(enrollment[0].awardBeginDate)} @@ -37,17 +33,6 @@ const EnrollmentCard = ({ `This is the enrollment information we have on file for you for ${translateDateIntoMonthYearFormat( enrollment[0].awardBeginDate, )}.`} - {confirmationPage && - confirmedEnrollment && ( - <> -