Skip to content

Commit

Permalink
Updated Document Request Page content (#31879)
Browse files Browse the repository at this point in the history
* updated Document Request page header for 5103s, and the breadcrumb
  • Loading branch information
samcoforma authored Sep 12, 2024
1 parent 42e16f0 commit c104fc2
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ function Default5103EvidenceNotice({
}
};
const formattedDueDate = buildDateFormatter()(item.suspenseDate);
const isStandard5103Notice = item.displayName === 'Review evidence list';
const formattedRequestedDate = buildDateFormatter()(item.requestedDate);
const isStandard5103Notice =
item.displayName === 'Review evidence list (5103 notice)';

if (!isAutomated5103Notice(item.displayName) && !isStandard5103Notice) {
return null;
Expand All @@ -85,49 +87,60 @@ function Default5103EvidenceNotice({
<h1 className="vads-u-margin-top--0 vads-u-margin-bottom--2">
Review evidence list (5103 notice)
</h1>
{isStandard5103Notice ? (
<p>
We sent you a “List of evidence we may need (5103 notice)” letter.
This letter lets you know about different types of additional evidence
that could help your claim.
</p>
) : (
<p>
On <strong>{formattedRequestedDate}</strong>, we sent you a “List of
evidence we may need (5103 notice)” letter. This letter lets you know
about different types of additional evidence that could help your
claim.
</p>
)}
<h2>Read your 5103 notice letter</h2>
<p>
We sent you a "List of evidence we may need (5103 notice)" letter. This
letter lets you know about different types of additional evidence that
could help your claim.
You can read your “List of evidence we may need (5103 notice)” letter on
the claim letters page.
</p>
<Link className="active-va-link" to="/your-claim-letters">
Find this letter in your claim letters
Find this letter on the claim letters page
<va-icon icon="chevron_right" size={3} aria-hidden="true" />
</Link>
{isAutomated5103Notice(item.displayName) && (
<p data-testid="due-date-information">
You don’t need to do anything on this page. We’ll wait until{' '}
<strong>{formattedDueDate}</strong>, to move your claim to the next
step.
</p>
)}
<h2 className="vads-u-margin-top--4 vads-u-margin-bottom--2">
If you have more evidence to submit
Submit additional evidence, if applicable
</h2>
<p>
<strong>Note:</strong> You can add evidence at any time. But if you add
evidence later in the process, your claim will move back to this step.
So we encourage you to add all your evidence now.
If you’d like to submit additional evidence based on information in your
“List of evidence we may need (5103 notice)” letter, you can submit that
evidence here.
</p>
<Link data-testid="upload-evidence-link" to="../files">
Upload your evidence here
<Link
className="active-va-link"
data-testid="upload-evidence-link"
to="../files"
>
Upload additional evidence
<va-icon icon="chevron_right" size={3} aria-hidden="true" />
</Link>
<p>
If you finish adding evidence before that date,{' '}
<strong>
you can submit the 5103 notice response waiver attached to the letter.
</strong>{' '}
This might help speed up the claim process.
</p>
<h2 className="vads-u-margin-top--4 vads-u-margin-bottom--2">
If you don’t have more evidence to submit
Submit an evidence waiver
</h2>
<p>
If you’re finished adding evidence, submit the evidence waiver. We’ll
move your claim to the next step as soon as possible.
Submitting this waiver will let VA know that as of now, you’re done
submitting additional evidence. This allows your claim to move into the
review stage as quickly as possible.
</p>
<p>
<strong>Note:</strong> You can add evidence to support your claim at any
time. However, if you add evidence later, your claim will move back to
this step, so we encourage you to add all your evidence now.
</p>
<VaCheckbox
label="I’m finished adding evidence to support my claim."
label="As of now, I’m finished adding evidence to support my claim"
className="vads-u-margin-y--3"
checked={addedEvidence}
error={checkboxErrorMessage}
Expand All @@ -142,6 +155,14 @@ function Default5103EvidenceNotice({
text={buttonMsg}
onClick={submit}
/>

{isAutomated5103Notice(item.displayName) && (
<p data-testid="due-date-information">
<strong>Note:</strong> If you don’t submit the evidence waiver, we'll
wait for you to add evidence until <strong>{formattedDueDate}</strong>
. Then we'll continue processing your claim.
</p>
)}
</div>
);
}
Expand Down
18 changes: 15 additions & 3 deletions src/applications/claims-status/constants.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import environment from '@department-of-veterans-affairs/platform-utilities/environment';

export const ITEMS_PER_PAGE = 10;
Expand Down Expand Up @@ -127,8 +128,19 @@ export const addOrRemoveDependentClaimTypeCodes = [
// The Standard 5103 Notice Response doesnt come through as a tracked item from our API until it is closed so we need to make a
// mocked item with information.
export const standard5103Item = {
displayName: 'Review evidence list',
displayName: 'Review evidence list (5103 notice)',
type: '5103 Notice Response',
description:
'Review a list of evidence we may need to decide your claim (called a 5103 notice).',
description: (
<>
<p>
We sent you a “List of evidence we may need (5103 notice)” letter. This
letter lets you know if submitting additional evidence will help decide
your claim.
</p>
<p>
You can also let us know that you’re done submitting additional
evidence, for now.
</p>
</>
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const automated5103 = {
closedDate: null,
description:
'Review a list of evidence we may need to decide your claim (called a 5103 notice).',
displayName: 'Review evidence list',
displayName: 'Automated 5103 Notice Response',
id: 467558,
overdue: true,
receivedDate: null,
Expand All @@ -29,7 +29,7 @@ const automated5103 = {
const standard5103 = {
description:
'Review a list of evidence we may need to decide your claim (called a 5103 notice).',
displayName: 'Review evidence list',
displayName: 'Review evidence list (5103 notice)',
};

describe('<Default5103EvidenceNotice>', () => {
Expand All @@ -43,13 +43,13 @@ describe('<Default5103EvidenceNotice>', () => {
expect($('#default-5103-notice-page', container)).to.exist;
getByText('Review evidence list (5103 notice)');
expect($('.active-va-link', container)).to.have.text(
'Find this letter in your claim letters',
'Find this letter on the claim letters page',
);
getByText('If you have more evidence to submit');
getByText('Submit additional evidence, if applicable');
expect(getByTestId('upload-evidence-link').textContent).to.equal(
'Upload your evidence here',
'Upload additional evidence',
);
getByText('If you don’t have more evidence to submit');
getByText('Submit an evidence waiver');
expect($('va-checkbox', container)).to.exist;
expect($('va-button', container)).to.exist;
});
Expand Down Expand Up @@ -99,6 +99,7 @@ describe('<Default5103EvidenceNotice>', () => {
decisionRequested
/>,
);

expect($('#default-5103-notice-page', container)).to.exist;
expect($('va-checkbox', container)).to.exist;
expect($('va-button', container)).to.exist;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ describe('<AdditionalEvidencePage>', () => {
expect($('.primary-alert', container)).to.exist;
expect(getByTestId(`item-${claim.attributes.trackedItems[0].id}`)).to
.exist;
getByText('Review evidence list');
getByText('Review evidence list (5103 notice)');
expect(queryByTestId('standard-5103-notice-alert')).to.not.exist;
expect(queryByText('5103 Evidence Notice')).to.be.null;
});
Expand Down Expand Up @@ -621,7 +621,7 @@ describe('<AdditionalEvidencePage>', () => {

expect($('.primary-alert', container)).to.exist;
expect(getByTestId('standard-5103-notice-alert')).to.exist;
getByText('Review evidence list');
getByText('Review evidence list (5103 notice)');
expect(queryByText('Automated 5103 Notice Response')).to.be.null;
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ describe('<FilesNeeded>', () => {
suspenseDate: '2024-12-01',
};

context('when evidenceWaiverSubmitted5103 is false', () => {
it('should render va-alert with item data and hide DueDate', () => {
const { queryByText, getByText } = renderWithRouter(
<Provider store={getStore()}>
<FilesNeeded item={item5103} />
</Provider>,
);

expect(queryByText('December 1, 2024')).to.not.exist;
expect(
queryByText(
'We sent you a “List of evidence we may need (5103 notice)” letter. This letter lets you know if submitting additional evidence will help decide your claim.',
),
).to.exist;
expect(queryByText('Review evidence list (5103 notice)')).to.exist;
getByText('Details');
});
});

it('should render va-alert with item data and hide DueDate', () => {
const { queryByText, getByText } = renderWithRouter(
<Provider store={getStore()}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ describe('<Standard5103Alert>', () => {
context('when user navigates to page directly', () => {
it('should render va-alert with item data', () => {
const { getByText } = renderWithRouter(<Standard5103Alert />);
getByText('Review evidence list');
getByText('Review evidence list (5103 notice)');
getByText(
'Review a list of evidence we may need to decide your claim (called a 5103 notice).',
'We sent you a “List of evidence we may need (5103 notice)” letter. This letter lets you know if submitting additional evidence will help decide your claim.',
);
getByText('Details');
expect(sessionStorage.getItem('previousPage')).to.not.exist;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ describe('<WhatYouNeedToDo>', () => {
expect(queryByText(nothingNeededText)).not.to.exist;
expect($('va-alert', container)).to.exist;
expect(getByTestId('standard-5103-notice-alert')).to.exist;
getByText('Review evidence list');
getByText('Review evidence list (5103 notice)');
expect(queryByText('Automated 5103 Notice Response')).to.be.null;
});

Expand Down Expand Up @@ -328,7 +328,7 @@ describe('<WhatYouNeedToDo>', () => {
expect($('va-alert', container)).to.exist;
expect(getByTestId(`item-${claim.attributes.trackedItems[0].id}`)).to
.exist;
getByText('Review evidence list');
getByText('Review evidence list (5103 notice)');
expect(queryByTestId('standard-5103-notice-alert')).to.not.exist;
expect(queryByText('5103 Evidence Notice')).to.be.null;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ class TrackClaimsPageV2 {
.first()
.should(
'contain',
'Review a list of evidence we may need to decide your claim (called a 5103 notice).',
'We sent you a “List of evidence we may need (5103 notice)” letter. This letter lets you know if submitting additional evidence will help decide your claim.',
);
cy.get(testId)
.find('a')
Expand Down Expand Up @@ -567,21 +567,17 @@ class TrackClaimsPageV2 {
if (!isStandard) {
cy.get('[data-testid="due-date-information"]').should(
'contain',
'You don’t need to do anything on this page. We’ll wait until July 14, 2024, to move your claim to the next step.',
"Note: If you don’t submit the evidence waiver, we'll wait for you to add evidence until July 14, 2024. Then we'll continue processing your claim.",
);
}
cy.get('a.active-va-link').should(
'contain',
'Find this letter in your claim letters',
'Find this letter on the claim letters page',
);
cy.get('a[data-testid="upload-evidence-link"]').should(
'contain',
'Upload your evidence here',
'Upload additional evidence',
);
cy.get('va-checkbox')
.shadow()
.find('label')
.should('contain', 'I’m finished adding evidence to support my claim.');
}

verifyDocRequestBreadcrumbs(previousPageFiles = false, is5103Notice = false) {
Expand Down

0 comments on commit c104fc2

Please sign in to comment.