Skip to content

Commit

Permalink
Merge branch 'main' into removes-mhv-on-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
asg5704 authored Jan 3, 2025
2 parents 0163a30 + 4d473db commit 7589f5c
Show file tree
Hide file tree
Showing 88 changed files with 1,926 additions and 637 deletions.
45 changes: 36 additions & 9 deletions src/applications/appeals/995/components/EvidenceSummaryLists.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export const VaContent = ({
return (
<li
key={locationAndName + index}
className={listClassNames(!showListOnly)}
className={`${listClassNames(
!showListOnly,
)} vads-u-margin-bottom--2`}
>
<div className={hasErrors ? errorClassNames : ''}>
{errors.name || (
Expand Down Expand Up @@ -242,6 +244,24 @@ export const PrivateContent = ({
}
const Header = isOnReviewPage ? 'h5' : 'h4';

const showAddress = (
{ street, street2, city, state, postalCode, country },
errors,
) => (
<div
className="vads-u-margin-bottom--1 facility-address dd-privacy-hidden"
data-dd-action-name="Non-VA facility address"
>
<div>{street}</div>
{street2 && <div>{street2}</div>}
<div>
{city}, {state} {postalCode}
</div>
{country !== 'USA' && <div>{country}</div>}
{errors.address}
</div>
);

return (
<>
<Header
Expand All @@ -253,13 +273,13 @@ export const PrivateContent = ({
<ul className="evidence-summary remove-bullets" role="list">
{showScNewForm && (
<li className={listClassNames(!showListOnly)}>
<strong
<div
className={`private-authorization ${confirmationPageLabel(
showListOnly,
)}`}
>
{title4142WithId}
</strong>
</div>
<div>
{privacyAgreementAccepted ? (
authorizationLabel
Expand Down Expand Up @@ -287,13 +307,13 @@ export const PrivateContent = ({
)}
{showScNewForm && (
<li className={listClassNames(!showListOnly)}>
<strong
<div
className={`private-limitation-yn ${confirmationPageLabel(
showListOnly,
)}`}
>
{limitContent.title}
</strong>
</div>
<div>{showLimitedConsentYN ? 'Yes' : 'No'}</div>
{!reviewMode && (
<div className="vads-u-margin-top--1p5">
Expand All @@ -312,13 +332,13 @@ export const PrivateContent = ({
)}
{showLimitedConsentYN && (
<li key={LIMITATION_KEY} className={listClassNames(!showListOnly)}>
<strong
<div
className={`private-limitation ${confirmationPageLabel(
showListOnly,
)}`}
>
{limitContent.textAreaTitle}
</strong>
</div>
<div>{limitedConsent}</div>
{!reviewMode && (
<div className="vads-u-margin-top--1p5">
Expand Down Expand Up @@ -366,7 +386,9 @@ export const PrivateContent = ({
return (
<li
key={providerFacilityName + index}
className={listClassNames(!showListOnly)}
className={`${listClassNames(
!showListOnly,
)} vads-u-margin-bottom--2`}
>
<div className={hasErrors ? errorClassNames : ''}>
{errors.name || (
Expand All @@ -377,6 +399,11 @@ export const PrivateContent = ({
{providerFacilityName}
</strong>
)}
{showListOnly ? (
showAddress(providerFacilityAddress, errors)
) : (
<div>{errors.address}</div>
)}
<div
className="dd-privacy-hidden overflow-wrap-word"
data-dd-action-name="Non-VA facility treated issues"
Expand All @@ -386,7 +413,7 @@ export const PrivateContent = ({
<div>{errors.address}</div>
{errors.dates || (
<div
className="dd-privacy-hidden"
className="dd-privacy-hidden vads-u-margin-bottom--1p5"
data-dd-action-name="Non-VA facility treatment date range"
>
{errors.from || fromDate}{errors.to || toDate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('ConfirmationPageV2', () => {
expect($$('li', container).length).to.eq(21);

const items = $$('.dd-privacy-hidden[data-dd-action-name]', container);
expect(items.length).to.eq(28);
expect(items.length).to.eq(30);
expect(
items.map(
(el, index) => el[[3, 4].includes(index) ? 'innerHTML' : 'textContent'],
Expand All @@ -140,9 +140,11 @@ describe('ConfirmationPageV2', () => {
'Test 2',
'Feb 2, 2002 – Feb 2, 2012',
'Private Doctor',
'123 maincity, AK 90210',
'Test and Test 2',
'Jan 1, 2022 – Feb 1, 2022',
'Private Hospital',
'456 maincity, AK 90211',
'Test 2',
'Feb 1, 2022 – May 1, 2022',
'private-medical-records.pdf',
Expand Down Expand Up @@ -202,7 +204,7 @@ describe('ConfirmationPageV2', () => {
expect($$('li', container).length).to.eq(31);

const items = $$('.dd-privacy-hidden[data-dd-action-name]', container);
expect(items.length).to.eq(35);
expect(items.length).to.eq(37);
expect(
items.map(
(el, index) =>
Expand Down Expand Up @@ -234,9 +236,11 @@ describe('ConfirmationPageV2', () => {
'Test 2',
// I don't have a date (not hidden from DataDog)
'Private Doctor',
'123 maincity, AK 90210',
'Test and Test 2',
'Jan 1, 2022 – Feb 1, 2022',
'Private Hospital',
'456 maincity, AK 90211',
'Test 2',
'Feb 1, 2022 – May 1, 2022',
'private-medical-records.pdf',
Expand Down
Loading

0 comments on commit 7589f5c

Please sign in to comment.