From d5882d238a893bd18fb7110fd8a0244fcc04bda5 Mon Sep 17 00:00:00 2001 From: scottqueen-bixal Date: Mon, 9 Dec 2024 13:04:33 -0500 Subject: [PATCH] PXBF-1975-more-info-return-to-form: include back to start cta with more information needed criteria list --- .../__snapshots__/index.spec.jsx.snap | 304 ++++++++++++++++++ .../ResultsView/components/Results/index.jsx | 15 +- .../__snapshots__/index.spec.jsx.snap | 8 + .../BenefitAccordionGroup/index.jsx | 11 +- benefit-finder/src/shared/locales/en/en.json | 4 + benefit-finder/src/shared/locales/es/es.json | 4 + 6 files changed, 339 insertions(+), 7 deletions(-) diff --git a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap index d8113f72..9f3f00ae 100644 --- a/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/Routes/ResultsView/__tests__/__snapshots__/index.spec.jsx.snap @@ -531,6 +531,14 @@ exports[`loads view 1`] = ` The deceased worked in the coal mines and their death was due to black lung disease (pneumoconiosis) +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{ + const ROUTES = useContext(RouteContext) + const navigate = useNavigate() // Results view components const ResultsBannerBlock = ({ notEligibleView, zeroBenefitsResult, ui }) => { const { eligible, notEligible, zeroBenefits } = ui @@ -140,12 +145,7 @@ const Results = ({ > {resultsRelativeBenefits?.heading} - {relevantBenefits && ( - - )} + {relevantBenefits && }
) } @@ -176,6 +176,9 @@ const Results = ({ } isExpandAll={isExpandAll} setExpandAll={setExpandAll} + returnToForm={() => + navigate(`/${ROUTES.indexPath}/${ROUTES.formPaths[0]}`) + } ui={ui} /> diff --git a/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/__snapshots__/index.spec.jsx.snap b/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/__snapshots__/index.spec.jsx.snap index a2b38309..0ca35974 100644 --- a/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/__snapshots__/index.spec.jsx.snap +++ b/benefit-finder/src/shared/components/BenefitAccordionGroup/__tests__/__snapshots__/index.spec.jsx.snap @@ -133,6 +133,14 @@ exports[`BenefitAccordionGroup > renders a match to the previous snapshot 1`] = You paid for funeral or burial expenses and were not reimbursed +
{ const { benefitAccordion, benefitAccordionGroup } = ui @@ -37,6 +40,7 @@ const BenefitAccordionGroup = ({ visitLabel, unmetLabel, sourceIsEnglish, + backcta, } = benefitAccordion const { closedState, openState } = benefitAccordionGroup const { benefitLink, openAllBenefitAccordions } = @@ -151,6 +155,9 @@ const BenefitAccordionGroup = ({ ) })} + returnToForm()}> + {backcta?.link} +
) } @@ -236,7 +243,9 @@ const BenefitAccordionGroup = ({ )} {moreInformationNeeded.length > 0 && ( - + <> + + )}