From 981ef674fb70ef7d2fb36120773de05af6de2bce Mon Sep 17 00:00:00 2001 From: Kroell Date: Tue, 9 May 2023 12:50:50 -0400 Subject: [PATCH 01/13] styling fixes on welcome-page --- src/layouts/welcome-page/welcome-page.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index b70a24eb..417b00d4 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -3,7 +3,7 @@
- +
@@ -43,7 +43,7 @@ />
-
+
From b344e263d0a95bc066ec277c52f071899ad34883 Mon Sep 17 00:00:00 2001 From: Kroell Date: Tue, 9 May 2023 12:52:01 -0400 Subject: [PATCH 02/13] formatting fixes --- .../policy-holder-details.vue | 236 +++++++++--------- 1 file changed, 119 insertions(+), 117 deletions(-) diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue index 7956343a..8b18a1a3 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.vue +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -83,135 +83,137 @@ export default { { resultKey: "cmsContent", promise: cmsContentPromise, - },]; + }, + ]; - //use resultMap to populate layout content. - let resultMap = await settleAllPromises(promiseResultMap); + //use resultMap to populate layout content. + let resultMap = await settleAllPromises(promiseResultMap); - next((vm) => { + next((vm) => { vm.setCmsContent(resultMap.cmsContent); - }); - - }, - created(){ + }); + + }, + created(){ this.getVehiclesfromPolicyLookup(); + }, + methods: + { + backButtonAction() { + this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); }, - methods: - { - backButtonAction() { - this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); - }, - async forwardButtonAction() - { - this.mainStore.updatePolicyHolderDetails(this.customerQuestions); - return this.navigateForward(); - }, + async forwardButtonAction() + { + this.mainStore.updatePolicyHolderDetails(this.customerQuestions); + return this.navigateForward(); + }, - navigateForward() { - if(this.vehiclesCount > 0) + navigateForward() { + if(this.vehiclesCount > 0) + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED, + this.$route, + {}, + {}, + this.vehiclesFound + ); + else this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED, - this.$route, - {}, - {}, - this.vehiclesFound - ); - else - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, - this.$route - ); - }, - getPolicyHolderDetailsFromStore() { - return { - addressQuestions : + this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, + this.$route + ); + }, + getPolicyHolderDetailsFromStore() { + return { + addressQuestions : + { + streetAddress: this.mainStore.order.customer.address.streetAddress, + streetAddress2: this.mainStore.order.customer.address.streetAddress2, + city: this.mainStore.order.customer.address.city, + state: this.mainStore.order.customer.address.state, + zipCode: this.mainStore.order.customer.address.zipCode, + }, + firstName : this.mainStore.order.customer.firstName, + lastName : this.mainStore.order.customer.lastName, + } + }, + async getPolicyLookupResponse(){ + const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({ + accountNumber:this.mainStore.order.accountNumber.toString(), + policyNumber:this.mainStore.order.policy.policyNumber, + dateOfLoss:this.mainStore.order.policy.dateOfLoss}); + + // Settle promises and get results + const promisePolicyLookupResultMap = [ { - streetAddress: this.mainStore.order.customer.address.streetAddress, - streetAddress2: this.mainStore.order.customer.address.streetAddress2, - city: this.mainStore.order.customer.address.city, - state: this.mainStore.order.customer.address.state, - zipCode: this.mainStore.order.customer.address.zipCode, - }, - firstName : this.mainStore.order.customer.firstName, - lastName : this.mainStore.order.customer.lastName, - } - }, - async getPolicyLookupResponse(){ - const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({ - accountNumber:this.mainStore.order.accountNumber.toString(), - policyNumber:this.mainStore.order.policy.policyNumber, - dateOfLoss:this.mainStore.order.policy.dateOfLoss}); - - // Settle promises and get results - const promisePolicyLookupResultMap = [ - { - resultKey: "policyLookupResponse", - promise: policyLookupResponse, - } - ]; - const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); - return policyLookupResultMap.policyLookupResponse; - }, - async getVehiclesfromPolicyLookup() - { - //call coverage policy lookup if isCoverageEnabled flag enabled - if(this.isCoverageEnabled){ - const policyLookupResponse = await this.getPolicyLookupResponse(); - if(policyLookupResponse!=null){ - var policy = policyLookupResponse.policies?.[0]; - if(policy!=null){ - //populate policy holder details from policy lookup - this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; - this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city; - this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state; - this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode; - this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; - this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; - - this.customerQuestions = this.getPolicyHolderDetailsFromStore(); - //populate vehicles - this.vehiclesFound= policy.vehicles; - } + resultKey: "policyLookupResponse", + promise: policyLookupResponse, } - } - }, + ]; + const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); + return policyLookupResultMap.policyLookupResponse; + }, + async getVehiclesfromPolicyLookup() + { + //call coverage policy lookup if isCoverageEnabled flag enabled + if(this.isCoverageEnabled){ + const policyLookupResponse = await this.getPolicyLookupResponse(); + if(policyLookupResponse!=null){ + var policy = policyLookupResponse.policies?.[0]; + if(policy!=null){ + //populate policy holder details from policy lookup + this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; + this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city; + this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state; + this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode; + this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; + this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; + + this.customerQuestions = this.getPolicyHolderDetailsFromStore(); + //populate vehicles + this.vehiclesFound= policy.vehicles; + } + } + } + }, + }, + computed:{ + isCoverageEnabled(){ + return this.mainStore.issConfig.isCoverageEnabled; }, - computed:{ - isCoverageEnabled(){ - return this.mainStore.issConfig.isCoverageEnabled; - }, - vehiclesCount(){ - return this.vehiclesFound.length; - } - }, - components: { - siteHeader, - siteSubHeader, - textboxQuestion, - addressQuestions, - siteFooter, - Form, - }, - } - - +#address-questions-wrapper .alert.heading { + line-height: 24px; +} + +#address-questions-wrapper .form-test-error { + line-height: 24px; +} + From 3b7dffd82a1fae466c6006583aefd4d05d976f83 Mon Sep 17 00:00:00 2001 From: Kroell Date: Wed, 10 May 2023 15:04:46 -0400 Subject: [PATCH 03/13] move policy lookup call to welcome-page, navigation from welcome-page --- .../policy-holder-details.vue | 48 +---------- src/layouts/welcome-page/welcome-page.vue | 86 +++++++++++++++++-- .../router-constants/navigation-scenarios.js | 9 +- src/router/router-constants/routing-table.js | 12 ++- 4 files changed, 98 insertions(+), 57 deletions(-) diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue index 8b18a1a3..46789bfa 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.vue +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -90,13 +90,10 @@ export default { let resultMap = await settleAllPromises(promiseResultMap); next((vm) => { - vm.setCmsContent(resultMap.cmsContent); + vm.setCmsContent(resultMap.cmsContent); }); }, - created(){ - this.getVehiclesfromPolicyLookup(); - }, methods: { backButtonAction() { @@ -124,6 +121,7 @@ export default { this.$route ); }, + getPolicyHolderDetailsFromStore() { return { addressQuestions : @@ -137,47 +135,7 @@ export default { firstName : this.mainStore.order.customer.firstName, lastName : this.mainStore.order.customer.lastName, } - }, - async getPolicyLookupResponse(){ - const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({ - accountNumber:this.mainStore.order.accountNumber.toString(), - policyNumber:this.mainStore.order.policy.policyNumber, - dateOfLoss:this.mainStore.order.policy.dateOfLoss}); - - // Settle promises and get results - const promisePolicyLookupResultMap = [ - { - resultKey: "policyLookupResponse", - promise: policyLookupResponse, - } - ]; - const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); - return policyLookupResultMap.policyLookupResponse; - }, - async getVehiclesfromPolicyLookup() - { - //call coverage policy lookup if isCoverageEnabled flag enabled - if(this.isCoverageEnabled){ - const policyLookupResponse = await this.getPolicyLookupResponse(); - if(policyLookupResponse!=null){ - var policy = policyLookupResponse.policies?.[0]; - if(policy!=null){ - //populate policy holder details from policy lookup - this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; - this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city; - this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state; - this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode; - this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; - this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; - - this.customerQuestions = this.getPolicyHolderDetailsFromStore(); - //populate vehicles - this.vehiclesFound= policy.vehicles; - } - } - } - }, - + }, }, computed:{ isCoverageEnabled(){ diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 417b00d4..1d9d2703 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -203,7 +203,8 @@ export default { mixins: [BaseFormMixin], data() { return { - welcomePageModel: this.getWelcomePageModelFromStore() + welcomePageModel: this.getWelcomePageModelFromStore(), + vehiclesFound: [], }; }, setup() { @@ -238,15 +239,81 @@ export default { { async forwardButtonAction() { this.mainStore.updatePolicyData(this.welcomePageModel); - return this.navigateForward(); + + const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({ + accountNumber:this.mainStore.order.accountNumber.toString(), + policyNumber:this.mainStore.order.policy.policyNumber, + dateOfLoss:this.mainStore.order.policy.dateOfLoss + }); + + // Settle promises and get results + const promisePolicyLookupResultMap = [ + { + resultKey: "policyLookupResponse", + promise: policyLookupResponse, + } + ]; + + const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); + const policyInfo = policyLookupResultMap.policyLookupResponse; + + return this.navigateForward(policyInfo); }, - navigateForward() { - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD, - this.$route - ); + navigateForward(policyInfo) { + const policy = policyInfo.policies?.[0]; + + // if policy lookup is unsuccessful, navigate to policy-holder-details page + if (!policy) { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + this.$route + ); + } + // if policy lookup is successful, but no vehicles are associated with the policy + // navigate to vehicle-selection page (manual entry) + else if (!this.vehiclesFound) { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + this.$route + ); + } + // if policy lookup is successful and vehicles are found, navigate to + else { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, + this.$route, + {}, + {}, + this.vehiclesFound + ); + } }, + + async getVehiclesfromPolicyLookup() + { + //call coverage policy lookup if isCoverageEnabled flag enabled + if(this.isCoverageEnabled){ + const policyLookupResponse = await this.getPolicyLookupResponse(); + if(policyLookupResponse!=null){ + var policy = policyLookupResponse.policies?.[0]; + if(policy!=null){ + //populate policy holder details from policy lookup + this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; + this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city; + this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state; + this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode; + this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; + this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; + + //populate vehicles + this.vehiclesFound= policy.vehicles; + } + } + } + + }, + getWelcomePageModelFromStore() { return { policyNumber : this.mainStore.order.policy.policyNumber, @@ -306,7 +373,10 @@ export default { isPolicyHolderEnabled() { return !!this.mainStore.issConfig.disabledFields.policyNumber; - } + }, + isCoverageEnabled(){ + return this.mainStore.issConfig.isCoverageEnabled; + }, }, components: { siteHeader, diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index 64fd8933..cb854e26 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -6,6 +6,11 @@ const navigationScenarios = { // Entry MOVE_FORWARD_ENTRY_PAGE: "MOVE_FORWARD_ENTRY_PAGE", + // Welcome + CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES: "CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES", + CLICKED_FORWARD_WITH_NO_POLICY: "CLICKED_FORWARD_WITH_NO_POLICY", + CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES: "CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES", + // YMMS SELECTED_YEAR: "SELECTED_YEAR", SELECTED_MAKE: "SELECTED_MAKE", @@ -46,8 +51,8 @@ const navigationScenarios = { //Provider Preference CLICKED_FORWARD_WITH_SAFELITE: "CLICKED_FORWARD_WITH_SAFELITE", CLICKED_FORWARD_WITH_TPA_ENABLED: "CLICKED_FORWARD_WITH_TPA_ENABLED", - CLICKED_FORWARD_WITH_TPA_DISABLED: "CLICKED_FORWARD_WITH_TPA_DISABLED" - + CLICKED_FORWARD_WITH_TPA_DISABLED: "CLICKED_FORWARD_WITH_TPA_DISABLED", + CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES: "CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES" }; diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index e6c25ae6..f82d26d5 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -375,9 +375,17 @@ const routingTable = function(store) { destinationIssPageValue: issPageValues.WELCOME_PAGE }, { - scenario: navigationScenarios.CLICKED_FORWARD, + scenario: navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, + destinationIssPageValue: issPageValues.POLICY_VEHICLES + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS - } + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + destinationIssPageValue: issPageValues.VEHICLE_SELECTION + } ] }, { From 50b2310f1225f8d783df56f9be7369ffcd6270fb Mon Sep 17 00:00:00 2001 From: Kroell Date: Wed, 10 May 2023 16:27:36 -0400 Subject: [PATCH 04/13] unit testing WIP --- src/layouts/welcome-page/welcome-page.spec.js | 122 ++++++++++++++++-- 1 file changed, 109 insertions(+), 13 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.spec.js b/src/layouts/welcome-page/welcome-page.spec.js index 195f129d..50a6ac55 100644 --- a/src/layouts/welcome-page/welcome-page.spec.js +++ b/src/layouts/welcome-page/welcome-page.spec.js @@ -8,6 +8,9 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import baseMixin from "@/mixins/base-mixin.js"; import { getMountOptions } from "@/helpers/unit-test-helper.js"; import { applicationConfig } from "@/constants/application-config"; +import { useMainStore } from "@/store"; +import { navigationScenarios } from "@/router/router-constants/navigation-scenarios"; + // Mock our module for promises. jest.mock("@/helpers/layout-helper.js", () => ({ settleAllPromises: jest.fn(), @@ -49,26 +52,121 @@ describe("welcome-page.vue", () => { }); }); +describe("navigation", () => { + test("if policy and vehicles are found, navigate to policy-vehicle page", async () => { + // Arrange + const mockvehicles = [ + { + vin: "TEST_VIN", + }, + { + vin: "TEST_VIN2", + } + ]; + + const { wrapper } = setupMocks({}); + + await wrapper.setData({ + isCoverageEnabled : true, + vehiclesCount:2, + vehiclesFound:mockvehicles + }); + + useMainStore().order.policy.policyNumber = "p_0001"; + useMainStore().order.policy.dateOfLoss = "2022-01-28"; + useMainStore().order.accountNumber = "00000"; + + // Act + + await wrapper.vm.forwardButtonAction(); + + // Assert + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( + navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, + undefined, + {}, + {}, + mockvehicles + ); + }); + test("if policy is found, but no vehicles, navigate to vehicle-selection page", async () => { + // Arrange + const { wrapper } = setupMocks({}); + + await wrapper.setData({ + isCoverageEnabled: true, + vehiclesCount: 0, + vehiclesFound: null + }); + + useMainStore().order.policy.policyNumber = "p_0001"; + useMainStore().order.policy.dateOfLoss = "2022-01-28"; + useMainStore().order.accountNumber = "00000"; + + // Act + + await wrapper.vm.forwardButtonAction(); + + // Assert + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( + navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + undefined + ); + }); + test("if policy is not found, navigate to policy-holder-details page", async () => { + // Arrange + const { wrapper } = setupMocks({}); + + await wrapper.setData({ + isCoverageEnabled : true, + }); + + useMainStore().order.policy.policyNumber = null; + + // Act + + await wrapper.vm.forwardButtonAction(); + + // Assert + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( + navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + ); + }); +}); + function setupMocks({ pageHeaderWidgetHeaderText = {}, pageFooterWidgetCmsContent = {}, mountOptionsMockData = {}, }) { + const policies = [{ + vehicles:[ + { + vin: "TEST_VIN", + }, + { + vin: "TEST_VIN2", + } + ] + }]; + //Mock api responses const apiResponses = { cmsContent: { - SiteSubHeaderWidget: pageHeaderWidgetHeaderText, - VehicleBannerWidget: { - GenericVehicleImage: - `${applicationConfig.ISS_DEV_CMS_DOMAIN}/images/default-source/default-album/blurred-image.jpg`, + SiteSubHeaderWidget: pageHeaderWidgetHeaderText, + VehicleBannerWidget: { + GenericVehicleImage: + `${applicationConfig.ISS_DEV_CMS_DOMAIN}/images/default-source/default-album/blurred-image.jpg`, + }, + SiteHeaderWidget: { + LogoImage: + `${applicationConfig.ISS_DEV_CMS_DOMAIN}/images/default-source/default-album/logos/insuranceLogo.jpg`, + }, + SiteFooterWidget: pageFooterWidgetCmsContent, }, - SiteHeaderWidget: { - LogoImage: - `${applicationConfig.ISS_DEV_CMS_DOMAIN}/images/default-source/default-album/logos/insuranceLogo.jpg`, - }, - SiteFooterWidget: pageFooterWidgetCmsContent, - - }, + policyLookupResponse:{ + policies: policies + } }; mountOptionsMockData = { @@ -76,8 +174,6 @@ function setupMocks({ router: { navigate: jest.fn(), }, - - }; const apiPromise = Promise.resolve(apiResponses); From c49217aee6329ded5eacf9bbab216cf2161c53a8 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Thu, 11 May 2023 12:04:26 -0400 Subject: [PATCH 05/13] formatting --- src/layouts/welcome-page/welcome-page.vue | 38 ++++++++++------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 74ebdb6a..b1d56e10 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -293,25 +293,24 @@ export default { async getVehiclesfromPolicyLookup() { //call coverage policy lookup if isCoverageEnabled flag enabled - if(this.isCoverageEnabled){ + if (this.isCoverageEnabled){ const policyLookupResponse = await this.getPolicyLookupResponse(); - if(policyLookupResponse!=null){ + if (policyLookupResponse !== null){ var policy = policyLookupResponse.policies?.[0]; - if(policy!=null){ + if (policy !== null){ //populate policy holder details from policy lookup this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; - this.mainStore.order.customer.address.city=policy.insureds?.[0]?.city; - this.mainStore.order.customer.address.state=policy.insureds?.[0]?.state; - this.mainStore.order.customer.address.zipCode=policy.insureds?.[0]?.zipCode; + this.mainStore.order.customer.address.city = policy.insureds?.[0]?.city; + this.mainStore.order.customer.address.state = policy.insureds?.[0]?.state; + this.mainStore.order.customer.address.zipCode = policy.insureds?.[0]?.zipCode; this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; //populate vehicles - this.vehiclesFound= policy.vehicles; + this.vehiclesFound = policy.vehicles; } } - } - + } }, getWelcomePageModelFromStore() { @@ -332,7 +331,7 @@ export default { computed:{ DamageCauseOptions() { const damageCauseAnswers = this.getCmsContent("DamageCauseQuestion", "Answers"); - const damageCauseAnswersObj ={}; + const damageCauseAnswersObj = {}; if(damageCauseAnswers) { for (let answer of Object.values(damageCauseAnswers)) { @@ -343,24 +342,22 @@ export default { } return damageCauseAnswersObj; }, - DamageGlassOnlyOptions() - { + DamageGlassOnlyOptions() { return this.getCmsContent("GlassOnlyQuestion", "Answers"); }, - DamageGlassOnlyQuestion() - { + DamageGlassOnlyQuestion() { return this.getCmsContent("GlassOnlyQuestion", "QuestionText"); }, - displayDamageCityQuestion(){ + displayDamageCityQuestion() { return !!this.getCmsContent("DamageCityQuestion","QuestionText"); }, - displayDamageStateQuestion(){ + displayDamageStateQuestion() { return !!this.getCmsContent("DamageStateQuestion","QuestionText"); }, - displayGlassOnlyQuestion(){ + displayGlassOnlyQuestion() { return !!this.getCmsContent("GlassOnlyQuestion","QuestionText"); }, - displayPolicyZip(){ + displayPolicyZip() { if (this.mainStore.issConfig.isAuthenticated && !!this.mainStore.issConfig.disabledFields.policyZipCode) { return false; @@ -372,11 +369,10 @@ export default { getStates() { return states; }, - isPolicyHolderEnabled() - { + isPolicyHolderEnabled() { return !!this.mainStore.issConfig.disabledFields.policyNumber; }, - isCoverageEnabled(){ + isCoverageEnabled() { return this.mainStore.issConfig.isCoverageEnabled; }, }, From c52323409a11c7e391e6dbecb2a3272187ae6340 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Thu, 11 May 2023 12:05:25 -0400 Subject: [PATCH 06/13] final unit tests --- src/layouts/welcome-page/welcome-page.spec.js | 64 ++++++++++++------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.spec.js b/src/layouts/welcome-page/welcome-page.spec.js index 50a6ac55..ae934705 100644 --- a/src/layouts/welcome-page/welcome-page.spec.js +++ b/src/layouts/welcome-page/welcome-page.spec.js @@ -25,9 +25,7 @@ jest.mock("@/helpers/cms-content-helper", () => ({ describe("welcome-page.vue", () => { test("Should render welcomePage sub-components (policyNumber, policyZipCode, dateOfLoss, damageCause etc.)", async () => { // Arrange - - const { wrapper } = setupMocks({}); - + const { wrapper } = setupMocks({}); // Act const policyNumber = wrapper.findComponent({ ref: "policyNumber" }); @@ -39,7 +37,6 @@ describe("welcome-page.vue", () => { const phoneNumber = wrapper.findComponent({ ref: "phoneNumber" }); const email = wrapper.findComponent({ ref: "email" }); - // Assert expect(policyNumber.exists()).toBe(true); expect(dateOfLoss.exists()).toBe(true); @@ -64,12 +61,14 @@ describe("navigation", () => { } ]; - const { wrapper } = setupMocks({}); + const { wrapper } = setupMocks({ + policies: [{}] + }); await wrapper.setData({ - isCoverageEnabled : true, - vehiclesCount:2, - vehiclesFound:mockvehicles + isCoverageEnabled: true, + vehiclesCount: 2, + vehiclesFound: mockvehicles, }); useMainStore().order.policy.policyNumber = "p_0001"; @@ -77,7 +76,6 @@ describe("navigation", () => { useMainStore().order.accountNumber = "00000"; // Act - await wrapper.vm.forwardButtonAction(); // Assert @@ -91,12 +89,14 @@ describe("navigation", () => { }); test("if policy is found, but no vehicles, navigate to vehicle-selection page", async () => { // Arrange - const { wrapper } = setupMocks({}); + const { wrapper } = setupMocks({ + policies: [{}] + }); await wrapper.setData({ isCoverageEnabled: true, vehiclesCount: 0, - vehiclesFound: null + vehiclesFound: null, }); useMainStore().order.policy.policyNumber = "p_0001"; @@ -115,21 +115,25 @@ describe("navigation", () => { }); test("if policy is not found, navigate to policy-holder-details page", async () => { // Arrange - const { wrapper } = setupMocks({}); + const { wrapper } = setupMocks({ + policies: undefined + }); await wrapper.setData({ isCoverageEnabled : true, }); - useMainStore().order.policy.policyNumber = null; + useMainStore().order.policy.policyNumber = "p_0001"; + useMainStore().order.policy.dateOfLoss = "2022-01-28"; + useMainStore().order.accountNumber = "00000"; // Act - await wrapper.vm.forwardButtonAction(); // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + undefined ); }); }); @@ -138,17 +142,29 @@ function setupMocks({ pageHeaderWidgetHeaderText = {}, pageFooterWidgetCmsContent = {}, mountOptionsMockData = {}, + policies = [], + lookupPolicyResponse }) { - const policies = [{ - vehicles:[ - { - vin: "TEST_VIN", + useMainStore().getCoveragePolicyInfo = jest.fn().mockImplementation(() => { + return Promise.resolve({ + data: lookupPolicyResponse + ? lookupPolicyResponse + : { + policies: [ + { + vehicles: [ + { + vin: "TEST_VIN" + }, + { + vin: "TEST_VIN2" + } + ] + }, + ], }, - { - vin: "TEST_VIN2", - } - ] - }]; + }) + }) //Mock api responses const apiResponses = { @@ -164,7 +180,7 @@ function setupMocks({ }, SiteFooterWidget: pageFooterWidgetCmsContent, }, - policyLookupResponse:{ + policyLookupResponse: { policies: policies } }; From c5e051874d78cf49aa89a120ae056a7695e12dd0 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Thu, 11 May 2023 16:33:49 -0400 Subject: [PATCH 07/13] refactor WIP --- src/layouts/welcome-page/welcome-page.vue | 121 +++++++++++----------- 1 file changed, 59 insertions(+), 62 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index b1d56e10..07f06fcb 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -239,47 +239,52 @@ export default { { async forwardButtonAction() { this.mainStore.updatePolicyData(this.welcomePageModel); - - const policyLookupResponse = this.mainStore.getCoveragePolicyInfo({ - accountNumber:this.mainStore.order.accountNumber.toString(), - policyNumber:this.mainStore.order.policy.policyNumber, - dateOfLoss:this.mainStore.order.policy.dateOfLoss - }); - - // Settle promises and get results - const promisePolicyLookupResultMap = [ - { - resultKey: "policyLookupResponse", - promise: policyLookupResponse, + + //call coverage policy lookup if isCoverageEnabled flag enabled + if (this.isCoverageEnabled) { + const policyLookupResponse = useMainStore().getCoveragePolicyInfo({ + accountNumber:this.mainStore.order.accountNumber.toString(), + policyNumber:this.mainStore.order.policy.policyNumber, + dateOfLoss:this.mainStore.order.policy.dateOfLoss + }); + + // Settle promises and get results + const promisePolicyLookupResultMap = [ + { + resultKey: "policyLookupResponse", + promise: policyLookupResponse, + } + ]; + + const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); + const policyInfo = policyLookupResultMap.policyLookupResponse; + + // if policy lookup fails, move the user forward + if (!policyInfo) { + this.navigateForward(); } - ]; - - const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); - const policyInfo = policyLookupResultMap.policyLookupResponse; - - return this.navigateForward(policyInfo); + + const policy = policyInfo.policies?.[0]; + if (policy) { + //populate policy holder details from policy lookup + this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; + this.mainStore.order.customer.address.city = policy.insureds?.[0]?.city; + this.mainStore.order.customer.address.state = policy.insureds?.[0]?.state; + this.mainStore.order.customer.address.zipCode = policy.insureds?.[0]?.zipCode; + this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; + this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; + + //populate vehicles + this.vehiclesFound = policy.vehicles; + } + return this.navigateForward(policy); + } + return this.navigateForward(); }, - navigateForward(policyInfo) { - const policy = policyInfo.policies?.[0]; - - // if policy lookup is unsuccessful, navigate to policy-holder-details page - if (!policy) { - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, - this.$route - ); - } - // if policy lookup is successful, but no vehicles are associated with the policy - // navigate to vehicle-selection page (manual entry) - else if (!this.vehiclesFound) { - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, - this.$route - ); - } - // if policy lookup is successful and vehicles are found, navigate to - else { + navigateForward(policy) { + // if policy lookup is successful and vehicles are found, navigate to policy-vehicles page + if (policy && this.vehiclesFound) { this.$router.navigate( this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, this.$route, @@ -288,31 +293,23 @@ export default { this.vehiclesFound ); } + // if policy lookup is successful, but no vehicles are associated with the policy + // navigate to vehicle-selection page (manual entry) + else if (policy && !this.vehiclesFound) { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + this.$route + ); + } + // if policy lookup is unsuccessful, navigate to policy-holder-details page + else { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + this.$route + ); + } }, - - async getVehiclesfromPolicyLookup() - { - //call coverage policy lookup if isCoverageEnabled flag enabled - if (this.isCoverageEnabled){ - const policyLookupResponse = await this.getPolicyLookupResponse(); - if (policyLookupResponse !== null){ - var policy = policyLookupResponse.policies?.[0]; - if (policy !== null){ - //populate policy holder details from policy lookup - this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; - this.mainStore.order.customer.address.city = policy.insureds?.[0]?.city; - this.mainStore.order.customer.address.state = policy.insureds?.[0]?.state; - this.mainStore.order.customer.address.zipCode = policy.insureds?.[0]?.zipCode; - this.mainStore.order.customer.firstName = policy.insureds?.[0]?.firstName; - this.mainStore.order.customer.lastName = policy.insureds?.[0]?.lastName; - - //populate vehicles - this.vehiclesFound = policy.vehicles; - } - } - } - }, - + getWelcomePageModelFromStore() { return { policyNumber: this.mainStore.order.policy.policyNumber, From 3561d85fd9904eeda9c92f8dadecbb4a2ee9d1ee Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Fri, 12 May 2023 14:30:38 -0400 Subject: [PATCH 08/13] updates to welcome-page navigation --- src/layouts/welcome-page/welcome-page.spec.js | 57 ++++++++++++++++--- src/layouts/welcome-page/welcome-page.vue | 46 ++++++++------- 2 files changed, 74 insertions(+), 29 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.spec.js b/src/layouts/welcome-page/welcome-page.spec.js index ae934705..2b858cec 100644 --- a/src/layouts/welcome-page/welcome-page.spec.js +++ b/src/layouts/welcome-page/welcome-page.spec.js @@ -62,13 +62,21 @@ describe("navigation", () => { ]; const { wrapper } = setupMocks({ - policies: [{}] + policies: [{ + vehicles: [ + { + vin: "TEST_VIN" + }, + { + vin: "TEST_VIN2" + } + ] + }] }); await wrapper.setData({ isCoverageEnabled: true, - vehiclesCount: 2, - vehiclesFound: mockvehicles, + zipCodeMatch: true, }); useMainStore().order.policy.policyNumber = "p_0001"; @@ -97,6 +105,7 @@ describe("navigation", () => { isCoverageEnabled: true, vehiclesCount: 0, vehiclesFound: null, + zipCodeMatch: true, }); useMainStore().order.policy.policyNumber = "p_0001"; @@ -116,11 +125,11 @@ describe("navigation", () => { test("if policy is not found, navigate to policy-holder-details page", async () => { // Arrange const { wrapper } = setupMocks({ - policies: undefined + policies: null }); await wrapper.setData({ - isCoverageEnabled : true, + isCoverageEnabled: true, }); useMainStore().order.policy.policyNumber = "p_0001"; @@ -128,7 +137,7 @@ describe("navigation", () => { useMainStore().order.accountNumber = "00000"; // Act - await wrapper.vm.forwardButtonAction(); + await wrapper.vm.navigateForward(); // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( @@ -136,6 +145,31 @@ describe("navigation", () => { undefined ); }); + test("if zip code entered does not match zip on policy, navigate to policy-holder-details page", async () => { + // Arrange + const { wrapper } = setupMocks({ + policies: [{}] + }); + + await wrapper.setData({ + isCoverageEnabled: true, + zipCodeMatch: false, + }); + + useMainStore().order.policy.policyNumber = "p_0001"; + useMainStore().order.policy.dateOfLoss = "2022-01-28"; + useMainStore().order.accountNumber = "00000"; + + // Act + await wrapper.vm.navigateForward(); + + // Assert + expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( + navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + undefined + ); + }); + }); function setupMocks({ @@ -143,15 +177,20 @@ function setupMocks({ pageFooterWidgetCmsContent = {}, mountOptionsMockData = {}, policies = [], - lookupPolicyResponse + getCoveragePolicyInfoResponse }) { useMainStore().getCoveragePolicyInfo = jest.fn().mockImplementation(() => { return Promise.resolve({ - data: lookupPolicyResponse - ? lookupPolicyResponse + data: getCoveragePolicyInfoResponse + ? getCoveragePolicyInfoResponse : { policies: [ { + insureds: [ + { + customerId: "TEST_ID" + }, + ], vehicles: [ { vin: "TEST_VIN" diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 07f06fcb..9af3d612 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -205,6 +205,7 @@ export default { return { welcomePageModel: this.getWelcomePageModelFromStore(), vehiclesFound: [], + zipCodeMatch: false, }; }, setup() { @@ -259,13 +260,18 @@ export default { const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); const policyInfo = policyLookupResultMap.policyLookupResponse; - // if policy lookup fails, move the user forward + // if policy lookup fails, navigate to policy-holder-details page if (!policyInfo) { this.navigateForward(); } const policy = policyInfo.policies?.[0]; - if (policy) { + // get the first 5 digits of the policy zip code + const policyZip = (policy.insureds?.[0]?.zipCode).slice(0, 5); + // check if policy zip enters matches zip on policy + this.zipCodeMatch = policyZip == this.welcomePageModel.policyZipCode; + + if (policy && this.zipCodeMatch) { //populate policy holder details from policy lookup this.mainStore.order.customer.address.streetAddress = policy.insureds?.[0]?.address; this.mainStore.order.customer.address.city = policy.insureds?.[0]?.city; @@ -277,14 +283,29 @@ export default { //populate vehicles this.vehiclesFound = policy.vehicles; } - return this.navigateForward(policy); + return this.navigateForward(policy, this.zipCodeMatch); } return this.navigateForward(); }, - navigateForward(policy) { + navigateForward(policy, zipCodeMatch) { + // if policy lookup is unsuccessful, navigate to policy-holder-details page + if (!policy || !zipCodeMatch) { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + this.$route + ); + } + // if policy lookup is successful, but no vehicles are associated with the policy + // navigate to vehicle-selection page (manual entry) + else if (policy && zipCodeMatch && !this.vehiclesFound) { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + this.$route + ); + } // if policy lookup is successful and vehicles are found, navigate to policy-vehicles page - if (policy && this.vehiclesFound) { + else if (policy && zipCodeMatch && this.vehiclesFound) { this.$router.navigate( this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, this.$route, @@ -293,21 +314,6 @@ export default { this.vehiclesFound ); } - // if policy lookup is successful, but no vehicles are associated with the policy - // navigate to vehicle-selection page (manual entry) - else if (policy && !this.vehiclesFound) { - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, - this.$route - ); - } - // if policy lookup is unsuccessful, navigate to policy-holder-details page - else { - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, - this.$route - ); - } }, getWelcomePageModelFromStore() { From c09f09543fba97f3424f23c53ed35b79c4dd23e5 Mon Sep 17 00:00:00 2001 From: Katie Kroell Date: Mon, 15 May 2023 15:58:46 -0400 Subject: [PATCH 09/13] final updates to welcome-page navigation --- src/layouts/welcome-page/welcome-page.spec.js | 8 ++++---- src/layouts/welcome-page/welcome-page.vue | 10 +++++----- .../router-constants/navigation-scenarios.js | 6 +++--- src/router/router-constants/routing-table.js | 20 +++++++++++-------- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.spec.js b/src/layouts/welcome-page/welcome-page.spec.js index 2b858cec..a27b98c3 100644 --- a/src/layouts/welcome-page/welcome-page.spec.js +++ b/src/layouts/welcome-page/welcome-page.spec.js @@ -88,7 +88,7 @@ describe("navigation", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( - navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, + navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES, undefined, {}, {}, @@ -118,7 +118,7 @@ describe("navigation", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( - navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES, undefined ); }); @@ -141,7 +141,7 @@ describe("navigation", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( - navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, undefined ); }); @@ -165,7 +165,7 @@ describe("navigation", () => { // Assert expect(wrapper.vm.$router.navigate).toHaveBeenCalledWith( - navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, undefined ); }); diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 9af3d612..5e179036 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -260,14 +260,14 @@ export default { const policyLookupResultMap = await settleAllPromises(promisePolicyLookupResultMap); const policyInfo = policyLookupResultMap.policyLookupResponse; - // if policy lookup fails, navigate to policy-holder-details page + // if policy lookup fails, navigate directly to policy-holder-details page if (!policyInfo) { this.navigateForward(); } const policy = policyInfo.policies?.[0]; // get the first 5 digits of the policy zip code - const policyZip = (policy.insureds?.[0]?.zipCode).slice(0, 5); + const policyZip = (policy?.insureds?.[0]?.zipCode)?.slice(0, 5); // check if policy zip enters matches zip on policy this.zipCodeMatch = policyZip == this.welcomePageModel.policyZipCode; @@ -292,7 +292,7 @@ export default { // if policy lookup is unsuccessful, navigate to policy-holder-details page if (!policy || !zipCodeMatch) { this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, this.$route ); } @@ -300,14 +300,14 @@ export default { // navigate to vehicle-selection page (manual entry) else if (policy && zipCodeMatch && !this.vehiclesFound) { this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES, this.$route ); } // if policy lookup is successful and vehicles are found, navigate to policy-vehicles page else if (policy && zipCodeMatch && this.vehiclesFound) { this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, + this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES, this.$route, {}, {}, diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index 0bf7cde1..7c9e90da 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -7,9 +7,9 @@ const navigationScenarios = { MOVE_FORWARD_ENTRY_PAGE: "MOVE_FORWARD_ENTRY_PAGE", // Welcome - CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES: "CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES", - CLICKED_FORWARD_WITH_NO_POLICY: "CLICKED_FORWARD_WITH_NO_POLICY", - CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES: "CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES", + CLICKED_FORWARD_POLICY_UNVERIFIED: "CLICKED_FORWARD_POLICY_UNVERIFIED", + CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES: "CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES", + CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES: "CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES", // YMMS SELECTED_YEAR: "SELECTED_YEAR", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 37520faf..b2aba7a7 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -392,16 +392,20 @@ const routingTable = function(store) { destinationIssPageValue: issPageValues.WELCOME_PAGE }, { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_VEHICLES, - destinationIssPageValue: issPageValues.POLICY_VEHICLES - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_POLICY, + scenario: navigationScenarios.CLICKED_FORWARD, destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS }, { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_POLICY_AND_NO_VEHICLES, + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, + destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_NO_VEHICLES, destinationIssPageValue: issPageValues.VEHICLE_SELECTION + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED_WITH_VEHICLES, + destinationIssPageValue: issPageValues.POLICY_VEHICLES } ] }, @@ -414,12 +418,12 @@ const routingTable = function(store) { }, { scenario: navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, - destinationIssPageValue: issPageValues.VEHICLE_YEAR + destinationIssPageValue: issPageValues.VEHICLE_SELECTION }, { scenario: navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED, destinationIssPageValue: issPageValues.POLICY_VEHICLES - } + }, ] }, { From eb484d07e10b697ed2f6eb9c6e2eb804417c3136 Mon Sep 17 00:00:00 2001 From: sheena Date: Tue, 16 May 2023 15:54:44 +0530 Subject: [PATCH 10/13] SSR-472,471 Fixed the spacings issue --- src/layouts/payment-page/payment-page.vue | 6 +++++- src/layouts/review-page/review-page.vue | 5 ++++- src/layouts/tpa-confirmation/tpa-confirmation.vue | 8 ++++++-- src/layouts/tpa-search/tpa-search.vue | 8 ++++++-- src/layouts/tpa-submit/tpa-submit.vue | 7 ++++++- 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index 6982d394..3ea24265 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -3,7 +3,7 @@
-
+

Placeholder for payment page

diff --git a/src/layouts/review-page/review-page.vue b/src/layouts/review-page/review-page.vue index 6dbb76fe..849f1c51 100644 --- a/src/layouts/review-page/review-page.vue +++ b/src/layouts/review-page/review-page.vue @@ -3,7 +3,7 @@
-
+

Placeholder for review page

\ No newline at end of file diff --git a/src/layouts/tpa-confirmation/tpa-confirmation.vue b/src/layouts/tpa-confirmation/tpa-confirmation.vue index d3157c9f..f5a582dd 100644 --- a/src/layouts/tpa-confirmation/tpa-confirmation.vue +++ b/src/layouts/tpa-confirmation/tpa-confirmation.vue @@ -1,9 +1,9 @@