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

95241 add 'no claim id' and BDD scenarios #33012

Merged
merged 1 commit into from
Nov 18, 2024
Merged
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
@@ -1,4 +1,4 @@
import PropTypes from 'prop-types';

Check warning on line 1 in src/applications/disability-benefits/all-claims/components/ClaimConfirmationInfo.jsx

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import React from 'react';
import { capitalizeEachWord, formatDate, formatFullName } from '../utils';
import { NULL_CONDITION_STRING } from '../constants';
Expand All @@ -8,10 +8,11 @@
dateSubmitted,
conditions,
claimId,
isSubmittingBDD,
}) {
const name = formatFullName(fullName);
return (
<va-summary-box>
<va-summary-box class={isSubmittingBDD && 'vads-u-margin-top--4'}>
<h2 className="vads-u-font-size--h3" slot="headline">
Disability Compensation Claim{' '}
<span className="vads-u-font-weight--normal">(Form 21-526EZ)</span>
Expand All @@ -35,10 +36,12 @@
))}
</ul>
</li>
<li>
<strong>Claim ID number</strong>
<div>{claimId}</div>
</li>
{claimId && (
<li>
<strong>Claim ID number</strong>
<div>{claimId}</div>
</li>
)}
</ul>
</div>
</va-summary-box>
Expand All @@ -50,4 +53,5 @@
conditions: PropTypes.array,
dateSubmitted: PropTypes.object,
fullName: PropTypes.object,
isSubmittingBDD: PropTypes.bool,
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/disability-benefits/all-claims/containers/ConfirmationPage.jsx

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import PropTypes from 'prop-types';
import { Toggler } from 'platform/utilities/feature-toggles';

Expand All @@ -22,11 +22,12 @@
} from '../content/confirmation-page';
import { alertBody } from '../content/confirmation-poll';
import { ClaimConfirmationInfo } from '../components/ClaimConfirmationInfo';
import { BddConfirmationAlert } from '../content/bddConfirmationAlert';

export default class ConfirmationPage extends React.Component {
constructor(props) {
super(props);
this.state = { isExpanded: false };

Check warning on line 30 in src/applications/disability-benefits/all-claims/containers/ConfirmationPage.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/disability-benefits/all-claims/containers/ConfirmationPage.jsx:30:20:Unused state field: 'isExpanded'

Check warning on line 30 in src/applications/disability-benefits/all-claims/containers/ConfirmationPage.jsx

View workflow job for this annotation

GitHub Actions / Linting (Files Changed)

src/applications/disability-benefits/all-claims/containers/ConfirmationPage.jsx:30:20:Unused state field: 'isExpanded'
}

componentDidMount() {
Expand Down Expand Up @@ -60,11 +61,13 @@
actions={<></>}
content={alertBody}
/>
{props.isSubmittingBDD && <BddConfirmationAlert />}
<ClaimConfirmationInfo
claimId={props.claimId}
conditions={props.disabilities}
dateSubmitted={props.submittedAt}
fullName={props.fullName}
isSubmittingBDD={props.isSubmittingBDD}
/>
<ConfirmationView.PrintThisPage />
<ConfirmationView.WhatsNextProcessList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/disability-benefits/all-claims/content/bddConfirmationAlert.jsx

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import { bddAlertBegin } from './common';

const alertContent = (
Expand All @@ -18,7 +18,7 @@
export const BddConfirmationAlert = () => {
return (
<div className="vads-u-margin-top--2">
<va-alert status="warning" uswds>
<va-alert status="warning">
<h3 slot="headline">{bddConfirmationHeadline}</h3>
{alertContent}
</va-alert>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/disability-benefits/all-claims/tests/containers/ConfirmationPage.unit.spec.jsx

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import { expect } from 'chai';
import { render } from '@testing-library/react';
import { Toggler } from 'platform/utilities/feature-toggles';
Expand Down Expand Up @@ -221,12 +221,14 @@
submissionStatus: submissionStatuses.succeeded,
};

const { container, getByText } = render(
const { container, getByText, queryByText } = render(
<Provider store={store}>
<ConfirmationPage {...props} />
</Provider>,
);

expect(queryByText(bddConfirmationHeadline)).to.not.exist;

// success alert
getByText('Form submission started on', { exact: false });
getByText('Your submission is in progress.', {
Expand Down Expand Up @@ -265,5 +267,96 @@
'Download VA Form 21-686c (opens in new tab)',
);
});

it('should render new confirmation page when submission succeeded with no claim id', () => {
const store = mockStore(
getData({
disability526NewConfirmationPage: true,
}),
);
const props = {
...defaultProps,
submissionStatus: submissionStatuses.succeeded,
};

const { container, getByText, queryByText } = render(
<Provider store={store}>
<ConfirmationPage {...props} />
</Provider>,
);

// success alert
getByText('Form submission started on', { exact: false });
getByText('Your submission is in progress.', {
exact: false,
});

// summary box with claim info
getByText('Disability Compensation Claim');
getByText('For Hector Lee Brooks Sr.');
getByText('Date submitted');
getByText('November 7, 2024');
getByText('Conditions claimed');
getByText('Something Something');
getByText('Unknown Condition');
expect(queryByText('Claim ID number')).to.not.exist;

// rest of sections are present
getByText('Print this confirmation page');
getByText('What to expect');
getByText('How to contact us if you have questions');
getByText('How long will it take VA to make a decision on my claim?');
getByText('If I have dependents, how can I receive additional benefits?');
getByText('Need help?');
expect(container.querySelectorAll('va-link')).to.have.lengthOf(5);
});

it('should render success with BDD SHA alert when submission succeeded with claim id for BDD', () => {
const store = mockStore(
getData({
disability526NewConfirmationPage: true,
}),
);
const props = {
...defaultProps,
claimId: '123456789',
submissionStatus: submissionStatuses.succeeded,
};

const { container, getByText } = render(
<Provider store={store}>
<ConfirmationPage {...props} isSubmittingBDD />
</Provider>,
);

// success alert
getByText('Form submission started on', { exact: false });
getByText('Your submission is in progress.', {
exact: false,
});
getByText(bddConfirmationHeadline);

// summary box with claim info
getByText('Disability Compensation Claim');
getByText('For Hector Lee Brooks Sr.');
getByText('Date submitted');
getByText('November 7, 2024');
getByText('Conditions claimed');
getByText('Something Something');
getByText('Unknown Condition');
getByText('Claim ID number');
getByText(props.claimId);

// rest of sections are present
getByText('Print this confirmation page');
getByText('What to expect');
getByText('How to contact us if you have questions');
getByText('How long will it take VA to make a decision on my claim?');
getByText('If I have dependents, how can I receive additional benefits?');
getByText('Need help?');

// links
expect(container.querySelectorAll('va-link')).to.have.lengthOf(5);
});
});
});
Loading