Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup Why might I have this debt additional info component #32269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,161 +10,6 @@ export const deductionCodes = Object.freeze({
'75': 'Post-9/11 GI Bill debt for tuition (school liable)',
});

export const renderAdditionalInfo = deductionCode => {
switch (deductionCode) {
case '30':
return (
<section>
<p className="vads-u-margin-top--0">
The compensation and pension offices sent you a letter explaining
why you have this debt. Some common reasons for this type of debt
are:
</p>

<ul>
<li>
A change in your spouse’s or dependent’s status wasn’t submitted
or processed before we made a payment to you, <strong>or</strong>
</li>
<li>
There was an adjustment to your drill pay, <strong>or</strong>
</li>
<li>
Your eligibility for a benefit might have changed,
<strong className="vads-u-margin-left--0p5">or</strong>
</li>
<li>We made a duplicate or incorrect payment to you</li>
</ul>

<p>
If you want more information about the reason for this debt or the
decision resulting in this debt, please call the VA office for your
benefit type:
</p>
<p>
<strong>Disability compensation:</strong>
<va-telephone
className="vads-u-margin-x--0p5"
contact="8008271000"
/>
Monday through Friday, 8:00 a.m to 8:00 p.m. ET
</p>
<p>
<strong>Veterans Pension:</strong>
<va-telephone
className="vads-u-margin-left--0p5"
contact="8772946385"
/>
, Monday through Friday, 8:00 a.m to 4:30 p.m. ET
</p>
<p>
If you want more information about debt overpayment and available
options, please call the Debt Management Center at
<va-telephone
className="vads-u-margin-left--0p5"
contact="8008270648"
/>
.
</p>
</section>
);
case '41':
case '44':
return (
<section>
<p className="vads-u-margin-top--0">
The Education office sent you a letter explaining why you have this
debt. Some common reasons for this type of debt are:
</p>

<ul>
<li>
You made a change in course enrollment, <strong>or</strong>
</li>
<li>
You withdrew from a higher-education institution,
<strong className="vads-u-margin-left--0p5">or</strong>
</li>
<li>
Your eligibility for a benefit might have changed,
<strong className="vads-u-margin-left--0p5">or</strong>
</li>
<li>We made a duplicate or incorrect payment to you</li>
</ul>

<p>
If you want more information about the reason for this debt or the
decision resulting in this debt, please call the Education office at
<va-telephone
className="vads-u-margin-left--0p5"
contact="8884424551"
/>
. We’re here Monday through Friday, 8:00 a.m. to 7:00 p.m. ET.
</p>

<p>
If you want more information about debt overpayment and available
options, please call the Debt Management Center at
<va-telephone
className="vads-u-margin-left--0p5"
contact="8008270648"
/>
.
</p>
</section>
);
case '71':
case '72':
case '74':
case '75':
return (
<section>
<p className="vads-u-margin-top--0">
The Education office sent you a letter explaining why you have this
debt. Some common reasons for this type of debt are:
</p>
<ul>
<li>
You made a change in course enrollment, <strong>or</strong>
</li>
<li>
You withdrew from a higher-education institution,
<strong className="vads-u-margin-left--0p5">or</strong>
</li>
<li>Your eligibility for a benefit might have changed, or</li>
<li>We made a duplicate or incorrect payment to you</li>
</ul>
<p>
<strong>Note:</strong>
For Post-9/11 GI Bill debts, please make separate payments for
tuition, housing, and books and supplies. When there is a change in
this benefit’s use, we’ll collect the three debts separately.
</p>
<p>
If you want more information about the reason for this debt or the
decision resulting in this debt, please call the Education office at
<va-telephone
className="vads-u-margin-left--0p5"
contact="8884424551"
/>
. We’re here Monday through Friday, 8:00 a.m. to 7:00 p.m. ET.
</p>
<p>
If you want more information about debt overpayment and available
options, please call the Debt Management Center at
<va-telephone
className="vads-u-margin-left--0p5"
contact="8008270648"
/>
.
</p>
</section>
);
default:
return null;
}
};

export const renderWhyMightIHaveThisDebt = deductionCode => {
switch (deductionCode) {
case '30':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
import { render } from '@testing-library/react';
import {
deductionCodes,
renderAdditionalInfo,
renderWhyMightIHaveThisDebt,
} from '../const/deduction-codes/index.js';

Check warning on line 6 in src/applications/combined-debt-portal/debt-letters/tests/DebtLetterDeductionCodes.unit.spec.js

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/combined-debt-portal/debt-letters/tests/DebtLetterDeductionCodes.unit.spec.js:6:8:Unexpected use of file extension "js" for "../const/deduction-codes/index.js"

describe('deduction-codes', () => {
describe('deductionCodes', () => {
Expand All @@ -23,33 +22,6 @@
});
});

describe('renderAdditionalInfo', () => {
it('should render additional info for code 30', () => {
const { getByText } = render(renderAdditionalInfo('30'));
expect(
getByText(/The compensation and pension offices sent you a letter/),
).to.exist;
});

it('should render additional info for education codes', () => {
const { getByText } = render(renderAdditionalInfo('41'));
expect(getByText(/The Education office sent you a letter/)).to.exist;
});

it('should render additional info for Post-9/11 GI Bill codes', () => {
const { getByText } = render(renderAdditionalInfo('71'));
expect(
getByText(
/For Post-9\/11 GI Bill debts, please make separate payments/,
),
).to.exist;
});

it('should return null for unknown codes', () => {
expect(renderAdditionalInfo('99')).to.be.null;
});
});

describe('renderWhyMightIHaveThisDebt', () => {
it('should render reasons for code 30', () => {
const { getByText } = render(renderWhyMightIHaveThisDebt('30'));
Expand Down
Loading
Loading