Skip to content

Commit

Permalink
Vebt-558: removing 'AGREED' and 'signature' from payload (#33702)
Browse files Browse the repository at this point in the history
* removing 'AGREED' and 'signature' fron payload

* fixed unit tests
  • Loading branch information
fatmakhan0395 authored Dec 23, 2024
1 parent 00e6d29 commit 4d84af0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
11 changes: 4 additions & 7 deletions src/applications/edu-benefits/10282/config/form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { VA_FORM_IDS } from 'platform/forms/constants';
import FormFooter from 'platform/forms/components/FormFooter';
import environment from 'platform/utilities/environment';
import {
fullNameNoSuffixUI,
fullNameNoSuffixSchema,
Expand All @@ -23,20 +24,16 @@ import {
techIndustryFocusArea,
} from '../pages';
import StatementOfTruth from '../components/StatementOfTruth';
// import submitForm from './submitForm';
import submitForm from './submitForm';
import { transform } from './submit-transformer';
import FormHelp from '../components/FormHelp';
import IntroductionPage from '../containers/IntroductionPage';

const formConfig = {
rootUrl: manifest.rootUrl,
urlPrefix: '/',
// submitUrl: '/v0/api',
submit: async formData => {
return new Promise(resolve => {
resolve({ status: 201, data: formData });
});
},
submitUrl: `${environment.API_URL}/v0/education_benefits_claims/10282`,
submit: submitForm,
trackingPrefix: 'edu-10282-',
introduction: IntroductionPage,
confirmation: ConfirmationPage,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import _ from 'lodash';

export function transform(formConfig, form) {
const newForm = _.cloneDeep(form.data);
delete newForm.AGREED;
delete newForm.signature;
return JSON.stringify({
educationBenefitsClaim: {
form: JSON.stringify(form.data),
form: JSON.stringify(newForm),
},
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const transformedMinimalDataActual = {
last: 'Doe',
},
highestLevelOfEducation: {},
signature: 'Jane Doe',
AGREED: true,
// signature: 'Jane Doe',
// AGREED: true,
};

export const transformedMinimalData = JSON.stringify({
Expand Down

0 comments on commit 4d84af0

Please sign in to comment.