Skip to content

Commit

Permalink
Merge branch 'main' into alert-autofix-66
Browse files Browse the repository at this point in the history
  • Loading branch information
IGallupSoCo authored Dec 17, 2024
2 parents 2260440 + 7ee28db commit 1e1c67b
Show file tree
Hide file tree
Showing 43 changed files with 787 additions and 350 deletions.
52 changes: 52 additions & 0 deletions src/applications/check-in/components/TravelPayOMB.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import React from 'react';
import { Trans } from 'react-i18next';

// OMB Details
const EXP_DATE = '11/30/2027';
const OMB_NUMBER = '2900-0798';
const RES_BURDEN_MIN = '10';
const VACO_PRA_EMAIL = 'VACOPaperworkReduAct@va.gov';

const TravelPayOMB = () => {
return (
<va-omb-info
exp-date={EXP_DATE}
omb-number={OMB_NUMBER}
res-burden={RES_BURDEN_MIN}
data-testid="travel-pay-omb"
class="vads-u-margin-y--4"
>
<p data-testid="travel-pay-omb-burdern-statement">
<Trans
i18nKey="travel-pay-omb-burdern-statement"
components={[
<strong key="bold" />,
<a
key="link"
href={`mailto:${VACO_PRA_EMAIL}`}
target="_blank"
rel="noreferrer"
>
{VACO_PRA_EMAIL}
</a>,
]}
values={{
ombNumber: OMB_NUMBER,
expDate: EXP_DATE,
resBurden: RES_BURDEN_MIN,
vaEmail: VACO_PRA_EMAIL,
}}
/>
</p>

<p data-testid="travel-pay-omb-privacy-act-info">
<Trans
i18nKey="travel-pay-omb-privacy-act"
components={[<strong key="bold" />]}
/>
</p>
</va-omb-info>
);
};

export default TravelPayOMB;
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ describe('Check-in experience', () => {
expect(yesFunc.calledOnce).to.be.true;
expect(noFunc.calledOnce).to.be.true;
});
it('renders OMB information', () => {
const { getByTestId } = render(
<CheckInProvider>
<TravelPage header="test header" />
</CheckInProvider>,
);
expect(getByTestId('travel-pay-omb')).to.exist;
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
import BackButton from '../../BackButton';
import Wrapper from '../../layout/Wrapper';
import { APP_NAMES } from '../../../utils/appConstants';
import TravelPayOMB from '../../TravelPayOMB';

const TravelPage = ({
header,
Expand Down Expand Up @@ -139,6 +140,7 @@ const TravelPage = ({
value="no"
/>
</div>
<TravelPayOMB />
</Wrapper>
</>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from 'react';
import { expect } from 'chai';
import { render } from '@testing-library/react';

import TravelPayOMB from '../TravelPayOMB';

describe('check-in', () => {
describe('TravelPayOMB', () => {
it('renders the OMB information correctly', () => {
const { getByTestId } = render(<TravelPayOMB />);

// Verify the `va-omb-info` element exists with the correct data-testid
const ombInfo = getByTestId('travel-pay-omb');
expect(ombInfo).to.exist;

// Verify the `exp-date` prop
expect(ombInfo.getAttribute('exp-date')).to.equal('11/30/2027');

// Verify the `omb-number` prop
expect(ombInfo.getAttribute('omb-number')).to.equal('2900-0798');

// Verify the `res-burden` prop
expect(ombInfo.getAttribute('res-burden')).to.equal('10');

// Verify text content within the component
// Verify the Burder Statement Act section
const burderStatement = getByTestId('travel-pay-omb-burdern-statement');
expect(burderStatement).to.exist;
// Verify the statement includes the OMB information
expect(burderStatement.textContent).to.include('2900-0798');
expect(burderStatement.textContent).to.include('11/30/2027');
expect(burderStatement.textContent).to.include('10 minutes');

// Verify the Privacy Act section
const privayActInfo = getByTestId('travel-pay-omb-privacy-act-info');
expect(privayActInfo).to.exist;
});
});
});
4 changes: 3 additions & 1 deletion src/applications/check-in/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@
"time": "Time",
"travel-method": "Travel method",
"travel-pay-cant-file-message": "We’re sorry. We can’t file this type of travel reimbursement claim for you now. But you can still file within <0>30 days</0> of the appointment.",
"travel-pay-omb-burdern-statement": "<0>VA Burden Statement:</0> An agency may not conduct or sponsor, and a person is not required to respond to, a collection of information unless it displays a currently valid OMB control number. The OMB control number for this project is {{ombNumber}}, and it expires {{expDate}}. Public reporting burden for this collection of information is estimated to average {{resBurden}} minutes per respondent, per peryear, including the time for reviewing instructions, searching existingdata sources, gathering and maintaining the data needed, and completingand reviewing the collection of information. Send comments regardingthis burden estimate and any other aspect of this collection ofinformation, including suggestions for reducing this burden, to VAReports Clearance Officer at <1>{{vaEmail}}</1>. Please refer to OMB Control No. {{ombNumber}} in any correspondence. Do not send your completed BTSSS claim or VA Form 10-3542 to this email address.",
"travel-pay-omb-privacy-act": "<0>Privacy Act information:</0> VA is asking you to provide the information on this form under 38 U.S.C. Sections 111 to determine your eligibility for Beneficiary Travel benefits and will be used for that purpose. Information you supply may be verified through a computer-matching program. VA may disclose the information that you put on the form as permitted by law; possible disclosures include those described in the “routine use” identified in the VA systems of records 24VA19 Patient Medical Record-VA, published in the Federal Register in accordance with the Privacy Act of 1974. Providing the requested information is voluntary, but if any or all of the requested information is not provided, it may delay or result in denial of your request for benefits. Failure to furnish the information will not have any effect on any other benefits to which you may be entitled. If you provide VA your Social Security Number, VA will use it to administer your VA benefits. VA may also use this information to identify Veterans and persons claiming or receiving VA benefits and their records, and for other purposes authorized or required by law.",
"travel-pay-reimbursement--info-message": "VA travel pay reimbursement pays eligible Veterans and caregivers back for mileage and other travel expenses to and from approved health care appointments.",
"travel-reimbursement": "Travel reimbursement",
"travel-reimbursement-eligibility": "Travel reimbursement eligibility",
Expand Down Expand Up @@ -457,4 +459,4 @@
"would-you-like-to-file-a-travel-reimbursement-claim-now": "Would you like to file a travel reimbursement claim now?",
"we-encourage-you-to-review-the-requirements": "We encourage you to review the requirements and submit your claim, even if you’re not sure if you’re eligible.",
"how-to-file-other-types-of-claims": "How to file other types of claims"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { createAnalyticsSlug } from '../../../utils/analytics';
import { useFormRouting } from '../../../hooks/useFormRouting';
import { APP_NAMES } from '../../../utils/appConstants';
import ExternalLink from '../../../components/ExternalLink';
import TravelPayOMB from '../../../components/TravelPayOMB';

const TravelIntro = props => {
const { router } = props;
Expand Down Expand Up @@ -102,6 +103,7 @@ const TravelIntro = props => {
{t('set-up-direct-deposit')}
</ExternalLink>
</va-alert>
<TravelPayOMB />
</Wrapper>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,13 @@ describe('travel-claim', () => {
fireEvent.click(link);
expect(push.calledWith('travel-mileage')).to.be.true;
});
it('renders OMB information', () => {
const { getByTestId } = render(
<CheckInProvider>
<TravelIntro />
</CheckInProvider>,
);
expect(getByTestId('travel-pay-omb')).to.exist;
});
});
});
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import environment from 'platform/utilities/environment';
import Breadcrumbs from './Breadcrumbs';
import BreadcrumbsV2 from './v2/BreadcrumbsV2';

export default function DischargeWizardApp({ children }) {
const isProd = environment.isProduction();

if (isProd) {
return (
<div className="discharge-wizard row vads-u-padding-x--1 desktop-lg:vads-u-padding-x--0">
<Breadcrumbs />
{children}
</div>
);
}
return (
<div className="row discharge-wizard-v2 vads-u-padding-bottom--8">
<BreadcrumbsV2 />
Expand Down
16 changes: 0 additions & 16 deletions src/applications/discover-your-benefits/constants/benefits.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,22 +270,6 @@ export const BENEFITS_LIST = [
[mappingTypes.DISABILITY_RATING]: [anyType.ANY],
[mappingTypes.GI_BILL]: [anyType.ANY],
},
extraConditions: {
dependsOn: [
{
field: mappingTypes.CURRENTLY_SERVING,
value: yesNoType.YES,
dependsOnField: mappingTypes.PREVIOUS_SERVICE,
dependsOnValue: yesNoType.YES,
},
{
field: mappingTypes.PREVIOUS_SERVICE,
value: yesNoType.YES,
dependsOnField: mappingTypes.CURRENTLY_SERVING,
dependsOnValue: yesNoType.YES,
},
],
},
learnMoreURL: 'https://www.opm.gov/fedshirevets/',
applyNowURL: '',
},
Expand Down
31 changes: 29 additions & 2 deletions src/applications/gi/components/LicenseCertificationAdminInfo.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,34 @@
import React from 'react';

function LicenseCertificationAdminInfo() {
return <div>LcAdminInfo</div>;
function LicenseCertificationAdminInfo({ institution }) {
const {
name,
mailingStreet,
mailingCity,
mailingState,
mailingZip,
} = institution;
return (
<div className="address-wrapper">
<strong>
<p>The following is the headquarters address</p>
</strong>{' '}
<p className="va-address-block">
{name} <br />
<br />
{mailingStreet}
<br />
{mailingCity}, {mailingState} {mailingZip}
<br />
</p>
<strong>
<p>
Fill out the form Request for Reimbursement of Licensing or
Certification Test Fees.
</p>
</strong>{' '}
</div>
);
}

export default LicenseCertificationAdminInfo;
33 changes: 33 additions & 0 deletions src/applications/gi/components/LicenseCertificationAlert.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';

function LicenseCertificationAlert({
changeStateAlert,
changeDropdownsAlert,
changeStateToAllAlert,
state,
name,
visible,
}) {
return (
<va-alert
className="license-alert"
// slim={true}
// disable-analytics={true}
visible={visible}
// close-btn-aria-label={closeBtnAriaLabel}
closeable={false}
fullWidth={false}
style={{ maxWidth: '30rem' }}
>
{changeStateAlert &&
`The state of ${state} has been selected becuase
the ${name} license is specific to it.`}
{changeDropdownsAlert &&
`State options have been changed to reflect only those states where ${name} is available`}
{changeStateToAllAlert &&
`Certifications are nationwide. State does not apply`}
</va-alert>
);
}

export default LicenseCertificationAlert;
18 changes: 12 additions & 6 deletions src/applications/gi/components/LicenseCertificationInfoTabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ import { LC_TABS } from '../constants';
import LicenseCertificationTestInfo from './LicenseCertificationTestInfo';
import LicenseCertificationAdminInfo from './LicenseCertificationAdminInfo';

export default function LicenseCertificationInfoTabs({ onChange, tab }) {
export default function LicenseCertificationInfoTabs({
onChange,
tab,
resultInfo,
}) {
const tabs = {
[LC_TABS.test]: <LicenseCertificationTestInfo />,
[LC_TABS.admin]: <LicenseCertificationAdminInfo />,
[LC_TABS.test]: <LicenseCertificationTestInfo tests={resultInfo.tests} />,
[LC_TABS.admin]: (
<LicenseCertificationAdminInfo institution={resultInfo.institution} />
),
};

// consider exporting original function from SearchTabs component
Expand All @@ -32,14 +38,14 @@ export default function LicenseCertificationInfoTabs({ onChange, tab }) {
'search-tab',
`${tabName}-search-tab`,
);
const testId = label.replaceAll(' ', '-');
// const testId = label.replaceAll(' ', '-');
return (
/* eslint-disable-next-line @department-of-veterans-affairs/prefer-button-component, react/button-has-type */
<button
type="button"
className={tabClasses}
aria-selected={activeTab}
data-testid={testId}
// data-testid={testId}
role="tab"
onClick={() => {
onChange(tabName);
Expand All @@ -61,6 +67,6 @@ export default function LicenseCertificationInfoTabs({ onChange, tab }) {
);
}
LicenseCertificationInfoTabs.propTypes = {
search: PropTypes.object.isRequired,
tab: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
};
Loading

0 comments on commit 1e1c67b

Please sign in to comment.