From d2a0020862c4198bfb358bdcc430bb2f90050f6e Mon Sep 17 00:00:00 2001 From: Christine <127446042+christinec-fftc@users.noreply.github.com> Date: Thu, 16 Jan 2025 13:50:51 -0800 Subject: [PATCH] 96383 remove environment checks for for prod launch and update e2e tests --- .../components/IntroductionPage.jsx | 76 +++++-------------- .../all-claims/content/preSubmitInfo.js | 5 -- .../content/supportingEvidenceOrientation.jsx | 40 +++++----- ...upportingEvidenceOrientation.unit.spec.jsx | 7 +- .../all-claims/tests/cypress.helpers.js | 29 +++---- .../all-claims/utils/index.jsx | 9 --- 6 files changed, 57 insertions(+), 109 deletions(-) diff --git a/src/applications/disability-benefits/all-claims/components/IntroductionPage.jsx b/src/applications/disability-benefits/all-claims/components/IntroductionPage.jsx index bdb73bf4ee22..b34417ab51c8 100644 --- a/src/applications/disability-benefits/all-claims/components/IntroductionPage.jsx +++ b/src/applications/disability-benefits/all-claims/components/IntroductionPage.jsx @@ -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, @@ -94,12 +88,7 @@ class IntroductionPage extends React.Component { )} {itfNotice} -

- {subwayTitle} -

+

{subwayTitle}

{loggedIn && (

@@ -118,28 +107,24 @@ class IntroductionPage extends React.Component { .

)} - {show5103Updates() && ( - -

- Notice of evidence needed -

-

- We’re required by law to tell you what evidence you’ll need to - submit to support your disability claim. -

-

- You can review the evidence requirements on our evidence needed - for your disability claim page. -

-

- -

-
- )} + +

Notice of evidence needed

+

+ We’re required by law to tell you what evidence you’ll need to + submit to support your disability claim. +

+

+ You can review the evidence requirements on our evidence needed + for your disability claim page. +

+

+ +

+
{/* Prepare */} @@ -242,23 +227,6 @@ class IntroductionPage extends React.Component { .

- {!show5103Updates() && - !isBDDForm && ( - -

Disability ratings

-

- 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. -

-

- 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. -

-
- )}
{/* Apply */} @@ -295,9 +263,7 @@ class IntroductionPage extends React.Component { {/* Review */} -

- {show5103Updates() ? 'Review' : 'VA review'} -

+

Review

@@ -51,9 +49,6 @@ const plainBody = 'standard claim process.'; export default function getPreSubmitInfo() { - if (!show5103Updates()) { - return preSubmitInfo; - } return { statementOfTruth: { body, diff --git a/src/applications/disability-benefits/all-claims/content/supportingEvidenceOrientation.jsx b/src/applications/disability-benefits/all-claims/content/supportingEvidenceOrientation.jsx index f5ea976ca341..c89d3455e4ee 100644 --- a/src/applications/disability-benefits/all-claims/content/supportingEvidenceOrientation.jsx +++ b/src/applications/disability-benefits/all-claims/content/supportingEvidenceOrientation.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { isClaimingNew, isClaimingIncrease, show5103Updates } from '../utils'; +import { isClaimingNew, isClaimingIncrease } from '../utils'; export const supportingEvidenceOrientation = ({ formData }) => { return ( @@ -24,26 +24,24 @@ export const supportingEvidenceOrientation = ({ formData }) => { You only need to submit new evidence that VA doesn’t already have.

- {show5103Updates() && ( - -

Notice of evidence needed

-

- We’re required by law to tell you what evidence you’ll need to - submit to support your disability claim. -

-

- You can review the evidence requirements on our evidence needed for - your disability claim page. -

-

- -

-
- )} + +

Notice of evidence needed

+

+ We’re required by law to tell you what evidence you’ll need to submit + to support your disability claim. +

+

+ You can review the evidence requirements on our evidence needed for + your disability claim page. +

+

+ +

+
); }; diff --git a/src/applications/disability-benefits/all-claims/tests/content/supportingEvidenceOrientation.unit.spec.jsx b/src/applications/disability-benefits/all-claims/tests/content/supportingEvidenceOrientation.unit.spec.jsx index 7ffafd8cb3ee..c2edb6fc1a44 100644 --- a/src/applications/disability-benefits/all-claims/tests/content/supportingEvidenceOrientation.unit.spec.jsx +++ b/src/applications/disability-benefits/all-claims/tests/content/supportingEvidenceOrientation.unit.spec.jsx @@ -1,7 +1,6 @@ import { render } from '@testing-library/react'; import { expect } from 'chai'; import { supportingEvidenceOrientation } from '../../content/supportingEvidenceOrientation'; -import { show5103Updates } from '../../utils'; describe('supportingEvidenceOrientation', () => { it('should render evidence needed info alert', () => { @@ -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', () => { diff --git a/src/applications/disability-benefits/all-claims/tests/cypress.helpers.js b/src/applications/disability-benefits/all-claims/tests/cypress.helpers.js index 4284394291bd..7e7d30c8a804 100644 --- a/src/applications/disability-benefits/all-claims/tests/cypress.helpers.js +++ b/src/applications/disability-benefits/all-claims/tests/cypress.helpers.js @@ -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(); @@ -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(); + }); + }); + }, }); diff --git a/src/applications/disability-benefits/all-claims/utils/index.jsx b/src/applications/disability-benefits/all-claims/utils/index.jsx index 93204dba2903..42ee25afc4a7 100644 --- a/src/applications/disability-benefits/all-claims/utils/index.jsx +++ b/src/applications/disability-benefits/all-claims/utils/index.jsx @@ -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'; @@ -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();