From 8e39c6d2f1bcb075b21f79fcff239e208cbe8c26 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 16 Sep 2022 13:52:08 -0400 Subject: [PATCH 1/3] CSR-779 repair button text --- src/layouts/estimate/estimate.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index f38d6b77d..faf2c8ed6 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -151,6 +151,18 @@ export default { ]; const resultMap = await settleAllPromises(promiseResultMap); next((vm) => { + if (resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.includes("|")) + { + const forwardTextOption = resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText.split("|"); + if (store.getters.damage.isRepair){ + resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText = forwardTextOption[1] + } + else + { + resultMap.cmsContent.FunnelFooterWidget.ForwardButtonText = forwardTextOption[0] + } + } + vm.setCmsContent(resultMap.cmsContent); }); }, From 40d790bc7ec4d2c71517044781650f82dab5459a Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 16 Sep 2022 14:56:26 -0400 Subject: [PATCH 2/3] add footer to cmscontent --- src/layouts/estimate/estimate.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index 1843670ec..f8d962543 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -166,6 +166,7 @@ function setupMocks({ groupName = "estimate", cmsQuestionText = "Let's get your VIN. Or we can look it up for you!", cmsAnswers = [{ Name: "Provide my VIN manually Most specific to your vehicle" }, { Name: "Provide my license plate # Most accurate VIN match" }, { Name: "Provide my home address Most convenient VIN match" }], + funnelFooterWidget = { ForwardButtonText: "test txt" }, mountOptionsMockData = { router: { navigate: jest.fn(), @@ -179,11 +180,13 @@ function setupMocks({ const cmsContent = { groupName: groupName, QuestionText: cmsQuestionText, - Answers: cmsAnswers + Answers: cmsAnswers, + FunnelFooterWidget: funnelFooterWidget }; - const apiPromise = Promise.resolve(cmsContent); + const apiPromise = Promise.resolve({ cmsContent }); settleAllPromises.mockImplementation(() => apiPromise); + //fetchCmsContentForPage.mockImplementation(() => {reultMap: } cmsContent); fetchCmsContentForPage.mockImplementation(() => Promise.resolve()); const mountOptions = getMountOptions({ ...mountOptionsMockData, mixins: [baseMixin] }); From fa103191885ba19f0071c8f27758964eaade2ab7 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 16 Sep 2022 15:10:22 -0400 Subject: [PATCH 3/3] CSR-779 remove comment --- src/layouts/estimate/estimate.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index f8d962543..476b8cdff 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -186,8 +186,8 @@ function setupMocks({ const apiPromise = Promise.resolve({ cmsContent }); settleAllPromises.mockImplementation(() => apiPromise); - //fetchCmsContentForPage.mockImplementation(() => {reultMap: } cmsContent); fetchCmsContentForPage.mockImplementation(() => Promise.resolve()); + const mountOptions = getMountOptions({ ...mountOptionsMockData, mixins: [baseMixin] }); mountOptions['attachTo'] = document.body;