diff --git a/src/applications/disability-benefits/686c-674-v2/README.md b/src/applications/686c-674/README.md similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/README.md rename to src/applications/686c-674/README.md diff --git a/src/applications/disability-benefits/686c-674-v2/actions/index.js b/src/applications/686c-674/actions/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/actions/index.js rename to src/applications/686c-674/actions/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/analytics/helpers.js b/src/applications/686c-674/analytics/helpers.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/analytics/helpers.js rename to src/applications/686c-674/analytics/helpers.js diff --git a/src/applications/disability-benefits/686c-674-v2/app-entry.jsx b/src/applications/686c-674/app-entry.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/app-entry.jsx rename to src/applications/686c-674/app-entry.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/components/AdditionalEvidence.jsx b/src/applications/686c-674/components/AdditionalEvidence.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/components/AdditionalEvidence.jsx rename to src/applications/686c-674/components/AdditionalEvidence.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/components/CustomPreSubmitInfo.js b/src/applications/686c-674/components/CustomPreSubmitInfo.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/components/CustomPreSubmitInfo.js rename to src/applications/686c-674/components/CustomPreSubmitInfo.js diff --git a/src/applications/disability-benefits/686c-674-v2/components/CustomReviewFields.jsx b/src/applications/686c-674/components/CustomReviewFields.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/components/CustomReviewFields.jsx rename to src/applications/686c-674/components/CustomReviewFields.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/components/GetFormHelp.jsx b/src/applications/686c-674/components/GetFormHelp.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/components/GetFormHelp.jsx rename to src/applications/686c-674/components/GetFormHelp.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/components/IntroductionPageFormProcess.jsx b/src/applications/686c-674/components/IntroductionPageFormProcess.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/components/IntroductionPageFormProcess.jsx rename to src/applications/686c-674/components/IntroductionPageFormProcess.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/components/IntroductionPageHeader.jsx b/src/applications/686c-674/components/IntroductionPageHeader.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/components/IntroductionPageHeader.jsx rename to src/applications/686c-674/components/IntroductionPageHeader.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/674/addStudentsArrayPages.js b/src/applications/686c-674/config/chapters/674/addStudentsArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/674/addStudentsArrayPages.js rename to src/applications/686c-674/config/chapters/674/addStudentsArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/674/helpers.jsx b/src/applications/686c-674/config/chapters/674/helpers.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/674/helpers.jsx rename to src/applications/686c-674/config/chapters/674/helpers.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/helpers.js b/src/applications/686c-674/config/chapters/household-income/helpers.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/helpers.js rename to src/applications/686c-674/config/chapters/household-income/helpers.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/householdIncome.js b/src/applications/686c-674/config/chapters/household-income/householdIncome.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/householdIncome.js rename to src/applications/686c-674/config/chapters/household-income/householdIncome.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/index.js b/src/applications/686c-674/config/chapters/household-income/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/household-income/index.js rename to src/applications/686c-674/config/chapters/household-income/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/add-spouse-additional-evidence/spouseAdditionalEvidence.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/add-spouse-additional-evidence/spouseAdditionalEvidence.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/add-spouse-additional-evidence/spouseAdditionalEvidence.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/add-spouse-additional-evidence/spouseAdditionalEvidence.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformation.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformation.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformation.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformation.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFive.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFour.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFour.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFour.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartFour.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartThree.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartThree.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartThree.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartThree.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartTwo.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartTwo.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartTwo.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/currentMarriageInformationPartTwo.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/helpers.jsx b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/helpers.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-marriage-information/helpers.jsx rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-marriage-information/helpers.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-spouse-marriage-history-details/additionalQuestionsView.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/current-spouse-marriage-history-details/additionalQuestionsView.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/current-spouse-marriage-history-details/additionalQuestionsView.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/current-spouse-marriage-history-details/additionalQuestionsView.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/does-live-with-spouse/doesLiveWithSpouse.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/does-live-with-spouse/doesLiveWithSpouse.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/does-live-with-spouse/doesLiveWithSpouse.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/does-live-with-spouse/doesLiveWithSpouse.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/index.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/index.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouse-information/spouseInformation.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/spouse-information/spouseInformation.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouse-information/spouseInformation.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/spouse-information/spouseInformation.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartThree.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartThree.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartThree.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartThree.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartTwo.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartTwo.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartTwo.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/spouse-information/spouseInformationPartTwo.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/veteran-marriage-history-details/veteranAdditionalQuestionsView.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/veteran-marriage-history-details/veteranAdditionalQuestionsView.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/veteran-marriage-history-details/veteranAdditionalQuestionsView.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/veteran-marriage-history-details/veteranAdditionalQuestionsView.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js b/src/applications/686c-674/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js rename to src/applications/686c-674/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/additionalInformationPartOne.js b/src/applications/686c-674/config/chapters/report-add-child/additionalInformationPartOne.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/additionalInformationPartOne.js rename to src/applications/686c-674/config/chapters/report-add-child/additionalInformationPartOne.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/additionalInformationPartTwo.js b/src/applications/686c-674/config/chapters/report-add-child/additionalInformationPartTwo.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/additionalInformationPartTwo.js rename to src/applications/686c-674/config/chapters/report-add-child/additionalInformationPartTwo.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/childAddressPartOne.js b/src/applications/686c-674/config/chapters/report-add-child/childAddressPartOne.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/childAddressPartOne.js rename to src/applications/686c-674/config/chapters/report-add-child/childAddressPartOne.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/childAddressPartTwo.js b/src/applications/686c-674/config/chapters/report-add-child/childAddressPartTwo.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/childAddressPartTwo.js rename to src/applications/686c-674/config/chapters/report-add-child/childAddressPartTwo.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/config.js b/src/applications/686c-674/config/chapters/report-add-child/config.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/config.js rename to src/applications/686c-674/config/chapters/report-add-child/config.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/identification.js b/src/applications/686c-674/config/chapters/report-add-child/identification.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/identification.js rename to src/applications/686c-674/config/chapters/report-add-child/identification.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/index.js b/src/applications/686c-674/config/chapters/report-add-child/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/index.js rename to src/applications/686c-674/config/chapters/report-add-child/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/information.js b/src/applications/686c-674/config/chapters/report-add-child/information.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/information.js rename to src/applications/686c-674/config/chapters/report-add-child/information.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/intro.js b/src/applications/686c-674/config/chapters/report-add-child/intro.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/intro.js rename to src/applications/686c-674/config/chapters/report-add-child/intro.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/placeOfBirth.js b/src/applications/686c-674/config/chapters/report-add-child/placeOfBirth.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/placeOfBirth.js rename to src/applications/686c-674/config/chapters/report-add-child/placeOfBirth.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/relationship.js b/src/applications/686c-674/config/chapters/report-add-child/relationship.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/relationship.js rename to src/applications/686c-674/config/chapters/report-add-child/relationship.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/stepchild.js b/src/applications/686c-674/config/chapters/report-add-child/stepchild.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/stepchild.js rename to src/applications/686c-674/config/chapters/report-add-child/stepchild.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/summary.js b/src/applications/686c-674/config/chapters/report-add-child/summary.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-add-child/summary.js rename to src/applications/686c-674/config/chapters/report-add-child/summary.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.js b/src/applications/686c-674/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.js rename to src/applications/686c-674/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-dependent-death/deceasedDependentArrayPages.js b/src/applications/686c-674/config/chapters/report-dependent-death/deceasedDependentArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-dependent-death/deceasedDependentArrayPages.js rename to src/applications/686c-674/config/chapters/report-dependent-death/deceasedDependentArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-dependent-death/helpers.js b/src/applications/686c-674/config/chapters/report-dependent-death/helpers.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-dependent-death/helpers.js rename to src/applications/686c-674/config/chapters/report-dependent-death/helpers.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/former-spouse-information/formerSpouseInformation.js b/src/applications/686c-674/config/chapters/report-divorce/former-spouse-information/formerSpouseInformation.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/former-spouse-information/formerSpouseInformation.js rename to src/applications/686c-674/config/chapters/report-divorce/former-spouse-information/formerSpouseInformation.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartThree.js b/src/applications/686c-674/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartThree.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartThree.js rename to src/applications/686c-674/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartThree.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartTwo.js b/src/applications/686c-674/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartTwo.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartTwo.js rename to src/applications/686c-674/config/chapters/report-divorce/former-spouse-information/formerSpouseInformationPartTwo.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/index.js b/src/applications/686c-674/config/chapters/report-divorce/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-divorce/index.js rename to src/applications/686c-674/config/chapters/report-divorce/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.js b/src/applications/686c-674/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.js rename to src/applications/686c-674/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js b/src/applications/686c-674/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js rename to src/applications/686c-674/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/index.js b/src/applications/686c-674/config/chapters/taskWizard/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/index.js rename to src/applications/686c-674/config/chapters/taskWizard/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/addDependentOptions.js b/src/applications/686c-674/config/chapters/taskWizard/wizard/addDependentOptions.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/addDependentOptions.js rename to src/applications/686c-674/config/chapters/taskWizard/wizard/addDependentOptions.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/addOrRemoveDependents.js b/src/applications/686c-674/config/chapters/taskWizard/wizard/addOrRemoveDependents.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/addOrRemoveDependents.js rename to src/applications/686c-674/config/chapters/taskWizard/wizard/addOrRemoveDependents.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/helpers.jsx b/src/applications/686c-674/config/chapters/taskWizard/wizard/helpers.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/helpers.jsx rename to src/applications/686c-674/config/chapters/taskWizard/wizard/helpers.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/removeDependentOptions.js b/src/applications/686c-674/config/chapters/taskWizard/wizard/removeDependentOptions.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/taskWizard/wizard/removeDependentOptions.js rename to src/applications/686c-674/config/chapters/taskWizard/wizard/removeDependentOptions.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/index.js b/src/applications/686c-674/config/chapters/veteran-information/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/index.js rename to src/applications/686c-674/config/chapters/veteran-information/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-address/veteran-address.js b/src/applications/686c-674/config/chapters/veteran-information/veteran-address/veteran-address.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-address/veteran-address.js rename to src/applications/686c-674/config/chapters/veteran-information/veteran-address/veteran-address.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-contact-information.js b/src/applications/686c-674/config/chapters/veteran-information/veteran-contact-information.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-contact-information.js rename to src/applications/686c-674/config/chapters/veteran-information/veteran-contact-information.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx b/src/applications/686c-674/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx rename to src/applications/686c-674/config/chapters/veteran-information/veteran-information/VeteranInformationComponent.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/veteran-information.js b/src/applications/686c-674/config/chapters/veteran-information/veteran-information/veteran-information.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/chapters/veteran-information/veteran-information/veteran-information.js rename to src/applications/686c-674/config/chapters/veteran-information/veteran-information/veteran-information.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/constants.js b/src/applications/686c-674/config/constants.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/constants.js rename to src/applications/686c-674/config/constants.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/form.js b/src/applications/686c-674/config/form.js similarity index 99% rename from src/applications/disability-benefits/686c-674-v2/config/form.js rename to src/applications/686c-674/config/form.js index 90e53556b71b..505fb92a846a 100644 --- a/src/applications/disability-benefits/686c-674-v2/config/form.js +++ b/src/applications/686c-674/config/form.js @@ -185,8 +185,6 @@ export const formConfig = { path: 'options-selection', uiSchema: addOrRemoveDependents.uiSchema, schema: addOrRemoveDependents.schema, - depends: () => - !window.location.pathname.includes('review-and-submit'), }, addDependentOptions: { hideHeaderRow: true, @@ -194,9 +192,7 @@ export const formConfig = { path: 'options-selection/add-dependents', uiSchema: addDependentOptions.uiSchema, schema: addDependentOptions.schema, - depends: form => - form?.['view:addOrRemoveDependents']?.add && - !window.location.pathname.includes('review-and-submit'), + depends: form => form?.['view:addOrRemoveDependents']?.add, }, removeDependentOptions: { hideHeaderRow: true, @@ -204,9 +200,7 @@ export const formConfig = { path: 'options-selection/remove-dependents', uiSchema: removeDependentOptions.uiSchema, schema: removeDependentOptions.schema, - depends: form => - form?.['view:addOrRemoveDependents']?.remove && - !window.location.pathname.includes('review-and-submit'), + depends: form => form?.['view:addOrRemoveDependents']?.remove, }, }, }, diff --git a/src/applications/disability-benefits/686c-674-v2/config/helpers.js b/src/applications/686c-674/config/helpers.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/helpers.js rename to src/applications/686c-674/config/helpers.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/location-schema.js b/src/applications/686c-674/config/location-schema.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/location-schema.js rename to src/applications/686c-674/config/location-schema.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/prefill-transformer.js b/src/applications/686c-674/config/prefill-transformer.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/prefill-transformer.js rename to src/applications/686c-674/config/prefill-transformer.js diff --git a/src/applications/disability-benefits/686c-674-v2/config/utilities.js b/src/applications/686c-674/config/utilities.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/config/utilities.js rename to src/applications/686c-674/config/utilities.js diff --git a/src/applications/disability-benefits/686c-674-v2/containers/App.jsx b/src/applications/686c-674/containers/App.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/containers/App.jsx rename to src/applications/686c-674/containers/App.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/containers/ConfirmationPage.jsx b/src/applications/686c-674/containers/ConfirmationPage.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/containers/ConfirmationPage.jsx rename to src/applications/686c-674/containers/ConfirmationPage.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/containers/IntroductionPage.jsx b/src/applications/686c-674/containers/IntroductionPage.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/containers/IntroductionPage.jsx rename to src/applications/686c-674/containers/IntroductionPage.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/documentation/674.md b/src/applications/686c-674/documentation/674.md similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/documentation/674.md rename to src/applications/686c-674/documentation/674.md diff --git a/src/applications/disability-benefits/686c-674-v2/documentation/686c.md b/src/applications/686c-674/documentation/686c.md similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/documentation/686c.md rename to src/applications/686c-674/documentation/686c.md diff --git a/src/applications/disability-benefits/686c-674-v2/manifest.json b/src/applications/686c-674/manifest.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/manifest.json rename to src/applications/686c-674/manifest.json diff --git a/src/applications/disability-benefits/686c-674-v2/reducers/index.js b/src/applications/686c-674/reducers/index.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/reducers/index.js rename to src/applications/686c-674/reducers/index.js diff --git a/src/applications/disability-benefits/686c-674-v2/routes.jsx b/src/applications/686c-674/routes.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/routes.jsx rename to src/applications/686c-674/routes.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/sass/new-686.scss b/src/applications/686c-674/sass/new-686.scss similarity index 89% rename from src/applications/disability-benefits/686c-674-v2/sass/new-686.scss rename to src/applications/686c-674/sass/new-686.scss index 7686cb314f85..af846ab346b4 100644 --- a/src/applications/disability-benefits/686c-674-v2/sass/new-686.scss +++ b/src/applications/686c-674/sass/new-686.scss @@ -1,10 +1,10 @@ @import "~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables"; @import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-process-list"; @import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-form-process"; -@import "../../../../platform/forms/sass/m-schemaform"; +@import "../../../platform/forms/sass/m-schemaform"; @import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-modal"; @import "~@department-of-veterans-affairs/css-library/dist/stylesheets/modules/m-omb-info"; -@import "../../../../platform/forms/sass/m-form-confirmation"; +@import "../../../platform/forms/sass/m-form-confirmation"; // a11y - Change gray box to white box with gray border. // Needed because when using a web component which diff --git a/src/applications/disability-benefits/686c-674-v2/tests/actions/index.unit.spec.js b/src/applications/686c-674/tests/actions/index.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/actions/index.unit.spec.js rename to src/applications/686c-674/tests/actions/index.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/components/CustomReviewFields.unit.spec.js b/src/applications/686c-674/tests/components/CustomReviewFields.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/components/CustomReviewFields.unit.spec.js rename to src/applications/686c-674/tests/components/CustomReviewFields.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/686taskWizard.unit.spec.jsx b/src/applications/686c-674/tests/config/686taskWizard.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/686taskWizard.unit.spec.jsx rename to src/applications/686c-674/tests/config/686taskWizard.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/currentMarriageInformation.unit.spec.jsx b/src/applications/686c-674/tests/config/chapters/report-add-a-spouse/currentMarriageInformation.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/currentMarriageInformation.unit.spec.jsx rename to src/applications/686c-674/tests/config/chapters/report-add-a-spouse/currentMarriageInformation.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/doesLiveWithSpouse.unit.spec.jsx b/src/applications/686c-674/tests/config/chapters/report-add-a-spouse/doesLiveWithSpouse.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/doesLiveWithSpouse.unit.spec.jsx rename to src/applications/686c-674/tests/config/chapters/report-add-a-spouse/doesLiveWithSpouse.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-a-spouse/spouseMarriageHistoryArrayPages.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/spouseNameInformation.unit.spec.jsx b/src/applications/686c-674/tests/config/chapters/report-add-a-spouse/spouseNameInformation.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/spouseNameInformation.unit.spec.jsx rename to src/applications/686c-674/tests/config/chapters/report-add-a-spouse/spouseNameInformation.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-a-spouse/veteranMarriageHistoryArrayPages.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/additionalInformationPartOne.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/additionalInformationPartOne.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/additionalInformationPartOne.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/additionalInformationPartOne.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/additionalInformationPartTwo.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/additionalInformationPartTwo.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/additionalInformationPartTwo.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/additionalInformationPartTwo.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/childAddressPartOne.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/childAddressPartOne.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/childAddressPartOne.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/childAddressPartOne.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/childAddressPartTwo.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/childAddressPartTwo.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/childAddressPartTwo.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/childAddressPartTwo.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/identification.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/identification.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/identification.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/identification.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/information.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/information.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/information.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/information.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/intro.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/intro.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/intro.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/intro.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/placeOfBirth.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/placeOfBirth.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/placeOfBirth.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/placeOfBirth.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/relationship.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/relationship.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/relationship.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/relationship.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/stepchild.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/stepchild.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/stepchild.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/stepchild.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/summary.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-add-child/summary.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-add-child/summary.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-add-child/summary.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-child-stopped-attending-school/removeChildStoppedAttendingSchoolArrayPages.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-dependent-death/deceasedDependentsArray.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-dependent-death/deceasedDependentsArray.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-dependent-death/deceasedDependentsArray.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-dependent-death/deceasedDependentsArray.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-divorce/formerSpouseInformation.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-divorce/formerSpouseInformation.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-divorce/formerSpouseInformation.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-divorce/formerSpouseInformation.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.unit.spec.js b/src/applications/686c-674/tests/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/report-marriage-of-child/removeMarriedChildArrayPages.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.unit.spec.js b/src/applications/686c-674/tests/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/stepchild-no-longer-part-of-household/removeChildHouseholdArrayPages.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/student-information/addStudentArrayPages.unit.spec.js b/src/applications/686c-674/tests/config/chapters/student-information/addStudentArrayPages.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/student-information/addStudentArrayPages.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/student-information/addStudentArrayPages.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/taskWizard/wizard/helpers.unit.spec.js b/src/applications/686c-674/tests/config/chapters/taskWizard/wizard/helpers.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/taskWizard/wizard/helpers.unit.spec.js rename to src/applications/686c-674/tests/config/chapters/taskWizard/wizard/helpers.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/veteran-information/veteranAddress.unit.spec.jsx b/src/applications/686c-674/tests/config/chapters/veteran-information/veteranAddress.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/veteran-information/veteranAddress.unit.spec.jsx rename to src/applications/686c-674/tests/config/chapters/veteran-information/veteranAddress.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/chapters/veteran-information/veteranInformation.unit.spec.jsx b/src/applications/686c-674/tests/config/chapters/veteran-information/veteranInformation.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/chapters/veteran-information/veteranInformation.unit.spec.jsx rename to src/applications/686c-674/tests/config/chapters/veteran-information/veteranInformation.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/helpers.unit.spec.js b/src/applications/686c-674/tests/config/helpers.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/helpers.unit.spec.js rename to src/applications/686c-674/tests/config/helpers.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/prefill-transformer.unit.spec.js b/src/applications/686c-674/tests/config/prefill-transformer.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/prefill-transformer.unit.spec.js rename to src/applications/686c-674/tests/config/prefill-transformer.unit.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/config/utilities.unit.spec.jsx b/src/applications/686c-674/tests/config/utilities.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/config/utilities.unit.spec.jsx rename to src/applications/686c-674/tests/config/utilities.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/containers/confirmationPage.unit.spec.jsx b/src/applications/686c-674/tests/containers/confirmationPage.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/containers/confirmationPage.unit.spec.jsx rename to src/applications/686c-674/tests/containers/confirmationPage.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/containers/introductionPage.unit.spec.jsx b/src/applications/686c-674/tests/containers/introductionPage.unit.spec.jsx similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/containers/introductionPage.unit.spec.jsx rename to src/applications/686c-674/tests/containers/introductionPage.unit.spec.jsx diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/686C-674-ancilliary.cypress.spec.js b/src/applications/686c-674/tests/e2e/686C-674-ancilliary.cypress.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/686C-674-ancilliary.cypress.spec.js rename to src/applications/686c-674/tests/e2e/686C-674-ancilliary.cypress.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/686C-674.cypress.spec.js b/src/applications/686c-674/tests/e2e/686C-674.cypress.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/686C-674.cypress.spec.js rename to src/applications/686c-674/tests/e2e/686C-674.cypress.spec.js diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/add-child-add-674.json b/src/applications/686c-674/tests/e2e/fixtures/add-child-add-674.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/add-child-add-674.json rename to src/applications/686c-674/tests/e2e/fixtures/add-child-add-674.json diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/add-child-report-divorce.json b/src/applications/686c-674/tests/e2e/fixtures/add-child-report-divorce.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/add-child-report-divorce.json rename to src/applications/686c-674/tests/e2e/fixtures/add-child-report-divorce.json diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/ancilliary-flows.json b/src/applications/686c-674/tests/e2e/fixtures/ancilliary-flows.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/ancilliary-flows.json rename to src/applications/686c-674/tests/e2e/fixtures/ancilliary-flows.json diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/spouse-child-all-fields.json b/src/applications/686c-674/tests/e2e/fixtures/spouse-child-all-fields.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/spouse-child-all-fields.json rename to src/applications/686c-674/tests/e2e/fixtures/spouse-child-all-fields.json diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/spouse-report-divorce.json b/src/applications/686c-674/tests/e2e/fixtures/spouse-report-divorce.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/spouse-report-divorce.json rename to src/applications/686c-674/tests/e2e/fixtures/spouse-report-divorce.json diff --git a/src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/va-file-number.json b/src/applications/686c-674/tests/e2e/fixtures/va-file-number.json similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/e2e/fixtures/va-file-number.json rename to src/applications/686c-674/tests/e2e/fixtures/va-file-number.json diff --git a/src/applications/disability-benefits/686c-674-v2/tests/reducers/index.unit.spec.js b/src/applications/686c-674/tests/reducers/index.unit.spec.js similarity index 100% rename from src/applications/disability-benefits/686c-674-v2/tests/reducers/index.unit.spec.js rename to src/applications/686c-674/tests/reducers/index.unit.spec.js diff --git a/src/applications/edu-benefits/10215/config/form.js b/src/applications/edu-benefits/10215/config/form.js index dd8209d2558a..beb310342e23 100644 --- a/src/applications/edu-benefits/10215/config/form.js +++ b/src/applications/edu-benefits/10215/config/form.js @@ -16,7 +16,7 @@ import { ProgramSummary, } from '../pages'; -const arrayBuilderOptions = { +export const arrayBuilderOptions = { arrayPath: 'programs', nounSingular: 'program', nounPlural: 'programs', diff --git a/src/applications/edu-benefits/10215/config/transform.js b/src/applications/edu-benefits/10215/config/transform.js index 3134d0c64786..f09453e03384 100644 --- a/src/applications/edu-benefits/10215/config/transform.js +++ b/src/applications/edu-benefits/10215/config/transform.js @@ -7,12 +7,13 @@ export default function transform(formConfig, form) { // // Include total enrolled FTE And supported student percentage FTE if 10+ supported students enrolled // - formData.data.programs = formData.data.programs.map(program => { + formData.data.programs = formData.data?.programs?.map(program => { const programWithCalcs = program; if (!Number(program.supportedStudents) < 10 && program.fte) { - const { total, supportedFTEPercent } = getFTECalcs(program); - programWithCalcs.fte.totalFTE = total; - programWithCalcs.fte.supportedPercentageFTE = supportedFTEPercent; + const fteCalcs = getFTECalcs(program); + programWithCalcs.fte.totalFTE = fteCalcs?.total; + programWithCalcs.fte.supportedPercentageFTE = + fteCalcs?.supportedFTEPercent; } return programWithCalcs; }); diff --git a/src/applications/edu-benefits/10215/pages/index.js b/src/applications/edu-benefits/10215/pages/index.js index 860e5e3f6018..19e894694a93 100644 --- a/src/applications/edu-benefits/10215/pages/index.js +++ b/src/applications/edu-benefits/10215/pages/index.js @@ -1,6 +1,12 @@ import * as institutionDetails from './institutionDetails'; import { ProgramIntro } from './program-intro'; import { programInfo } from './program-info'; -import { ProgramSummary } from './program-summary'; +import { ProgramSummary, arrayBuilderOptions } from './program-summary'; -export { institutionDetails, ProgramIntro, programInfo, ProgramSummary }; +export { + institutionDetails, + ProgramIntro, + programInfo, + ProgramSummary, + arrayBuilderOptions, +}; diff --git a/src/applications/edu-benefits/10215/pages/program-summary.js b/src/applications/edu-benefits/10215/pages/program-summary.js index 29162c3f5145..676218068f88 100644 --- a/src/applications/edu-benefits/10215/pages/program-summary.js +++ b/src/applications/edu-benefits/10215/pages/program-summary.js @@ -3,7 +3,7 @@ import { arrayBuilderYesNoUI, } from '~/platform/forms-system/src/js/web-component-patterns'; -const arrayBuilderOptions = { +export const arrayBuilderOptions = { arrayPath: 'programs', nounSingular: 'program', nounPlural: 'programs', diff --git a/src/applications/edu-benefits/10215/tests/config/form.unit.spec.js b/src/applications/edu-benefits/10215/tests/config/form.unit.spec.js new file mode 100644 index 000000000000..629cd656397e --- /dev/null +++ b/src/applications/edu-benefits/10215/tests/config/form.unit.spec.js @@ -0,0 +1,42 @@ +import { expect } from 'chai'; +import sinon from 'sinon'; +import { render } from '@testing-library/react'; +import formConfig, { arrayBuilderOptions } from '../../config/form'; +import manifest from '../../manifest.json'; + +describe('22-10215 Form Config', () => { + it('should render', () => { + expect(formConfig).to.be.an('object'); + }); + it('should have a required properties', () => { + expect(formConfig.rootUrl).to.contain(manifest.rootUrl); + expect(formConfig.title).to.contain('Report 85/15 Rule enrollment ratio'); + const { getByText } = render(formConfig.subTitle()); // Render the subTitle component + expect( + getByText( + 'Statement of Assurance of Compliance with 85% Enrollment Ratios (VA Form 22-10215)', + ), + ).of.exist; + expect(formConfig).to.have.property('chapters'); + }); + it('should return the correct item name', () => { + const item = { programName: 'Test Program' }; + expect(arrayBuilderOptions.text.getItemName(item)).to.equal('Test Program'); + }); + + it('should return the correct card description', () => { + const item = { + programName: 'Test Program', + supportedFTEPercent: 50, + }; + const mockGetFTECalcs = sinon.stub().returns({ supportedFTEPercent: 50 }); + global.getFTECalcs = mockGetFTECalcs; + const description = arrayBuilderOptions.text.cardDescription(item); + expect(description).to.not.equal('50 supported student FTE'); + + mockGetFTECalcs.returns({ supportedFTEPercent: null }); + expect(arrayBuilderOptions.text.cardDescription(item)).to.be.null; + + delete global.getFTECalcs; + }); +}); diff --git a/src/applications/edu-benefits/10215/tests/config/transform.unit.spec.js b/src/applications/edu-benefits/10215/tests/config/transform.unit.spec.js new file mode 100644 index 000000000000..39f248dd6628 --- /dev/null +++ b/src/applications/edu-benefits/10215/tests/config/transform.unit.spec.js @@ -0,0 +1,58 @@ +import { expect } from 'chai'; +import sinon from 'sinon'; +import * as helpers from '../../helpers'; +import transform from '../../config/transform'; + +describe('transform utility function', () => { + let formConfig; + let form; + let getFTECalcsStub; + + beforeEach(() => { + formConfig = {}; + form = { + data: { + programs: [ + { + programName: 'Program A', + supportedStudents: '10', + fte: { + totalFTE: 0, + supportedPercentageFTE: 0, + }, + }, + { + programName: 'Program B', + supportedStudents: '9', + fte: { + totalFTE: 0, + supportedPercentageFTE: 0, + }, + }, + ], + }, + }; + getFTECalcsStub = sinon.stub(helpers, 'getFTECalcs'); + }); + + afterEach(() => { + getFTECalcsStub.restore(); + }); + it('should not modify FTE fields if the program has fewer than 10 supported students', () => { + form.data.programs = [ + { + programName: 'Program C', + supportedStudents: '8', + fte: { + totalFTE: 0, + supportedPercentageFTE: 0, + }, + }, + ]; + + const resultString = transform(formConfig, form); + const resultObject = JSON.parse(resultString); + expect(resultObject.educationBenefitsClaim).to.exist; + expect(resultObject.educationBenefitsClaim.form).to.exist; + }); +}); diff --git a/src/applications/edu-benefits/10215/tests/form.unit.spec.jsx b/src/applications/edu-benefits/10215/tests/form.unit.spec.jsx index f27ad5882daa..7c35fa338d9a 100644 --- a/src/applications/edu-benefits/10215/tests/form.unit.spec.jsx +++ b/src/applications/edu-benefits/10215/tests/form.unit.spec.jsx @@ -16,6 +16,4 @@ describe('22-10215 - Form Config', () => { expect(formConfig).to.have.property('submit'); expect(formConfig).to.have.property('saveInProgress'); }); - - // Introduction and Get Help components to be added }); diff --git a/src/applications/edu-benefits/10215/tests/helper.unit.spec.js b/src/applications/edu-benefits/10215/tests/helper.unit.spec.js new file mode 100644 index 000000000000..ff37873554eb --- /dev/null +++ b/src/applications/edu-benefits/10215/tests/helper.unit.spec.js @@ -0,0 +1,60 @@ +// src/applications/edu-benefits/10215/helpers.test.js +import { expect } from 'chai'; +import { getFTECalcs } from '../helpers'; + +describe('getFTECalcs', () => { + it('should return correct FTE calculations for supported and non-supported values', () => { + const program = { fte: { supported: 5, nonSupported: 15 } }; + const result = getFTECalcs(program); + expect(result).to.deep.equal({ + supported: 5, + nonSupported: 15, + total: 20, + supportedFTEPercent: '25%', + }); + }); + + it('should handle zero supported and non-supported values', () => { + const program = { fte: { supported: 0, nonSupported: 0 } }; + const result = getFTECalcs(program); + expect(result).to.deep.equal({ + supported: 0, + nonSupported: 0, + total: 0, + supportedFTEPercent: null, + }); + }); + + it('should handle only supported values', () => { + const program = { fte: { supported: 10, nonSupported: 0 } }; + const result = getFTECalcs(program); + expect(result).to.deep.equal({ + supported: 10, + nonSupported: 0, + total: 10, + supportedFTEPercent: '100%', + }); + }); + + it('should handle only non-supported values', () => { + const program = { fte: { supported: 0, nonSupported: 10 } }; + const result = getFTECalcs(program); + expect(result).to.deep.equal({ + supported: 0, + nonSupported: 10, + total: 10, + supportedFTEPercent: null, + }); + }); + + it('should return null for supportedFTEPercent when total is NaN', () => { + const program = { fte: { supported: null, nonSupported: null } }; + const result = getFTECalcs(program); + expect(result).to.deep.equal({ + supported: 0, + nonSupported: 0, + total: 0, + supportedFTEPercent: null, + }); + }); +}); diff --git a/src/applications/edu-benefits/10215/tests/pages/calcs.unit.spec.js b/src/applications/edu-benefits/10215/tests/pages/calcs.unit.spec.js new file mode 100644 index 000000000000..f837cf73031a --- /dev/null +++ b/src/applications/edu-benefits/10215/tests/pages/calcs.unit.spec.js @@ -0,0 +1,81 @@ +// src/applications/edu-benefits/10215/pages/calcs.test.js +import React from 'react'; +import { mount } from 'enzyme'; +import { expect } from 'chai'; +import { Provider } from 'react-redux'; +import configureStore from 'redux-mock-store'; +import Calcs from '../../pages/calcs'; + +const mockStore = configureStore(); + +describe('', () => { + const mockData = { + programs: [ + { + supported: true, + nonSupported: false, + total: 10, + supportedFTEPercent: 100, + }, + ], + }; + + it('should render correctly with given props', () => { + const store = mockStore({ form: { data: mockData } }); + const wrapper = mount( + + + , + ); + + expect( + wrapper + .find('label') + .at(0) + .text(), + ).to.equal('Total Enrolled FTE'); + expect( + wrapper + .find('span') + .at(0) + .text(), + ).to.equal('--'); + expect( + wrapper + .find('label') + .at(1) + .text(), + ).to.equal('Supported student percentage FTE'); + expect( + wrapper + .find('span') + .at(1) + .text(), + ).to.equal('--%'); + wrapper.unmount(); + }); + + it('should render "--" when no data is available', () => { + const emptyData = { programs: [] }; + const store = mockStore({ form: { data: emptyData } }); + const wrapper = mount( + + + , + ); + + expect( + wrapper + .find('span') + .at(0) + .text(), + ).to.equal('--'); + expect( + wrapper + .find('span') + .at(1) + .text(), + ).to.equal('--%'); + wrapper.unmount(); + }); +}); diff --git a/src/applications/edu-benefits/10215/tests/pages/program-info.unit.spec.js b/src/applications/edu-benefits/10215/tests/pages/program-info.unit.spec.js new file mode 100644 index 000000000000..53c4d4336eec --- /dev/null +++ b/src/applications/edu-benefits/10215/tests/pages/program-info.unit.spec.js @@ -0,0 +1,71 @@ +import { expect } from 'chai'; +import { programInfo } from '../../pages'; + +describe('programInfo configuration', () => { + describe('uiSchema', () => { + it('should have the expected top-level fields', () => { + const { uiSchema } = programInfo; + + expect(uiSchema).to.have.property('programName'); + expect(uiSchema).to.have.property('studentsEnrolled'); + expect(uiSchema).to.have.property('supportedStudents'); + expect(uiSchema).to.have.property('fte'); + expect(uiSchema).to.have.property('view:calcs'); + }); + + it('should have a valid ui:description in uiSchema', () => { + const description = programInfo.uiSchema['ui:description']; + expect(description).to.be.a('object'); + expect(description.props).to.have.property('href'); + expect(description.props).to.have.property('text'); + }); + + it('should require fte.supported and fte.nonSupported only when supportedStudents >= 10', () => { + const { uiSchema } = programInfo; + + // For "supported" + const supportedRequiredFn = uiSchema.fte.supported['ui:required']; + expect(supportedRequiredFn).to.be.a('function'); + + // For "nonSupported" + const nonSupportedRequiredFn = uiSchema.fte.nonSupported['ui:required']; + expect(nonSupportedRequiredFn).to.be.a('function'); + + let formData = { + programs: [{ supportedStudents: 15 }], + }; + expect(supportedRequiredFn(formData, 0)).to.equal(true); + expect(nonSupportedRequiredFn(formData, 0)).to.equal(true); + + // Scenario 2: supportedStudents is less than 10 + formData = { + programs: [{ supportedStudents: 9 }], + }; + expect(supportedRequiredFn(formData, 0)).to.equal(false); + expect(nonSupportedRequiredFn(formData, 0)).to.equal(false); + }); + }); + + describe('schema', () => { + it('should be an object schema with required fields', () => { + const { schema } = programInfo; + expect(schema).to.have.property('type', 'object'); + expect(schema).to.have.property('properties'); + expect(schema.properties).to.have.property('programName'); + expect(schema.properties).to.have.property('studentsEnrolled'); + expect(schema.properties).to.have.property('supportedStudents'); + expect(schema.properties).to.have.property('fte'); + expect(schema.properties).to.have.property('view:calcs'); + + // required fields + expect(schema) + .to.have.property('required') + .that.is.an('array'); + expect(schema.required).to.include.members([ + 'programName', + 'studentsEnrolled', + 'supportedStudents', + ]); + }); + }); +}); diff --git a/src/applications/edu-benefits/10215/tests/pages/program-summary.unit.spec.js b/src/applications/edu-benefits/10215/tests/pages/program-summary.unit.spec.js new file mode 100644 index 000000000000..909c4ac429c8 --- /dev/null +++ b/src/applications/edu-benefits/10215/tests/pages/program-summary.unit.spec.js @@ -0,0 +1,32 @@ +import React from 'react'; +import { expect } from 'chai'; +import { shallow } from 'enzyme'; +import { ProgramSummary, arrayBuilderOptions } from '../../pages'; + +const MockProgramSummary = () =>
; + +describe('ProgramSummary', () => { + it('should have the correct uiSchema', () => { + const wrapper = shallow(); + expect(ProgramSummary.uiSchema).to.have.property('view:programsSummary'); + const uiSchemaView = ProgramSummary.uiSchema['view:programsSummary']; + expect(uiSchemaView).to.have.property( + 'ui:title', + 'Do you have another program to add?', + ); + wrapper.unmount(); + }); + it('should have the correct schema', () => { + expect(ProgramSummary.schema).to.have.property('type', 'object'); + expect(ProgramSummary.schema).to.have.property('properties'); + expect(ProgramSummary.schema.properties).to.have.property( + 'view:programsSummary', + ); + }); + it('should return the correct item name from getItemName', () => { + const testItem = { programName: 'My Awesome Program' }; + const name = arrayBuilderOptions.text.getItemName(testItem); + + expect(name).to.equal('My Awesome Program'); + }); +}); diff --git a/src/applications/edu-benefits/10282/config/form.js b/src/applications/edu-benefits/10282/config/form.js index 9bc3eb885990..ac8e0153f0c7 100644 --- a/src/applications/edu-benefits/10282/config/form.js +++ b/src/applications/edu-benefits/10282/config/form.js @@ -1,6 +1,7 @@ import React from 'react'; import { VA_FORM_IDS } from 'platform/forms/constants'; import FormFooter from 'platform/forms/components/FormFooter'; +import environment from 'platform/utilities/environment'; import { fullNameNoSuffixUI, fullNameNoSuffixSchema, @@ -23,7 +24,7 @@ import { techIndustryFocusArea, } from '../pages'; import StatementOfTruth from '../components/StatementOfTruth'; -// import submitForm from './submitForm'; +import submitForm from './submitForm'; import { transform } from './submit-transformer'; import FormHelp from '../components/FormHelp'; import IntroductionPage from '../containers/IntroductionPage'; @@ -31,12 +32,8 @@ import IntroductionPage from '../containers/IntroductionPage'; const formConfig = { rootUrl: manifest.rootUrl, urlPrefix: '/', - // submitUrl: '/v0/api', - submit: async formData => { - return new Promise(resolve => { - resolve({ status: 201, data: formData }); - }); - }, + submitUrl: `${environment.API_URL}/v0/education_benefits_claims/10282`, + submit: submitForm, trackingPrefix: 'edu-10282-', introduction: IntroductionPage, confirmation: ConfirmationPage, diff --git a/src/applications/edu-benefits/10282/config/submit-transformer.js b/src/applications/edu-benefits/10282/config/submit-transformer.js index 47ddffc9dd75..ccee12d4a9a5 100644 --- a/src/applications/edu-benefits/10282/config/submit-transformer.js +++ b/src/applications/edu-benefits/10282/config/submit-transformer.js @@ -1,7 +1,12 @@ +import _ from 'lodash'; + export function transform(formConfig, form) { + const newForm = _.cloneDeep(form.data); + delete newForm.AGREED; + delete newForm.signature; return JSON.stringify({ educationBenefitsClaim: { - form: JSON.stringify(form.data), + form: JSON.stringify(newForm), }, }); } diff --git a/src/applications/edu-benefits/10282/tests/fixtures/data/transformedData.js b/src/applications/edu-benefits/10282/tests/fixtures/data/transformedData.js index 1f9520bd1c46..c66897c99037 100644 --- a/src/applications/edu-benefits/10282/tests/fixtures/data/transformedData.js +++ b/src/applications/edu-benefits/10282/tests/fixtures/data/transformedData.js @@ -10,8 +10,8 @@ const transformedMinimalDataActual = { last: 'Doe', }, highestLevelOfEducation: {}, - signature: 'Jane Doe', - AGREED: true, + // signature: 'Jane Doe', + // AGREED: true, }; export const transformedMinimalData = JSON.stringify({ diff --git a/src/applications/facility-locator/containers/FacilityDetail.jsx b/src/applications/facility-locator/containers/FacilityDetail.jsx index 7496f6b17022..055a6de6e526 100644 --- a/src/applications/facility-locator/containers/FacilityDetail.jsx +++ b/src/applications/facility-locator/containers/FacilityDetail.jsx @@ -111,7 +111,7 @@ class FacilityDetail extends Component { return (
-
+
{this.renderFacilityInfo()} diff --git a/src/applications/ivc-champva/10-7959f-2/components/PaymentSelection.jsx b/src/applications/ivc-champva/10-7959f-2/components/PaymentSelection.jsx index e67ca9f42b7a..1d9baec51f71 100644 --- a/src/applications/ivc-champva/10-7959f-2/components/PaymentSelection.jsx +++ b/src/applications/ivc-champva/10-7959f-2/components/PaymentSelection.jsx @@ -5,25 +5,6 @@ import { radioUI } from 'platform/forms-system/src/js/web-component-patterns/rad const PaymentSelectionUI = () => { return radioUI({ title: 'Tell us where to send the payment for this claim', - description: ( - <> -
    -
  • - Select Veteran if you’ve already paid this - provider. We’ll send a check to your mailing address to pay you back - (also called reimbursement). -
  • -
  • - Select Provider if you haven’t paid the provider. - We’ll send a check to the provider’s mailing address to pay them - directly. -
  • -
-

- Send payment to: -

- - ), labels: { Veteran: 'Veteran', Provider: 'Provider', diff --git a/src/applications/ivc-champva/10-7959f-2/config/form.js b/src/applications/ivc-champva/10-7959f-2/config/form.js index 372c3dcd5c38..6324a5b23cd7 100644 --- a/src/applications/ivc-champva/10-7959f-2/config/form.js +++ b/src/applications/ivc-champva/10-7959f-2/config/form.js @@ -1,6 +1,7 @@ import environment from '@department-of-veterans-affairs/platform-utilities/environment'; import { cloneDeep } from 'lodash'; import { externalServices } from 'platform/monitoring/DowntimeNotification'; +import React from 'react'; import { ssnOrVaFileNumberNoHintSchema, @@ -254,7 +255,23 @@ const formConfig = { path: 'payment-selection', title: 'Where to send the payment', uiSchema: { - ...titleUI('Where to send the payment'), + ...titleUI( + 'Where to send the payment', + <> +
    +
  • + Select Veteran if you’ve already paid this + provider. We’ll send a check to your mailing address to pay + you back (also called reimbursement). +
  • +
  • + Select Provider if you haven’t paid the + provider. We’ll send a check to the provider’s mailing + address to pay them directly. +
  • +
+ , + ), sendPayment: PaymentSelectionUI(), }, schema: { diff --git a/src/applications/mhv-medications/components/PrescriptionDetails/PrescriptionPrintOnly.jsx b/src/applications/mhv-medications/components/PrescriptionDetails/PrescriptionPrintOnly.jsx index ae19a7b98243..40b9143b6832 100644 --- a/src/applications/mhv-medications/components/PrescriptionDetails/PrescriptionPrintOnly.jsx +++ b/src/applications/mhv-medications/components/PrescriptionDetails/PrescriptionPrintOnly.jsx @@ -15,6 +15,7 @@ import VaPharmacyText from '../shared/VaPharmacyText'; const PrescriptionPrintOnly = props => { const { rx, hideLineBreak, refillHistory, isDetailsRx } = props; const pharmacyPhone = pharmacyPhoneNumber(rx); + const latestTrackingStatus = rx?.trackingList?.[0]; const activeNonVaContent = pres => (
@@ -87,7 +88,7 @@ const PrescriptionPrintOnly = props => {

Last filled on:{' '} - {dateFormat(rx.dispensedDate, 'MMMM D, YYYY')} + {dateFormat(rx.sortedDispensedDate, 'MMMM D, YYYY')}

Status:{' '} @@ -192,9 +193,7 @@ const PrescriptionPrintOnly = props => {

Shipped on:{' '} - {entry?.trackingList?.[0]?.completeDateTime - ? dateFormat(entry.trackingList[0].completeDateTime) - : EMPTY_FIELD} + {dateFormat(latestTrackingStatus?.completeDateTime)}

Medication description: diff --git a/src/applications/mhv-medications/util/pdfConfigs.js b/src/applications/mhv-medications/util/pdfConfigs.js index 0d51c720e3e5..6c2ffd9a59da 100644 --- a/src/applications/mhv-medications/util/pdfConfigs.js +++ b/src/applications/mhv-medications/util/pdfConfigs.js @@ -137,7 +137,7 @@ export const buildPrescriptionsPDFList = prescriptions => { items: [ { title: 'Last filled on', - value: dateFormat(rx.dispensedDate, 'MMMM D, YYYY'), + value: dateFormat(rx.sortedDispensedDate, 'MMMM D, YYYY'), inline: true, }, { @@ -497,9 +497,9 @@ ${backImprint ? `* Back marking: ${backImprint}` : ''}` }, { title: `Shipped on`, - value: entry?.trackingList?.[0]?.completeDateTime - ? dateFormat(entry.trackingList[0].completeDateTime) - : 'None noted', + value: dateFormat( + prescription?.trackingList?.[0]?.completeDateTime, + ), inline: true, }, ]; diff --git a/src/applications/mhv-medications/util/txtConfigs.js b/src/applications/mhv-medications/util/txtConfigs.js index 922e41dbc0a7..94b08916d552 100644 --- a/src/applications/mhv-medications/util/txtConfigs.js +++ b/src/applications/mhv-medications/util/txtConfigs.js @@ -77,7 +77,7 @@ export const buildPrescriptionsTXT = prescriptions => { result += ` ${rx.prescriptionName} -Last filled on: ${dateFormat(rx.dispensedDate, 'MMMM D, YYYY')} +Last filled on: ${dateFormat(rx.sortedDispensedDate, 'MMMM D, YYYY')} Status: ${validateField(rx.dispStatus)} ${(pdfStatusDefinitions[rx.refillStatus] || pdfDefaultStatusDefinition).reduce( @@ -256,11 +256,7 @@ Filled by pharmacy on: ${ entry?.dispensedDate ? dateFormat(entry.dispensedDate) : 'None noted' } -Shipped on: ${ - entry?.trackingList?.[0]?.completeDateTime - ? dateFormat(entry.trackingList[0].completeDateTime) - : 'None noted' - } +Shipped on: ${dateFormat(prescription?.trackingList?.[0]?.completeDateTime)} Description: ${description} diff --git a/src/applications/mhv-secure-messaging/tests/e2e/pages/PatientSearchPage.js b/src/applications/mhv-secure-messaging/tests/e2e/pages/PatientSearchPage.js index 0bff7d893ac2..c5f753a671c6 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/pages/PatientSearchPage.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/pages/PatientSearchPage.js @@ -137,15 +137,113 @@ class PatientSearchPage { const extractedDate = dateString.split(' at ')[0]; // "November 29, 2024" const parsedDate = new Date(extractedDate); - // calculate three months back from the current date - const threeMonthsBack = new Date(); - threeMonthsBack.setMonth(threeMonthsBack.getMonth() - numberOfMonth); + // calculate a few months back from the current date + const backDate = new Date(); + backDate.setMonth(backDate.getMonth() - numberOfMonth); // assert the date is within the last 3 months - expect(parsedDate).to.be.gte(threeMonthsBack); + expect(parsedDate).to.be.gte(backDate); }); }); }; + + verifyStartDateFormElements = () => { + cy.get(Locators.BLOCKS.FILTER_START_DATE, { includeShadowDom: true }) + .find(`.required`) + .should(`be.visible`) + .and(`have.text`, `(*Required)`); + + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .shadow() + .find(`.select-month`) + .should(`be.visible`); + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .shadow() + .find(`.select-day`) + .should(`be.visible`); + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .shadow() + .find(`.input-year`) + .should(`be.visible`); + }; + + verifyEndDateFormElements = () => { + cy.get(Locators.BLOCKS.FILTER_END_DATE, { includeShadowDom: true }) + .find(`.required`) + .should(`be.visible`) + .and(`have.text`, `(*Required)`); + + cy.get(Locators.BLOCKS.FILTER_END_DATE) + .shadow() + .find(`.select-month`) + .should(`be.visible`); + cy.get(Locators.BLOCKS.FILTER_END_DATE) + .shadow() + .find(`.select-day`) + .should(`be.visible`); + cy.get(Locators.BLOCKS.FILTER_END_DATE) + .shadow() + .find(`.input-year`) + .should(`be.visible`); + }; + + verifyMonthFilterRange = number => { + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .find(`[name="discharge-dateMonth"]`) + .find(`option`) + .should(`have.length`, number); + }; + + verifyDayFilterRange = number => { + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .find(`[name="discharge-dateDay"]`) + .find(`option`) + .should(`have.length`, number); + }; + + selectStartMonth = month => { + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .find(`[name="discharge-dateMonth"]`) + .select(month); + }; + + selectEndMonth = month => { + cy.get(Locators.BLOCKS.FILTER_END_DATE) + .find(`[name="discharge-dateMonth"]`) + .select(month); + }; + + selectStartDay = day => { + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .find(`[name="discharge-dateDay"]`) + .select(day); + }; + + selectEndDay = day => { + cy.get(Locators.BLOCKS.FILTER_END_DATE) + .find(`[name="discharge-dateDay"]`) + .select(day); + }; + + getStartYear = year => { + cy.get(Locators.BLOCKS.FILTER_START_DATE) + .find(`[name="discharge-dateYear"]`) + .type(year); + }; + + getEndYear = year => { + cy.get(Locators.BLOCKS.FILTER_END_DATE) + .find(`[name="discharge-dateYear"]`) + .type(year); + }; + + getRequiredFieldError = selector => { + return cy + .get(selector) + .find(`#error-message`) + .should(`be.visible`); + }; + // retrieveMessages = function (folderID) { // folderInfo.data.attributes.folderId = folderID; // cy.intercept( diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-custom-folder.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-custom-folder.cypress.spec.js new file mode 100644 index 000000000000..81d93ee075fc --- /dev/null +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-custom-folder.cypress.spec.js @@ -0,0 +1,117 @@ +import { format, subMonths } from 'date-fns'; +import SecureMessagingSite from '../sm_site/SecureMessagingSite'; +import PatientInboxPage from '../pages/PatientInboxPage'; +import { AXE_CONTEXT, Locators, Alerts } from '../utils/constants'; +import PatientSearchPage from '../pages/PatientSearchPage'; +import FolderLoadPage from '../pages/FolderLoadPage'; +import PatientMessageCustomFolderPage from '../pages/PatientMessageCustomFolderPage'; + +describe('SM INBOX ADVANCED CUSTOM DATE RANGE SEARCH', () => { + beforeEach(() => { + SecureMessagingSite.login(); + PatientInboxPage.loadInboxMessages(); + FolderLoadPage.loadFolders(); + PatientMessageCustomFolderPage.loadMessages(); + PatientInboxPage.openAdvancedSearch(); + PatientInboxPage.selectDateRange('Custom'); + }); + + it('verify advanced filter form elements', () => { + PatientSearchPage.verifyStartDateFormElements(); + PatientSearchPage.verifyEndDateFormElements(); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify month and day range', () => { + PatientSearchPage.verifyMonthFilterRange(14); + PatientSearchPage.verifyDayFilterRange(2); + + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.verifyDayFilterRange(31); + + PatientSearchPage.selectStartMonth(`June`); + PatientSearchPage.verifyDayFilterRange(32); + + PatientSearchPage.selectStartMonth(`October`); + PatientSearchPage.verifyDayFilterRange(33); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it(`verify errors`, () => { + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_END_DATE); + + PatientSearchPage.selectStartMonth('April'); + PatientSearchPage.selectEndMonth('February'); + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_END_DATE); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify clear filters button', () => { + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.selectStartDay(`2`); + PatientSearchPage.selectEndMonth('April'); + PatientSearchPage.selectEndDay(`11`); + cy.get(Locators.CLEAR_FILTERS).click(); + cy.get(Locators.FIELDS.DATE_RANGE_OPTION).should( + `have.attr`, + `value`, + `any`, + ); + cy.get(Locators.BLOCKS.FILTER_START_DATE).should(`not.exist`); + cy.get(Locators.BLOCKS.FILTER_END_DATE).should(`not.exist`); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify search results', () => { + const searchResultResponse = PatientSearchPage.createDateSearchMockResponse( + 2, + 1, + ); + const currentYear = format(new Date(), 'yyyy'); + const startMonth = format(subMonths(new Date(), 2), 'MMMM'); + const endMonth = format(new Date(), 'MMMM'); + + PatientSearchPage.selectStartMonth(startMonth); + PatientSearchPage.selectStartDay(`1`); + PatientSearchPage.getStartYear(currentYear); + PatientSearchPage.selectEndMonth(endMonth); + PatientSearchPage.selectEndDay(`11`); + PatientSearchPage.getEndYear(currentYear); + + PatientInboxPage.clickFilterMessagesButton(searchResultResponse); + + PatientSearchPage.verifySearchResponseLength(searchResultResponse); + PatientSearchPage.verifyMessageDate(2); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + `${startMonth} 1st ${currentYear} to ${endMonth} 11th ${currentYear}`, + ); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); +}); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-drafts.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-drafts.cypress.spec.js new file mode 100644 index 000000000000..7fb2b9028553 --- /dev/null +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-drafts.cypress.spec.js @@ -0,0 +1,116 @@ +import { format, subMonths } from 'date-fns'; +import SecureMessagingSite from '../sm_site/SecureMessagingSite'; +import PatientInboxPage from '../pages/PatientInboxPage'; +import { AXE_CONTEXT, Locators, Alerts } from '../utils/constants'; +import PatientSearchPage from '../pages/PatientSearchPage'; +import FolderLoadPage from '../pages/FolderLoadPage'; + +describe('SM DRAFTS ADVANCED CUSTOM DATE RANGE SEARCH', () => { + beforeEach(() => { + SecureMessagingSite.login(); + PatientInboxPage.loadInboxMessages(); + FolderLoadPage.loadFolders(); + FolderLoadPage.loadDraftMessages(); + PatientInboxPage.openAdvancedSearch(); + PatientInboxPage.selectDateRange('Custom'); + }); + + it('verify advanced filter form elements', () => { + PatientSearchPage.verifyStartDateFormElements(); + PatientSearchPage.verifyEndDateFormElements(); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify month and day range', () => { + PatientSearchPage.verifyMonthFilterRange(14); + PatientSearchPage.verifyDayFilterRange(2); + + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.verifyDayFilterRange(31); + + PatientSearchPage.selectStartMonth(`June`); + PatientSearchPage.verifyDayFilterRange(32); + + PatientSearchPage.selectStartMonth(`October`); + PatientSearchPage.verifyDayFilterRange(33); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it(`verify errors`, () => { + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_END_DATE); + + PatientSearchPage.selectStartMonth('April'); + PatientSearchPage.selectEndMonth('February'); + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_END_DATE); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify clear filters button', () => { + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.selectStartDay(`2`); + PatientSearchPage.selectEndMonth('April'); + PatientSearchPage.selectEndDay(`11`); + cy.get(Locators.CLEAR_FILTERS).click(); + cy.get(Locators.FIELDS.DATE_RANGE_OPTION).should( + `have.attr`, + `value`, + `any`, + ); + cy.get(Locators.BLOCKS.FILTER_START_DATE).should(`not.exist`); + cy.get(Locators.BLOCKS.FILTER_END_DATE).should(`not.exist`); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify search results', () => { + const searchResultResponse = PatientSearchPage.createDateSearchMockResponse( + 2, + 1, + ); + const currentYear = format(new Date(), 'yyyy'); + const startMonth = format(subMonths(new Date(), 2), 'MMMM'); + const endMonth = format(new Date(), 'MMMM'); + + PatientSearchPage.selectStartMonth(startMonth); + PatientSearchPage.selectStartDay(`1`); + PatientSearchPage.getStartYear(currentYear); + PatientSearchPage.selectEndMonth(endMonth); + PatientSearchPage.selectEndDay(`11`); + PatientSearchPage.getEndYear(currentYear); + + PatientInboxPage.clickFilterMessagesButton(searchResultResponse); + + PatientSearchPage.verifySearchResponseLength(searchResultResponse); + PatientSearchPage.verifyMessageDate(2); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + `${startMonth} 1st ${currentYear} to ${endMonth} 11th ${currentYear}`, + ); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); +}); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-inbox.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-inbox.cypress.spec.js new file mode 100644 index 000000000000..5fbcc311ec94 --- /dev/null +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-inbox.cypress.spec.js @@ -0,0 +1,113 @@ +import { format, subMonths } from 'date-fns'; +import SecureMessagingSite from '../sm_site/SecureMessagingSite'; +import PatientInboxPage from '../pages/PatientInboxPage'; +import { AXE_CONTEXT, Locators, Alerts } from '../utils/constants'; +import PatientSearchPage from '../pages/PatientSearchPage'; + +describe('SM INBOX ADVANCED CUSTOM DATE RANGE SEARCH', () => { + beforeEach(() => { + SecureMessagingSite.login(); + PatientInboxPage.loadInboxMessages(); + PatientInboxPage.openAdvancedSearch(); + PatientInboxPage.selectDateRange('Custom'); + }); + + it('verify advanced filter form elements', () => { + PatientSearchPage.verifyStartDateFormElements(); + PatientSearchPage.verifyEndDateFormElements(); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify month and day range', () => { + PatientSearchPage.verifyMonthFilterRange(14); + PatientSearchPage.verifyDayFilterRange(2); + + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.verifyDayFilterRange(31); + + PatientSearchPage.selectStartMonth(`June`); + PatientSearchPage.verifyDayFilterRange(32); + + PatientSearchPage.selectStartMonth(`October`); + PatientSearchPage.verifyDayFilterRange(33); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it(`verify errors`, () => { + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_END_DATE); + + PatientSearchPage.selectStartMonth('April'); + PatientSearchPage.selectEndMonth('February'); + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_END_DATE); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify clear filters button', () => { + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.selectStartDay(`2`); + PatientSearchPage.selectEndMonth('April'); + PatientSearchPage.selectEndDay(`11`); + cy.get(Locators.CLEAR_FILTERS).click(); + cy.get(Locators.FIELDS.DATE_RANGE_OPTION).should( + `have.attr`, + `value`, + `any`, + ); + cy.get(Locators.BLOCKS.FILTER_START_DATE).should(`not.exist`); + cy.get(Locators.BLOCKS.FILTER_END_DATE).should(`not.exist`); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify search results', () => { + const searchResultResponse = PatientSearchPage.createDateSearchMockResponse( + 2, + 1, + ); + const currentYear = format(new Date(), 'yyyy'); + const startMonth = format(subMonths(new Date(), 2), 'MMMM'); + const endMonth = format(new Date(), 'MMMM'); + + PatientSearchPage.selectStartMonth(startMonth); + PatientSearchPage.selectStartDay(`1`); + PatientSearchPage.getStartYear(currentYear); + PatientSearchPage.selectEndMonth(endMonth); + PatientSearchPage.selectEndDay(`11`); + PatientSearchPage.getEndYear(currentYear); + + PatientInboxPage.clickFilterMessagesButton(searchResultResponse); + + PatientSearchPage.verifySearchResponseLength(searchResultResponse); + PatientSearchPage.verifyMessageDate(2); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + `${startMonth} 1st ${currentYear} to ${endMonth} 11th ${currentYear}`, + ); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); +}); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-sent.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-sent.cypress.spec.js new file mode 100644 index 000000000000..ae806e3bb1f6 --- /dev/null +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-sent.cypress.spec.js @@ -0,0 +1,117 @@ +import { format, subMonths } from 'date-fns'; +import SecureMessagingSite from '../sm_site/SecureMessagingSite'; +import PatientInboxPage from '../pages/PatientInboxPage'; +import { AXE_CONTEXT, Locators, Alerts } from '../utils/constants'; +import PatientSearchPage from '../pages/PatientSearchPage'; +import FolderLoadPage from '../pages/FolderLoadPage'; +import PatentMessageSentPage from '../pages/PatientMessageSentPage'; + +describe('SM SENT ADVANCED CUSTOM DATE RANGE SEARCH', () => { + beforeEach(() => { + SecureMessagingSite.login(); + PatientInboxPage.loadInboxMessages(); + FolderLoadPage.loadFolders(); + PatentMessageSentPage.loadMessages(); + PatientInboxPage.openAdvancedSearch(); + PatientInboxPage.selectDateRange('Custom'); + }); + + it('verify advanced filter form elements', () => { + PatientSearchPage.verifyStartDateFormElements(); + PatientSearchPage.verifyEndDateFormElements(); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify month and day range', () => { + PatientSearchPage.verifyMonthFilterRange(14); + PatientSearchPage.verifyDayFilterRange(2); + + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.verifyDayFilterRange(31); + + PatientSearchPage.selectStartMonth(`June`); + PatientSearchPage.verifyDayFilterRange(32); + + PatientSearchPage.selectStartMonth(`October`); + PatientSearchPage.verifyDayFilterRange(33); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it(`verify errors`, () => { + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_END_DATE); + + PatientSearchPage.selectStartMonth('April'); + PatientSearchPage.selectEndMonth('February'); + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_END_DATE); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify clear filters button', () => { + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.selectStartDay(`2`); + PatientSearchPage.selectEndMonth('April'); + PatientSearchPage.selectEndDay(`11`); + cy.get(Locators.CLEAR_FILTERS).click(); + cy.get(Locators.FIELDS.DATE_RANGE_OPTION).should( + `have.attr`, + `value`, + `any`, + ); + cy.get(Locators.BLOCKS.FILTER_START_DATE).should(`not.exist`); + cy.get(Locators.BLOCKS.FILTER_END_DATE).should(`not.exist`); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify search results', () => { + const searchResultResponse = PatientSearchPage.createDateSearchMockResponse( + 2, + 1, + ); + const currentYear = format(new Date(), 'yyyy'); + const startMonth = format(subMonths(new Date(), 2), 'MMMM'); + const endMonth = format(new Date(), 'MMMM'); + + PatientSearchPage.selectStartMonth(startMonth); + PatientSearchPage.selectStartDay(`1`); + PatientSearchPage.getStartYear(currentYear); + PatientSearchPage.selectEndMonth(endMonth); + PatientSearchPage.selectEndDay(`11`); + PatientSearchPage.getEndYear(currentYear); + + PatientInboxPage.clickFilterMessagesButton(searchResultResponse); + + PatientSearchPage.verifySearchResponseLength(searchResultResponse); + PatientSearchPage.verifyMessageDate(2); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + `${startMonth} 1st ${currentYear} to ${endMonth} 11th ${currentYear}`, + ); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); +}); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-trash.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-trash.cypress.spec.js new file mode 100644 index 000000000000..d18858ca46ce --- /dev/null +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-date-trash.cypress.spec.js @@ -0,0 +1,116 @@ +import { format, subMonths } from 'date-fns'; +import SecureMessagingSite from '../sm_site/SecureMessagingSite'; +import PatientInboxPage from '../pages/PatientInboxPage'; +import { AXE_CONTEXT, Locators, Alerts } from '../utils/constants'; +import PatientSearchPage from '../pages/PatientSearchPage'; +import FolderLoadPage from '../pages/FolderLoadPage'; + +describe('SM TRASH ADVANCED CUSTOM DATE RANGE SEARCH', () => { + beforeEach(() => { + SecureMessagingSite.login(); + PatientInboxPage.loadInboxMessages(); + FolderLoadPage.loadFolders(); + FolderLoadPage.loadDeletedMessages(); + PatientInboxPage.openAdvancedSearch(); + PatientInboxPage.selectDateRange('Custom'); + }); + + it('verify advanced filter form elements', () => { + PatientSearchPage.verifyStartDateFormElements(); + PatientSearchPage.verifyEndDateFormElements(); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify month and day range', () => { + PatientSearchPage.verifyMonthFilterRange(14); + PatientSearchPage.verifyDayFilterRange(2); + + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.verifyDayFilterRange(31); + + PatientSearchPage.selectStartMonth(`June`); + PatientSearchPage.verifyDayFilterRange(32); + + PatientSearchPage.selectStartMonth(`October`); + PatientSearchPage.verifyDayFilterRange(33); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it(`verify errors`, () => { + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`have.text`, Alerts.DATE_FILTER.EMPTY_END_DATE); + + PatientSearchPage.selectStartMonth('April'); + PatientSearchPage.selectEndMonth('February'); + cy.get(Locators.BUTTONS.FILTER).click(); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_START_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_START_DATE); + + PatientSearchPage.getRequiredFieldError( + Locators.BLOCKS.FILTER_END_DATE, + ).should(`include.text`, Alerts.DATE_FILTER.INVALID_END_DATE); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify clear filters button', () => { + PatientSearchPage.selectStartMonth(`February`); + PatientSearchPage.selectStartDay(`2`); + PatientSearchPage.selectEndMonth('April'); + PatientSearchPage.selectEndDay(`11`); + cy.get(Locators.CLEAR_FILTERS).click(); + cy.get(Locators.FIELDS.DATE_RANGE_OPTION).should( + `have.attr`, + `value`, + `any`, + ); + cy.get(Locators.BLOCKS.FILTER_START_DATE).should(`not.exist`); + cy.get(Locators.BLOCKS.FILTER_END_DATE).should(`not.exist`); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); + + it('verify search results', () => { + const searchResultResponse = PatientSearchPage.createDateSearchMockResponse( + 2, + 1, + ); + const currentYear = format(new Date(), 'yyyy'); + const startMonth = format(subMonths(new Date(), 2), 'MMMM'); + const endMonth = format(new Date(), 'MMMM'); + + PatientSearchPage.selectStartMonth(startMonth); + PatientSearchPage.selectStartDay(`1`); + PatientSearchPage.getStartYear(currentYear); + PatientSearchPage.selectEndMonth(endMonth); + PatientSearchPage.selectEndDay(`11`); + PatientSearchPage.getEndYear(currentYear); + + PatientInboxPage.clickFilterMessagesButton(searchResultResponse); + + PatientSearchPage.verifySearchResponseLength(searchResultResponse); + PatientSearchPage.verifyMessageDate(2); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + `${startMonth} 1st ${currentYear} to ${endMonth} 11th ${currentYear}`, + ); + + cy.injectAxe(); + cy.axeCheck(AXE_CONTEXT); + }); +}); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-custom-folder.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-folder.cypress.spec.js similarity index 94% rename from src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-custom-folder.cypress.spec.js rename to src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-folder.cypress.spec.js index 82bffd440c76..8b505ab73117 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-custom-folder.cypress.spec.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-custom-folder.cypress.spec.js @@ -82,6 +82,10 @@ describe('SM CUSTOM FOLDER ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(6); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 6 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -99,6 +103,10 @@ describe('SM CUSTOM FOLDER ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(12); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 12 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-drafts.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-drafts.cypress.spec.js similarity index 90% rename from src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-drafts.cypress.spec.js rename to src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-drafts.cypress.spec.js index 760498e9652f..e290ca134327 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-drafts.cypress.spec.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-drafts.cypress.spec.js @@ -58,6 +58,10 @@ describe('SM DRAFTS ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(3); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 3 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -75,6 +79,10 @@ describe('SM DRAFTS ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(6); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 6 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -92,6 +100,10 @@ describe('SM DRAFTS ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(12); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 12 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-inbox.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-inbox.cypress.spec.js similarity index 89% rename from src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-inbox.cypress.spec.js rename to src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-inbox.cypress.spec.js index 21348463f3d1..46f5ff371968 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-inbox.cypress.spec.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-inbox.cypress.spec.js @@ -48,6 +48,10 @@ describe('SM INBOX ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(3); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 3 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -58,10 +62,13 @@ describe('SM INBOX ADVANCED FIXED DATE RANGE SEARCH', () => { PatientInboxPage.selectDateRange('Last 6 months'); PatientInboxPage.clickFilterMessagesButton(searchResultResponse); - PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(6); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 6 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -75,10 +82,13 @@ describe('SM INBOX ADVANCED FIXED DATE RANGE SEARCH', () => { PatientInboxPage.selectDateRange('Last 12 months'); PatientInboxPage.clickFilterMessagesButton(searchResultResponse); - PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(12); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 12 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-sent.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-sent.cypress.spec.js similarity index 93% rename from src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-sent.cypress.spec.js rename to src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-sent.cypress.spec.js index 031e164cc66f..6678baf02178 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-sent.cypress.spec.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-sent.cypress.spec.js @@ -82,6 +82,10 @@ describe('SM SENT ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(6); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 6 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -99,6 +103,10 @@ describe('SM SENT ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(12); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 12 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-trash.cypress.spec.js b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-trash.cypress.spec.js similarity index 93% rename from src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-trash.cypress.spec.js rename to src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-trash.cypress.spec.js index 3d069c62c4df..159e2716a6be 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-search-trash.cypress.spec.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/sort-filter-test/secure-messaging-advanced-filter-trash.cypress.spec.js @@ -81,6 +81,10 @@ describe('SM TRASH ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(6); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 6 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); @@ -98,6 +102,10 @@ describe('SM TRASH ADVANCED FIXED DATE RANGE SEARCH', () => { PatientSearchPage.verifySearchResponseLength(searchResultResponse); PatientSearchPage.verifyMessageDate(12); + PatientSearchPage.verifySearchMessageLabel( + searchResultResponse, + 'Last 12 months', + ); cy.injectAxe(); cy.axeCheck(AXE_CONTEXT); diff --git a/src/applications/mhv-secure-messaging/tests/e2e/utils/constants.js b/src/applications/mhv-secure-messaging/tests/e2e/utils/constants.js index 38b300ae1870..3755f9924491 100644 --- a/src/applications/mhv-secure-messaging/tests/e2e/utils/constants.js +++ b/src/applications/mhv-secure-messaging/tests/e2e/utils/constants.js @@ -239,6 +239,8 @@ export const Locators = { }, BLOCKS: { ATTACHMENTS: '.attachments-list', + FILTER_START_DATE: `[data-testid="date-start"]`, + FILTER_END_DATE: `[data-testid="date-end"]`, }, CHECKBOX: { CL_ALL: '[data-testid*="select-all"]', @@ -294,6 +296,12 @@ export const Alerts = { ACTIVE: `Maintenance on My HealtheVet`, UPCOMING: `Upcoming maintenance on My HealtheVet`, }, + DATE_FILTER: { + EMPTY_START_DATE: `Error Please enter a start date.`, + EMPTY_END_DATE: `Error Please enter an end date.`, + INVALID_START_DATE: `Start date must be on or before end date.`, + INVALID_END_DATE: `End date must be on or after start date.`, + }, OUTAGE: 'We’re sorry. We couldn’t load this page. Try again later.', OLD_MSG_HEAD: 'This conversation is too old for new replies', OLD_MSG_SUBHEAD: