Skip to content

Commit

Permalink
96383 remove environment checks for for prod launch and update e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christinec-fftc committed Jan 16, 2025
1 parent 9a998a9 commit d2a0020
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ import { isLoggedIn } from '@department-of-veterans-affairs/platform-user/select
import recordEvent from 'platform/monitoring/record-event';
import { WIZARD_STATUS_RESTARTING } from 'platform/site-wide/wizard';
import { itfNotice } from '../content/introductionPage';
import {
show526Wizard,
isBDD,
getPageTitle,
getStartText,
show5103Updates,
} from '../utils';
import { show526Wizard, isBDD, getPageTitle, getStartText } from '../utils';
import {
BDD_INFO_URL,
DISABILITY_526_V2_ROOT_URL,
Expand Down Expand Up @@ -94,12 +88,7 @@ class IntroductionPage extends React.Component {
)}
<SaveInProgressIntro {...sipProps} />
{itfNotice}
<h2
id="main-content"
className={!show5103Updates() && 'vads-u-font-size--h4'}
>
{subwayTitle}
</h2>
<h2 id="main-content">{subwayTitle}</h2>
<div className="process schemaform-process">
{loggedIn && (
<p id="restart-wizard" className="vads-u-margin-top--0">
Expand All @@ -118,28 +107,24 @@ class IntroductionPage extends React.Component {
.
</p>
)}
{show5103Updates() && (
<va-alert status="info">
<h3 className="vads-u-padding-top--0">
Notice of evidence needed
</h3>
<p>
We’re required by law to tell you what evidence you’ll need to
submit to support your disability claim.
</p>
<p>
You can review the evidence requirements on our evidence needed
for your disability claim page.
</p>
<p>
<va-link
external
href="https://www.va.gov/disability/how-to-file-claim/evidence-needed/"
text="Review the evidence requirements"
/>
</p>
</va-alert>
)}
<va-alert status="info">
<h3 className="vads-u-padding-top--0">Notice of evidence needed</h3>
<p>
We’re required by law to tell you what evidence you’ll need to
submit to support your disability claim.
</p>
<p>
You can review the evidence requirements on our evidence needed
for your disability claim page.
</p>
<p>
<va-link
external
href="https://www.va.gov/disability/how-to-file-claim/evidence-needed/"
text="Review the evidence requirements"
/>
</p>
</va-alert>
<va-process-list class="vads-u-padding-y--0">
{/* Prepare */}
<va-process-list-item>
Expand Down Expand Up @@ -242,23 +227,6 @@ class IntroductionPage extends React.Component {
</a>
.
</p>
{!show5103Updates() &&
!isBDDForm && (
<va-alert slim status="info" uswds>
<h4 className="vads-u-font-size--h6">Disability ratings</h4>
<p>
For each disability, we assign a rating from 0% to 100%.
We base this rating on the evidence you turn in with your
claim. In some cases we may also ask you to have an exam
to help us rate your disability.
</p>
<p className="vads-u-margin-y--0">
Before filing a claim for increase, you might want to
check to see if you’re already receiving the maximum
disability rating for your condition.
</p>
</va-alert>
)}
</va-process-list-item>
<va-process-list-item>
{/* Apply */}
Expand Down Expand Up @@ -295,9 +263,7 @@ class IntroductionPage extends React.Component {
</va-process-list-item>
<va-process-list-item>
{/* Review */}
<h3 className="vads-u-padding-top--0">
{show5103Updates() ? 'Review' : 'VA review'}
</h3>
<h3 className="vads-u-padding-top--0">Review</h3>
<p
data-testid="process-step3-vareview"
className="vads-u-margin-top--2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import React from 'react';

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

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 preSubmitInfo from 'platform/forms/preSubmitInfo';
import { show5103Updates } from '../utils';

const body = (
<>
Expand Down Expand Up @@ -51,9 +49,6 @@ const plainBody =
'standard claim process.';

export default function getPreSubmitInfo() {
if (!show5103Updates()) {
return preSubmitInfo;
}
return {
statementOfTruth: {
body,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';

Check warning on line 1 in src/applications/disability-benefits/all-claims/content/supportingEvidenceOrientation.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 { isClaimingNew, isClaimingIncrease, show5103Updates } from '../utils';
import { isClaimingNew, isClaimingIncrease } from '../utils';

export const supportingEvidenceOrientation = ({ formData }) => {
return (
Expand All @@ -24,26 +24,24 @@ export const supportingEvidenceOrientation = ({ formData }) => {
You only need to submit new evidence that VA doesn’t already have.
</strong>
</p>
{show5103Updates() && (
<va-alert status="info">
<h2>Notice of evidence needed</h2>
<p>
We’re required by law to tell you what evidence you’ll need to
submit to support your disability claim.
</p>
<p>
You can review the evidence requirements on our evidence needed for
your disability claim page.
</p>
<p>
<va-link
external
href="https://www.va.gov/disability/how-to-file-claim/evidence-needed/"
text="Review the evidence requirements"
/>
</p>
</va-alert>
)}
<va-alert status="info">
<h2>Notice of evidence needed</h2>
<p>
We’re required by law to tell you what evidence you’ll need to submit
to support your disability claim.
</p>
<p>
You can review the evidence requirements on our evidence needed for
your disability claim page.
</p>
<p>
<va-link
external
href="https://www.va.gov/disability/how-to-file-claim/evidence-needed/"
text="Review the evidence requirements"
/>
</p>
</va-alert>
</div>
);
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { render } from '@testing-library/react';

Check warning on line 1 in src/applications/disability-benefits/all-claims/tests/content/supportingEvidenceOrientation.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 { supportingEvidenceOrientation } from '../../content/supportingEvidenceOrientation';
import { show5103Updates } from '../../utils';

describe('supportingEvidenceOrientation', () => {
it('should render evidence needed info alert', () => {
Expand All @@ -13,11 +12,7 @@ describe('supportingEvidenceOrientation', () => {
};

const { queryByText } = render(supportingEvidenceOrientation({ formData }));
if (show5103Updates()) {
expect(queryByText('Notice of evidence needed')).to.exist;
} else {
expect(queryByText('Notice of evidence needed')).to.not.exist;
}
expect(queryByText('Notice of evidence needed')).to.exist;
});

it('renders increase message when claiming only an increase', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,15 @@ export const reviewAndSubmitPageFlow = (
? `${first} ${middle} ${last}`
: `${first} ${last}`;

cy.fillVaTextInput('veteran-signature', veteranSignature);
cy.selectVaCheckbox('veteran-certify', true);
cy.get('#veteran-signature')
.shadow()
.get('#inputField')
.type(veteranSignature);

cy.get(`va-checkbox[id="veteran-certify"]`)
.shadow()
.find('input')
.click({ force: true });
cy.findByText(submitButtonText, {
selector: 'button',
}).click();
Expand Down Expand Up @@ -348,15 +355,11 @@ export const pageHooks = cy => ({
}
});
},
// TODO: https://github.com/department-of-veterans-affairs/va.gov-team/issues/96383
// on local env's, environment.getRawBuildtype() for cypress returns prod but the local instance
// running the app returns local. leaving this snippet for now in case anyone wants to run e2e
// locally. this will be uncommented for launch.
// 'review-and-submit': ({ afterHook }) => {
// afterHook(() => {
// cy.get('@testData').then(() => {
// reviewAndSubmitPageFlow();
// });
// });
// },
'review-and-submit': ({ afterHook }) => {
afterHook(() => {
cy.get('@testData').then(() => {
reviewAndSubmitPageFlow();
});
});
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import moment from 'moment';
import * as Sentry from '@sentry/browser';
import { createSelector } from 'reselect';
import fastLevenshtein from 'fast-levenshtein';
import environment from '@department-of-veterans-affairs/platform-utilities/environment';
import { apiRequest } from 'platform/utilities/api';
import _ from 'platform/utilities/data';
import { toggleValues } from '@department-of-veterans-affairs/platform-site-wide/selectors';
Expand Down Expand Up @@ -866,11 +865,3 @@ export const formatFullName = (fullName = {}) => {

return res.trim();
};

/**
* Uses an environment check to determine if changes should be visible. For now it
* should display on staging or below environments
* @returns true if the updates should be used, false otherwise
*/
export const show5103Updates = () =>
environment.isDev() || environment.isLocalhost() || environment.isStaging();

0 comments on commit d2a0020

Please sign in to comment.