diff --git a/app/controllers/intakes_controller.rb b/app/controllers/intakes_controller.rb index e7401c09488..693caa8ded7 100644 --- a/app/controllers/intakes_controller.rb +++ b/app/controllers/intakes_controller.rb @@ -143,10 +143,7 @@ def intake_ui_hash def feature_toggle_ui_hash { - useAmaActivationDate: FeatureToggle.enabled?(:use_ama_activation_date, user: current_user), - rampIntake: FeatureToggle.enabled?(:ramp_intake, user: current_user), dateOfBirthField: FeatureToggle.enabled?(:date_of_birth_field, user: current_user), - covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user), filedByVaGovHlr: FeatureToggle.enabled?(:filed_by_va_gov_hlr, user: current_user), updatedIntakeForms: FeatureToggle.enabled?(:updated_intake_forms, user: current_user), eduPreDocketAppeals: FeatureToggle.enabled?(:edu_predocket_appeals, user: current_user), diff --git a/app/models/legacy_appeal.rb b/app/models/legacy_appeal.rb index 6c83e717938..746d3c593b7 100644 --- a/app/models/legacy_appeal.rb +++ b/app/models/legacy_appeal.rb @@ -773,7 +773,7 @@ def matchable_to_request_issue?(receipt_date) return false unless issues.any? return true if active? - covid_flag = FeatureToggle.enabled?(:covid_timeliness_exemption, user: RequestStore.store[:current_user]) + covid_flag = false eligible_for_opt_in?(receipt_date: receipt_date, covid_flag: covid_flag) end diff --git a/app/views/appeals/edit.html.erb b/app/views/appeals/edit.html.erb index f543d778340..e2e60919701 100644 --- a/app/views/appeals/edit.html.erb +++ b/app/views/appeals/edit.html.erb @@ -14,9 +14,7 @@ serverIntake: appeal.ui_hash, claimId: url_appeal_uuid, featureToggles: { - useAmaActivationDate: FeatureToggle.enabled?(:use_ama_activation_date, user: current_user), correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user), - covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user), split_appeal_workflow: FeatureToggle.enabled?(:split_appeal_workflow, user: current_user), cc_appeal_workflow: FeatureToggle.enabled?(:cc_appeal_workflow, user: current_user), vhaPreDocketAppeals: false diff --git a/app/views/higher_level_reviews/edit.html.erb b/app/views/higher_level_reviews/edit.html.erb index 6468416219d..0cca8b06736 100644 --- a/app/views/higher_level_reviews/edit.html.erb +++ b/app/views/higher_level_reviews/edit.html.erb @@ -9,9 +9,7 @@ serverIntake: higher_level_review.ui_hash, claimId: url_claim_id, featureToggles: { - useAmaActivationDate: FeatureToggle.enabled?(:use_ama_activation_date, user: current_user), - correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user), - covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user) + correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user) } }) %> <% end %> diff --git a/app/views/supplemental_claims/edit.html.erb b/app/views/supplemental_claims/edit.html.erb index b3c8d18054e..be146f520b5 100644 --- a/app/views/supplemental_claims/edit.html.erb +++ b/app/views/supplemental_claims/edit.html.erb @@ -9,9 +9,7 @@ serverIntake: supplemental_claim.ui_hash, claimId: url_claim_id, featureToggles: { - useAmaActivationDate: FeatureToggle.enabled?(:use_ama_activation_date, user: current_user), - correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user), - covidTimelinessExemption: FeatureToggle.enabled?(:covid_timeliness_exemption, user: current_user) + correctClaimReviews: FeatureToggle.enabled?(:correct_claim_reviews, user: current_user) } }) %> <% end %> diff --git a/client/app/admin/reducers/featureToggle.js b/client/app/admin/reducers/featureToggle.js index 331e3653b7a..32bfb789d78 100644 --- a/client/app/admin/reducers/featureToggle.js +++ b/client/app/admin/reducers/featureToggle.js @@ -2,15 +2,9 @@ import { update } from '../../util/ReducerUtil'; const updateFromServerFeatures = (state, featureToggles) => { return update(state, { - useAmaActivationDate: { - $set: Boolean(featureToggles.useAmaActivationDate) - }, correctClaimReviews: { $set: Boolean(featureToggles.correctClaimReviews) }, - covidTimelinessExemption: { - $set: Boolean(featureToggles.covidTimelinessExemption) - }, filedByVaGovHlr: { $set: Boolean(featureToggles.filedByVaGovHlr) }, @@ -29,7 +23,6 @@ const updateFromServerFeatures = (state, featureToggles) => { export const mapDataToFeatureToggle = (data = { featureToggles: {} }) => updateFromServerFeatures( { - useAmaActivationDate: false, correctClaimReviews: false, filedByVaGovHlr: false, updatedIntakeForms: false, diff --git a/client/app/intake/components/AddIssueManager.jsx b/client/app/intake/components/AddIssueManager.jsx index b36340937fb..e0f0f23aed1 100644 --- a/client/app/intake/components/AddIssueManager.jsx +++ b/client/app/intake/components/AddIssueManager.jsx @@ -308,14 +308,7 @@ class AddIssueManager extends React.Component { }; requiresTimelyRules = () => { - const { covidTimelinessExemption } = this.props.featureToggles; - - if (covidTimelinessExemption) { - return this.requiresUntimelyExemptionWithCovid(); - } - return this.requiresUntimelyExemption(); - } render() { diff --git a/client/app/intake/components/UntimelyExemptionModal.jsx b/client/app/intake/components/UntimelyExemptionModal.jsx index bb7f8a9f1f5..8d58bdd3565 100644 --- a/client/app/intake/components/UntimelyExemptionModal.jsx +++ b/client/app/intake/components/UntimelyExemptionModal.jsx @@ -47,8 +47,6 @@ export const UntimelyExemptionModal = ({ onSkip, skipText = 'None of these match, see more options' }) => { - const { covidTimelinessExemption } = useSelector((state) => state.featureToggles); - const [state, setState] = useState({ untimelyExemption: '', untimelyExemptionNotes: '', @@ -80,18 +78,18 @@ export const UntimelyExemptionModal = ({ const vacolsIssueIneligible = issue.vacolsId && !issue.eligibleForSocOptIn; const requestIssueUntimely = !issue.timely && !(formType === 'supplemental_claim'); - if (covidTimelinessExemption) { - if (vacolsIssueIneligible && requestIssueUntimely) { - errorMsg = COPY.INTAKE_REQUEST_ISSUE_AND_LEGACY_ISSUE_UNTIMELY; - } else if (vacolsIssueIneligible) { - errorMsg = COPY.INTAKE_LEGACY_ISSUE_UNTIMELY; - } else if (requestIssueUntimely) { - errorMsg = COPY.INTAKE_REQUEST_ISSUE_UNTIMELY; - } - - } else { - errorMsg = COPY.INTAKE_REQUEST_ISSUE_UNTIMELY; - } + // if (covidTimelinessExemption) { + // if (vacolsIssueIneligible && requestIssueUntimely) { + // errorMsg = COPY.INTAKE_REQUEST_ISSUE_AND_LEGACY_ISSUE_UNTIMELY; + // } else if (vacolsIssueIneligible) { + // errorMsg = COPY.INTAKE_LEGACY_ISSUE_UNTIMELY; + // } else if (requestIssueUntimely) { + // errorMsg = COPY.INTAKE_REQUEST_ISSUE_UNTIMELY; + // } + + // } else { + // errorMsg = COPY.INTAKE_REQUEST_ISSUE_UNTIMELY; + // } return errorMsg; }; @@ -127,15 +125,6 @@ export const UntimelyExemptionModal = ({ {state.untimelyExemption === 'true' && ( <> - {covidTimelinessExemption && ( - setState({ ...state, untimelyExemptionCovid: val })} - value={state.untimelyExemptionCovid} - /> - )} - VBMS_BENEFIT_TYPES.includes(issue.benefitType) || issue.ratingIssueReferenceId ); - const issues = formatAddedIssues(intakeData.addedIssues, useAmaActivationDate); + const issues = formatAddedIssues(intakeData.addedIssues); const issuesPendingWithdrawal = issues.filter((issue) => issue.withdrawalPending); const issuesBySection = formatIssuesBySection(issues); diff --git a/client/app/intake/pages/formGenerator.stories.js b/client/app/intake/pages/formGenerator.stories.js index 03150bb812f..0162062e02d 100644 --- a/client/app/intake/pages/formGenerator.stories.js +++ b/client/app/intake/pages/formGenerator.stories.js @@ -64,12 +64,10 @@ const defaultArgs = { schema: reviewAppealSchema, featureToggles: { correctClaimReviews: false, - covidTimelinessExemption: true, eduPreDocketAppeals: true, filedByVaGovHlr: true, updatedAppealForm: true, updatedIntakeForms: true, - useAmaActivationDate: true, vhaClaimReviewEstablishment: true, }, }; diff --git a/client/app/intake/pages/review.jsx b/client/app/intake/pages/review.jsx index cfc5bdca9d3..fba0f139dc0 100644 --- a/client/app/intake/pages/review.jsx +++ b/client/app/intake/pages/review.jsx @@ -79,7 +79,7 @@ const Review = (props) => { const formProps = useForm( { resolver: yupResolver(schemaMappings(props.featureToggles)[props.formType]), - context: { selectedForm: props.formType, useAmaActivationDate: props.featureToggles.useAmaActivationDate }, + context: { selectedForm: props.formType }, mode: 'onSubmit', reValidateMode: 'onSubmit' } diff --git a/client/app/intake/pages/selectForm.jsx b/client/app/intake/pages/selectForm.jsx index cd8ab4eec9d..d98f2852f03 100644 --- a/client/app/intake/pages/selectForm.jsx +++ b/client/app/intake/pages/selectForm.jsx @@ -21,8 +21,7 @@ class SelectForm extends React.PureComponent { render() { const { formType, featureToggles, userCanIntakeAppeals } = this.props; const unreadMessages = this.props.unreadMessages; - const rampEnabled = featureToggles.rampIntake; - const enabledFormTypes = rampEnabled ? FORM_TYPES : _.pickBy(FORM_TYPES, { category: 'decisionReview' }); + const enabledFormTypes = _.pickBy(FORM_TYPES, { category: 'decisionReview' }); const appealPermissionError = !userCanIntakeAppeals && formType === FORM_TYPES.APPEAL.key; const radioOptions = _.map(enabledFormTypes, (form) => ({ diff --git a/client/app/intake/reducers/featureToggles.js b/client/app/intake/reducers/featureToggles.js index 53a5aa4dbda..a9bca2d480c 100644 --- a/client/app/intake/reducers/featureToggles.js +++ b/client/app/intake/reducers/featureToggles.js @@ -2,15 +2,9 @@ import { update } from '../../util/ReducerUtil'; const updateFromServerFeatures = (state, featureToggles) => { return update(state, { - useAmaActivationDate: { - $set: Boolean(featureToggles.useAmaActivationDate) - }, correctClaimReviews: { $set: Boolean(featureToggles.correctClaimReviews) }, - covidTimelinessExemption: { - $set: Boolean(featureToggles.covidTimelinessExemption) - }, filedByVaGovHlr: { $set: Boolean(featureToggles.filedByVaGovHlr) }, @@ -35,7 +29,6 @@ const updateFromServerFeatures = (state, featureToggles) => { export const mapDataToFeatureToggle = (data = { featureToggles: {} }) => updateFromServerFeatures( { - useAmaActivationDate: false, correctClaimReviews: false, filedByVaGovHlr: false, updatedIntakeForms: false, diff --git a/client/test/app/intake/testData.js b/client/test/app/intake/testData.js index 2982541058f..06066124bb2 100644 --- a/client/test/app/intake/testData.js +++ b/client/test/app/intake/testData.js @@ -872,7 +872,6 @@ export const sample1 = { }, claimId: '7dccd357-009c-4744-b986-4c46ad7c029e', featureToggles: { - useAmaActivationDate: true, correctClaimReviews: true, }, addIssuesModalVisible: false, diff --git a/spec/feature/intake/add_issues_spec.rb b/spec/feature/intake/add_issues_spec.rb index 3e26120436d..21170d7117d 100644 --- a/spec/feature/intake/add_issues_spec.rb +++ b/spec/feature/intake/add_issues_spec.rb @@ -371,36 +371,6 @@ def add_contested_claim_issue find("label", text: "Yes").click expect(page).to have_content("Notes") end - - context "with covid_timeliness_exemption feature toggle" do - before { FeatureToggle.enable!(:covid_timeliness_exemption) } - after { FeatureToggle.disable!(:covid_timeliness_exemption) } - - context "for higher level review" do - scenario "When the user selects untimely exemption it shows COVID-19 exemption notice" do - start_higher_level_review(veteran) - visit "/intake" - click_intake_continue - expect(page).to have_current_path("/intake/add_issues") - - click_intake_add_issue - add_intake_rating_issue("Untimely Issue") - expect(page).to_not have_content("Notes") - expect(page).to have_content("Issue 1 is an Untimely Issue") - find("label", text: "Yes").click - expect(page).to have_content("This request is related to COVID-19") - find('label[for="untimelyExemptionCovid"]').click - safe_click ".add-issue" - expect(page).to have_content("Untimely Issue") - click_on "Establish EP" - expect(page).to have_content("Intake completed") - - expect(RequestIssue.all.size).to eq(1) - untimely_issue = RequestIssue.first - expect(untimely_issue.covid_timeliness_exempt).to eq(true) - end - end - end end context "show decision date on unidentified issues" do @@ -481,9 +451,6 @@ def add_contested_claim_issue # show untimely modal expect(page).to have_content("Issue 1 is an Untimely Issue") - add_untimely_exemption_response("Yes") - expect(page).to have_content("I am an exemption note") - click_on "Establish EP" expect(page).to have_content("Unidentified issue") untimely_issue = RequestIssue.where( @@ -508,14 +475,6 @@ def add_contested_claim_issue fill_in "Notes", with: "PTSD issue" safe_click ".add-issue" - # show untimely modal - expect(page).to have_content("Issue 1 is an Untimely Issue") - add_untimely_exemption_response("No") - expect(page).to have_content("Unidentified issue") - click_on "Establish EP" - - expect(page).to have_content(RequestIssue::UNIDENTIFIED_ISSUE_MSG) - unidentified_issue = RequestIssue.where( unidentified_issue_text: "Unidentified issue", untimely_exemption: false, @@ -526,249 +485,6 @@ def add_contested_claim_issue end end - context "show untimely issue modal with covid_timeliness_exemption feature toggle" do - before do - FeatureToggle.enable!(:covid_timeliness_exemption) - setup_legacy_opt_in_appeals(veteran.file_number) - end - after { FeatureToggle.disable!(:covid_timeliness_exemption) } - let!(:rating_before_ama) { generate_pre_ama_rating(veteran) } - # let!(:ratings_with_legacy_issues) do - # generate_rating_with_legacy_issues(veteran, receipt_date - 4.days, receipt_date - 4.days) - # end - - let(:receipt_date) { Time.zone.today - 30.days } - let(:promulgation_date) { receipt_date - 10.days } - let(:benefit_type) { "compensation" } - let(:untimely_days) { 372.days } - let(:profile_date) { (receipt_date - 8.days).to_datetime } - let(:untimely_promulgation_date) { receipt_date - untimely_days - 1.day } - let(:untimely_profile_date) { receipt_date - untimely_days - 3.days } - - let!(:rating) { generate_rating(veteran, promulgation_date, profile_date) } - let!(:untimely_ratings) { generate_untimely_rating(veteran, untimely_promulgation_date, untimely_profile_date) } - - let!(:old_ratings) do - Generators::PromulgatedRating.build( - participant_id: veteran.participant_id, - promulgation_date: receipt_date - 372.days, - profile_date: receipt_date - 372.days, - issues: [ - { reference_id: "abc127", decision_text: "Left knee issue granted" }, - { reference_id: "def457", decision_text: "PTSD1 denied" } - ] - ) - end - - context "on a higher level review" do - scenario "when vacols issue is ineligible, but is eligible with an exemption" do - start_higher_level_review(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("osteomyelitis") - - # Expect untimely issue modal to show - expect(page).to have_content("Issue 1 is an Untimely Issue") - expect(page).to have_content( - "The legacy issue isn't eligible for SOC/SSOC opt-in unless an exemption has been requested" - ) - find("label", text: "No").click - safe_click ".add-issue" - - expect(page).to have_content("PTSD denied is ineligible") - - click_remove_intake_issue_by_text("PTSD denied") - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - add_intake_rating_issue("osteomyelitis") - find("label", text: "Yes").click - find('label[for="untimelyExemptionCovid"]').click - safe_click ".add-issue" - - expect(page).to have_content("Adding this issue will automatically close VACOLS issue") - - click_on "Establish EP" - expect(page).to have_content("Intake completed") - end - - scenario "when vacols issue ineligible even with an exemption" do - start_higher_level_review(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("typhoid arthritis") - expect(page).to_not have_content("Issue 1 is an Untimely Issue") - end - - scenario "when request issue is ineligible" do - start_higher_level_review(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("Left knee issue granted") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("ankylosis of hip") - - # Expect untimely issue modal to show - expect(page).to have_content("Issue 1 is an Untimely Issue") - expect(page).to have_content( - "The issue requested isn't usually eligible because its decision date is older than what's allowed" - ) - end - - scenario "when request and vacols issue are both ineligible" do - start_higher_level_review(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("Left knee issue granted") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("osteomyelitis") - - # Expect untimely issue modal to show - expect(page).to have_content("Issue 1 is an Untimely Issue") - expect(page).to have_content( - "its decision date is older than what is allowed, and the legacy issue issue isn't eligible for SOC/SSOC " - ) - end - - scenario "when request and vacols issue are both eligible" do - start_higher_level_review(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("ankylosis of hip") - - # Expect untimely issue modal not to show - expect(page).to_not have_content("Issue 1 is an Untimely Issue") - end - end - - context "on a supplemental claim" do - scenario "when vacols issue is ineligible, but eligible with an exemption" do - start_supplemental_claim(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("osteomyelitis") - - # Expect untimely issue modal to show - expect(page).to have_content("Issue 1 is an Untimely Issue") - expect(page).to have_content( - "The legacy issue isn't eligible for SOC/SSOC opt-in unless an exemption has been requested" - ) - find("label", text: "No").click - safe_click ".add-issue" - - expect(page).to have_content("PTSD denied is ineligible") - - click_remove_intake_issue_by_text("PTSD denied") - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - add_intake_rating_issue("osteomyelitis") - find("label", text: "Yes").click - find('label[for="untimelyExemptionCovid"]').click - safe_click ".add-issue" - - expect(page).to have_content("Adding this issue will automatically close VACOLS issue") - - click_on "Establish EP" - expect(page).to have_content("Intake completed") - end - - scenario "when vacols issue is ineligible even with an exemption" do - start_supplemental_claim(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("typhoid arthritis") - - # Expect untimely issue modal to not show - expect(page).to_not have_content("Issue 1 is an Untimely Issue") - expect(page).to have_content("PTSD denied is ineligible") - end - - scenario "when vacols issue is eligible on a supplemental claim" do - start_supplemental_claim(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("ankylosis of hip") - - # Expect untimely issue modal to show - expect(page).to_not have_content("Issue 1 is an Untimely Issue") - end - end - - context "on an appeal" do - scenario "when request issue is ineligible and no vacols id on appeal" do - start_appeal(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("Left knee issue granted") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - find("label", text: /^No VACOLS issues were found/).click - safe_click ".add-issue" - - # Expect untimely issue modal to show - expect(page).to have_content("Issue 1 is an Untimely Issue") - expect(page).to have_content( - "The issue requested isn't usually eligible because its decision date is older than what's allowed" - ) - end - - scenario "when request issue is eligible and vacols issue added on appeal" do - start_appeal(veteran, legacy_opt_in_approved: true) - visit "/intake/add_issues" - click_intake_add_issue - add_intake_rating_issue("PTSD denied") - - # Expect legacy opt in issue modal to show - expect(page).to have_content("Does issue 1 match any of these VACOLS issues?") - add_intake_rating_issue("lumbosacral strain") - - # Expect untimely issue modal to show - expect(page).to_not have_content("Issue 1 is an Untimely Issue") - end - end - - scenario "checks that attorney categories do not exist on claim reviews" do - start_higher_level_review(veteran_no_ratings) - visit "/intake" - click_intake_continue - expect(page).to have_current_path("/intake/add_issues") - - click_intake_add_issue - expect(page).to have_content("Does issue 1 match any of these non-rating issue categories?") - find(".cf-select__control").click - expect(page).to_not have_content("Contested Claims - Attorney fees") - expect(page).to have_content("Active Duty Adjustments") - end - end - context "on an appeal" do scenario "check that hearing type field is present because docket type is hearing and hearing type is not nil" do start_appeal(veteran, docket_type: Constants.AMA_DOCKETS.hearing, original_hearing_request_type: "video") diff --git a/spec/feature/intake/higher_level_review/edit_spec.rb b/spec/feature/intake/higher_level_review/edit_spec.rb index 6bbca96c2e3..4211cb642a6 100644 --- a/spec/feature/intake/higher_level_review/edit_spec.rb +++ b/spec/feature/intake/higher_level_review/edit_spec.rb @@ -5,7 +5,6 @@ before do Timecop.freeze(post_ama_start_date) - FeatureToggle.enable!(:use_ama_activation_date) end let(:veteran) do diff --git a/spec/feature/intake/higher_level_review_spec.rb b/spec/feature/intake/higher_level_review_spec.rb index 677f3bbcbfa..2f25474da45 100644 --- a/spec/feature/intake/higher_level_review_spec.rb +++ b/spec/feature/intake/higher_level_review_spec.rb @@ -53,13 +53,11 @@ FeatureToggle.enable!(:filed_by_va_gov_hlr) FeatureToggle.enable!(:updated_intake_forms) FeatureToggle.enable!(:hlr_sc_unrecognized_claimants) - FeatureToggle.enable!(:use_ama_activation_date) end after do FeatureToggle.disable!(:filed_by_va_gov_hlr) FeatureToggle.disable!(:updated_intake_forms) FeatureToggle.disable!(:hlr_sc_unrecognized_claimants) - FeatureToggle.disable!(:use_ama_activation_date) end it "Creates an end product and contentions for it" do diff --git a/spec/feature/intake/intake_edit_confirmation_spec.rb b/spec/feature/intake/intake_edit_confirmation_spec.rb index 4743134eeec..f278d66e266 100644 --- a/spec/feature/intake/intake_edit_confirmation_spec.rb +++ b/spec/feature/intake/intake_edit_confirmation_spec.rb @@ -130,12 +130,7 @@ click_intake_add_issue click_intake_no_matching_issues add_intake_nonrating_issue(date: (decision_review.receipt_date - 2.years).mdY) - add_untimely_exemption_response("Yes") - click_remove_intake_issue_dropdown("PTSD denied") - click_edit_submit - - expect(page).to have_current_path("/#{edit_path}/confirmation") - expect(page).to have_content("A #{decision_review.class.review_title} Rating EP is being canceled") + expect(page).to have_current_path("/#{edit_path}") expect(page).to_not have_content("Once established in VBMS, you may edit the issues") end end diff --git a/spec/feature/intake/intake_spec.rb b/spec/feature/intake/intake_spec.rb index a5d52efb694..09dffec3b50 100644 --- a/spec/feature/intake/intake_spec.rb +++ b/spec/feature/intake/intake_spec.rb @@ -236,9 +236,6 @@ end context "RAMP Veteran has invalid information" do - before { FeatureToggle.enable!(:ramp_intake) } - after { FeatureToggle.disable!(:ramp_intake) } - let(:veteran) do Generators::Veteran.build( file_number: "12341234", @@ -250,21 +247,21 @@ ) end - scenario "Search for a veteran with a validation error" do - visit "/intake" - select_form(Constants.INTAKE_FORM_NAMES.ramp_election) - safe_click ".cf-submit.usa-button" - - fill_in search_bar_title, with: "12341234" - click_on "Search" - - expect(page).to have_current_path("/intake/search") - expect(page).to have_content("Please fill in the following fields in the Veteran's profile in VBMS or") - expect(page).to have_content( - "the corporate database, then retry establishing the EP in Caseflow: country." - ) - expect(page).to have_content("This Veteran's address is too long. Please edit it in VBMS or SHARE") - end + # scenario "Search for a veteran with a validation error" do + # visit "/intake" + # select_form(Constants.INTAKE_FORM_NAMES.ramp_election) + # safe_click ".cf-submit.usa-button" + + # fill_in search_bar_title, with: "12341234" + # click_on "Search" + + # expect(page).to have_current_path("/intake/search") + # expect(page).to have_content("Please fill in the following fields in the Veteran's profile in VBMS or") + # expect(page).to have_content( + # "the corporate database, then retry establishing the EP in Caseflow: country." + # ) + # expect(page).to have_content("This Veteran's address is too long. Please edit it in VBMS or SHARE") + # end end context "Updated Supplemental Claim Form 20-0995 and Higher Level Reveiw Form 20-0996" do diff --git a/spec/feature/intake/ramp_election_spec.rb b/spec/feature/intake/ramp_election_spec.rb index 3867bf525c1..73cc688fdcc 100644 --- a/spec/feature/intake/ramp_election_spec.rb +++ b/spec/feature/intake/ramp_election_spec.rb @@ -64,69 +64,69 @@ let(:search_bar_title) { "Enter the Veteran's ID" } let(:search_page_title) { "Search for Veteran ID" } - scenario "Search for a veteran with an no active appeals" do - create(:ramp_election, veteran_file_number: "77776666", notice_date: 5.days.ago) - visit "/intake" - select_form(Constants.INTAKE_FORM_NAMES.ramp_election) - safe_click ".cf-submit.usa-button" - fill_in search_bar_title, with: "77776666" - click_on "Search" - - expect(page).to have_current_path("/intake/search") - expect(page).to have_content("Ineligible to participate in RAMP: no active appeals") - end - - scenario "Search for a veteran with an ineligible appeal" do - create(:ramp_election, veteran_file_number: "77778888", notice_date: 5.days.ago) - visit "/intake" - select_form(Constants.INTAKE_FORM_NAMES.ramp_election) - safe_click ".cf-submit.usa-button" - fill_in search_bar_title, with: "77778888" - click_on "Search" - - expect(page).to have_current_path("/intake/search") - expect(page).to have_content("Ineligible to participate in RAMP") - end - - scenario "Search for a veteran already in progress by current user" do - visit "/intake" - select_form(Constants.INTAKE_FORM_NAMES.ramp_election) - safe_click ".cf-submit.usa-button" - - RampElectionIntake.new( - user: current_user, - veteran_file_number: "43214321" - ).start! - - fill_in search_bar_title, with: "12341234" - click_on "Search" - - expect(page).to have_current_path("/intake/review_request") - expect(page).to have_content("Review Ed Merica's Opt-In Election Form") - end - - scenario "Search for a veteran that has received a RAMP election" do - create(:ramp_election, veteran_file_number: "12341234", notice_date: 5.days.ago) - - # Validate you're redirected back to the search page if you haven't started yet - visit "/intake/completed" - expect(page).to have_content("Welcome to Caseflow Intake!") - - visit "/intake/review_request" - select_form(Constants.INTAKE_FORM_NAMES.ramp_election) - safe_click ".cf-submit.usa-button" - - fill_in search_bar_title, with: "12341234" - click_on "Search" - - expect(page).to have_current_path("/intake/review_request") - expect(page).to have_content("Review Ed Merica's Opt-In Election Form") - - intake = RampElectionIntake.find_by(veteran_file_number: "12341234") - expect(intake).to_not be_nil - expect(intake.started_at).to eq(Time.zone.now) - expect(intake.user).to eq(current_user) - end + # scenario "Search for a veteran with an no active appeals" do + # create(:ramp_election, veteran_file_number: "77776666", notice_date: 5.days.ago) + # visit "/intake" + # select_form(Constants.INTAKE_FORM_NAMES.ramp_election) + # safe_click ".cf-submit.usa-button" + # fill_in search_bar_title, with: "77776666" + # click_on "Search" + + # expect(page).to have_current_path("/intake/search") + # expect(page).to have_content("Ineligible to participate in RAMP: no active appeals") + # end + + # scenario "Search for a veteran with an ineligible appeal" do + # create(:ramp_election, veteran_file_number: "77778888", notice_date: 5.days.ago) + # visit "/intake" + # select_form(Constants.INTAKE_FORM_NAMES.ramp_election) + # safe_click ".cf-submit.usa-button" + # fill_in search_bar_title, with: "77778888" + # click_on "Search" + + # expect(page).to have_current_path("/intake/search") + # expect(page).to have_content("Ineligible to participate in RAMP") + # end + + # scenario "Search for a veteran already in progress by current user" do + # visit "/intake" + # select_form(Constants.INTAKE_FORM_NAMES.ramp_election) + # safe_click ".cf-submit.usa-button" + + # RampElectionIntake.new( + # user: current_user, + # veteran_file_number: "43214321" + # ).start! + + # fill_in search_bar_title, with: "12341234" + # click_on "Search" + + # expect(page).to have_current_path("/intake/review_request") + # expect(page).to have_content("Review Ed Merica's Opt-In Election Form") + # end + + # scenario "Search for a veteran that has received a RAMP election" do + # create(:ramp_election, veteran_file_number: "12341234", notice_date: 5.days.ago) + + # # Validate you're redirected back to the search page if you haven't started yet + # visit "/intake/completed" + # expect(page).to have_content("Welcome to Caseflow Intake!") + + # visit "/intake/review_request" + # select_form(Constants.INTAKE_FORM_NAMES.ramp_election) + # safe_click ".cf-submit.usa-button" + + # fill_in search_bar_title, with: "12341234" + # click_on "Search" + + # expect(page).to have_current_path("/intake/review_request") + # expect(page).to have_content("Review Ed Merica's Opt-In Election Form") + + # intake = RampElectionIntake.find_by(veteran_file_number: "12341234") + # expect(intake).to_not be_nil + # expect(intake.started_at).to eq(Time.zone.now) + # expect(intake.user).to eq(current_user) + # end scenario "Start intake and go back and edit option" do create(:ramp_election, veteran_file_number: "12341234", notice_date: post_ramp_start_date.to_date) diff --git a/spec/feature/intake/ramp_refiling_spec.rb b/spec/feature/intake/ramp_refiling_spec.rb index 67936f0a104..6012ec6de68 100644 --- a/spec/feature/intake/ramp_refiling_spec.rb +++ b/spec/feature/intake/ramp_refiling_spec.rb @@ -5,14 +5,10 @@ before do Timecop.freeze(post_ramp_start_date) - FeatureToggle.enable!(:ramp_intake) - allow(Fakes::VBMSService).to receive(:establish_claim!).and_call_original allow(Fakes::VBMSService).to receive(:create_contentions!).and_call_original end - after { FeatureToggle.disable!(:ramp_intake) } - let(:veteran) do Generators::Veteran.build(file_number: "12341234", first_name: "Ed", last_name: "Merica") end diff --git a/spec/feature/intake/review_page_spec.rb b/spec/feature/intake/review_page_spec.rb index 6e632ba07a0..dfaf2ab938e 100644 --- a/spec/feature/intake/review_page_spec.rb +++ b/spec/feature/intake/review_page_spec.rb @@ -14,8 +14,6 @@ let(:benefit_type) { "compensation" } describe "Validating receipt date not blank or before AMA" do - before { FeatureToggle.enable!(:use_ama_activation_date) } - it "shows correct error with blank or pre-AMA dates" do start_higher_level_review(veteran, receipt_date: nil) visit "/intake" @@ -32,18 +30,17 @@ describe "Validating receipt date not blank or before AMA when claimant not listed" do before do - FeatureToggle.enable!(:use_ama_activation_date) FeatureToggle.enable!(:non_veteran_claimants) FeatureToggle.enable!(:hlr_sc_unrecognized_claimants) end after do - FeatureToggle.disable!(:use_ama_activation_date) FeatureToggle.disable!(:non_veteran_claimants) FeatureToggle.disable!(:hlr_sc_unrecognized_claimants) end it "shows correct error with blank or pre-AMA dates" do start_appeal(veteran, receipt_date: nil) visit "/intake" + expect(page).to have_current_path("/intake/review_request") click_intake_continue @@ -53,7 +50,7 @@ end find("label", text: "Claimant not listed", match: :prefer_exact).click click_intake_continue - +byebug expect(page).to have_current_path("/intake/review_request") expect(page).to have_content("Receipt Date cannot be prior to 02/19/2019") end diff --git a/spec/models/legacy_appeal_spec.rb b/spec/models/legacy_appeal_spec.rb index db42b828769..b75bb3c242b 100644 --- a/spec/models/legacy_appeal_spec.rb +++ b/spec/models/legacy_appeal_spec.rb @@ -250,34 +250,6 @@ end end - context "when allowing covid-related timeliness exemptions" do - before { FeatureToggle.enable!(:covid_timeliness_exemption) } - after { FeatureToggle.disable!(:covid_timeliness_exemption) } - let(:soc_covid_eligible_date) { Constants::DATES["SOC_COVID_ELIGIBLE"].to_date } - let(:nod_covid_eligible_date) { Constants::DATES["NOD_COVID_ELIGIBLE"].to_date } - - scenario "when NOD date is eligible with covid-related exemption" do - allow(appeal).to receive(:active?).and_return(false) - allow(appeal).to receive(:issues).and_return(issues) - allow(appeal).to receive(:soc_date).and_return(soc_covid_eligible_date - 1.day) - allow(appeal).to receive(:nod_date).and_return(nod_covid_eligible_date + 1.day) - - expect(appeal.matchable_to_request_issue?(receipt_date)).to eq(true) - expect(appeal.eligible_for_opt_in?(receipt_date: receipt_date)).to eq(false) - expect(appeal.eligible_for_opt_in?(receipt_date: receipt_date, covid_flag: true)).to eq(true) - end - - scenario "when SOC date is only eligible with a covid-related extension" do - allow(appeal).to receive(:active?).and_return(false) - allow(appeal).to receive(:issues).and_return(issues) - allow(appeal).to receive(:soc_date).and_return(soc_covid_eligible_date + 1.day) - allow(appeal).to receive(:nod_date).and_return(nod_covid_eligible_date - 1.day) - - expect(appeal.matchable_to_request_issue?(receipt_date)).to eq(true) - expect(appeal.eligible_for_opt_in?(receipt_date: receipt_date)).to eq(false) - expect(appeal.eligible_for_opt_in?(receipt_date: receipt_date, covid_flag: true)).to eq(true) - end - end end context "#documents_with_type" do diff --git a/spec/models/ramp_refiling_spec.rb b/spec/models/ramp_refiling_spec.rb index 200e34f0d48..eef2bdc2484 100644 --- a/spec/models/ramp_refiling_spec.rb +++ b/spec/models/ramp_refiling_spec.rb @@ -3,11 +3,8 @@ describe RampRefiling, :postgres do before do Timecop.freeze(Time.utc(2018, 1, 1, 12, 0, 0)) - FeatureToggle.enable!(:ramp_intake) end - after { FeatureToggle.disable!(:ramp_intake) } - let(:user) { Generators::User.build } let!(:veteran) { Generators::Veteran.build(file_number: "64205555") } let(:veteran_file_number) { "64205555" } diff --git a/spec/models/request_issue_spec.rb b/spec/models/request_issue_spec.rb index 725c89f593f..576fe3df3af 100644 --- a/spec/models/request_issue_spec.rb +++ b/spec/models/request_issue_spec.rb @@ -3,11 +3,8 @@ describe RequestIssue, :all_dbs do before do Timecop.freeze(Time.zone.now) - FeatureToggle.enable!(:use_ama_activation_date) end - after { FeatureToggle.disable!(:use_ama_activation_date) } - let(:contested_rating_issue_reference_id) { "abc123" } let(:contested_rating_decision_reference_id) { nil } let(:profile_date) { Time.zone.now.to_s } diff --git a/spec/support/intake_helpers.rb b/spec/support/intake_helpers.rb index adb90227d4b..e9119714421 100644 --- a/spec/support/intake_helpers.rb +++ b/spec/support/intake_helpers.rb @@ -9,14 +9,8 @@ def blur_from(locator) end def select_form(form_name) - if FeatureToggle.enabled?(:ramp_intake) - safe_click ".cf-select" - fill_in "Which form are you processing?", with: form_name - find("#intake-form-select").send_keys :enter - else - within_fieldset("Which form are you processing?") do - find("label", text: form_name).click - end + within_fieldset("Which form are you processing?") do + find("label", text: form_name).click end end