From 121dd208d878c5e0122b66d6d903a32d93a371d6 Mon Sep 17 00:00:00 2001 From: saumyaChaturvedi123 <108388239+saumyaChaturvedi123@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:00:32 +0530 Subject: [PATCH 01/11] SSR-383 policy number disabling functionality --- src/layouts/welcome-page/welcome-page.vue | 35 +++++++++++++++++++++++ src/store/index.js | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 2054987e..8dd2b15c 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -14,6 +14,7 @@ isRequired ref="policyNumber" disableAutoFill + :isDisabled="this.isClientPassed" validationRules="policy-number-required" /> @@ -166,6 +167,7 @@ import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { useMainStore } from '@/store'; +import { issPageValues } from "@/router/router-constants/issPage-values" //define validation rules defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED)); @@ -233,6 +235,16 @@ export default { methods: { async forwardButtonAction() { + if (this.isClientPassed) + { + //if disabled state is broken maliciously and policy number is changed, do not update new policy number + if (this.welcomePageModel.policyNumber != this.mainStore.order.policy.policyNumber) + { + this.welcomePageModel.policyNumber = this.mainStore.order.policy.policyNumber + } + this.mainStore.order.policy.IsPolicyNumberDisabled = true; + } + this.mainStore.updatePolicyData(this.welcomePageModel); return this.navigateForward(); }, @@ -351,7 +363,30 @@ export default { else{ return true; } + }, + isClientPassed() + { + + const visitedPolicyHolderPage = this.mainStore.pageData(issPageValues.POLICY_HOLDER_DETAILS) ? true : false; + + if(this.mainStore.issConfig.isAuthenticated) + { + if (!visitedPolicyHolderPage){ //checking if the page is loaded for the first time + if(this.mainStore.order.policy.policyNumber ) + { + return true; + } + }else + { + if (this.mainStore.order.policy.IsPolicyNumberDisabled) + { + return true; + } + } + } } + + }, components: { siteHeader, diff --git a/src/store/index.js b/src/store/index.js index eec2a8c4..14b434e0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -47,7 +47,8 @@ const getDefaultState = () => { damageCause: null, damageState: null, damageCity: null, - isDamageGlassOnly: null + isDamageGlassOnly: null, + isPolicyNumberDisabled: false }, customer: { address: { @@ -814,6 +815,7 @@ export const useMainStore = defineStore({ this.order.policy.isDamageGlassOnly = welcomePageModel?.isDamageGlassOnly; this.order.customer.phoneNumber = welcomePageModel?.phoneNumber; this.order.customer.emailAddress = welcomePageModel?.email; + this.order.policy.isPolicyNumberDisabled = welcomePageModel?.isPolicyNumberDisabled; }, updatePolicyHolderDetails(customerQuestions) { From 91729e94c16cf06fcec7e929f2689026195797f2 Mon Sep 17 00:00:00 2001 From: saumyaChaturvedi123 <108388239+saumyaChaturvedi123@users.noreply.github.com> Date: Tue, 25 Apr 2023 20:40:36 +0530 Subject: [PATCH 02/11] SSR-383 update variable casing --- 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 8dd2b15c..30430731 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -242,7 +242,7 @@ export default { { this.welcomePageModel.policyNumber = this.mainStore.order.policy.policyNumber } - this.mainStore.order.policy.IsPolicyNumberDisabled = true; + this.mainStore.order.policy.isPolicyNumberDisabled = true; } this.mainStore.updatePolicyData(this.welcomePageModel); @@ -378,7 +378,7 @@ export default { } }else { - if (this.mainStore.order.policy.IsPolicyNumberDisabled) + if (this.mainStore.order.policy.isPolicyNumberDisabled) { return true; } From 0e31a589aba544b0782568f9657dbf2d33c2a306 Mon Sep 17 00:00:00 2001 From: Kroell Date: Wed, 26 Apr 2023 14:27:46 -0400 Subject: [PATCH 03/11] fix spacing on service-location --- src/layouts/service-location/service-location.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index f5652c18..b40a01d9 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -28,7 +28,8 @@ buttonTypeString="listCard" isRequired v-model="selectedAppointmentType" - validationRules="selection-required"/> + validationRules="selection-required" + class="service-location-button-question"/>
@@ -224,7 +225,6 @@ export default { .page-container-grouped-styles { overflow: auto; } - .modal-open { .page-container-grouped-styles { overflow: hidden; @@ -266,4 +266,9 @@ export default { padding-left: 0rem !important; } } +.service-location-button-question { + .question-text { + margin-top: 1.5rem; + } +} From 8a487f2db01bc9c6b727b9311b0fd0622a767561 Mon Sep 17 00:00:00 2001 From: saumyaChaturvedi123 <108388239+saumyaChaturvedi123@users.noreply.github.com> Date: Thu, 27 Apr 2023 15:34:19 +0530 Subject: [PATCH 04/11] SSR 383 refactored logic with update requirements --- src/layouts/welcome-page/welcome-page.vue | 30 ++++++----------------- src/store/index.js | 2 +- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 30430731..858288dd 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -237,12 +237,7 @@ export default { async forwardButtonAction() { if (this.isClientPassed) { - //if disabled state is broken maliciously and policy number is changed, do not update new policy number - if (this.welcomePageModel.policyNumber != this.mainStore.order.policy.policyNumber) - { - this.welcomePageModel.policyNumber = this.mainStore.order.policy.policyNumber - } - this.mainStore.order.policy.isPolicyNumberDisabled = true; + this.welcomePageModel.isPolicyNumberDisabled = "true"; } this.mainStore.updatePolicyData(this.welcomePageModel); @@ -265,6 +260,7 @@ export default { isDamageGlassOnly : this.mainStore.order.policy.isDamageGlassOnly, phoneNumber : this.mainStore.order.customer.phoneNumber, email : this.mainStore.order.customer.emailAddress, + isPolicyNumberDisabled: this.mainStore.order.policy.isPolicyNumberDisabled, } }, }, @@ -366,24 +362,14 @@ export default { }, isClientPassed() { - - const visitedPolicyHolderPage = this.mainStore.pageData(issPageValues.POLICY_HOLDER_DETAILS) ? true : false; - + const visitedPolicyHolderPage = this.mainStore.pageData(issPageValues.POLICY_HOLDER_DETAILS) ? true : false; + if(this.mainStore.issConfig.isAuthenticated) - { - if (!visitedPolicyHolderPage){ //checking if the page is loaded for the first time - if(this.mainStore.order.policy.policyNumber ) - { - return true; - } - }else - { - if (this.mainStore.order.policy.isPolicyNumberDisabled) - { - return true; - } + if ((!visitedPolicyHolderPage && this.mainStore.order.policy.policyNumber) || this.mainStore.order.policy.isPolicyNumberDisabled ) + { + return true; } - } + return false; } diff --git a/src/store/index.js b/src/store/index.js index 14b434e0..eb65b52d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -48,7 +48,7 @@ const getDefaultState = () => { damageState: null, damageCity: null, isDamageGlassOnly: null, - isPolicyNumberDisabled: false + isPolicyNumberDisabled: null }, customer: { address: { From 600e582378e5695e6d680285947f056428f3225c Mon Sep 17 00:00:00 2001 From: Kroell Date: Thu, 27 Apr 2023 11:36:51 -0400 Subject: [PATCH 05/11] reduce size of header logo --- src/iss-components/site-header/site-header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iss-components/site-header/site-header.vue b/src/iss-components/site-header/site-header.vue index 75a82bef..7ae691e1 100644 --- a/src/iss-components/site-header/site-header.vue +++ b/src/iss-components/site-header/site-header.vue @@ -96,6 +96,6 @@ export default({ } #siteHeaderImage { - height: 2.5rem; + height: 1.5rem; } From e6d23b6339ea2ba04a3653842171dda3eaa6b1ba Mon Sep 17 00:00:00 2001 From: Jason Wheeler Date: Thu, 27 Apr 2023 12:37:12 -0400 Subject: [PATCH 06/11] Updated method of disabling policy number field based on conversation with Jeremy --- src/layouts/entry-page/entry-page.vue | 1 + src/layouts/welcome-page/welcome-page.vue | 84 +++-------------------- src/store/index.js | 8 ++- 3 files changed, 14 insertions(+), 79 deletions(-) diff --git a/src/layouts/entry-page/entry-page.vue b/src/layouts/entry-page/entry-page.vue index c1a2d011..238978fa 100644 --- a/src/layouts/entry-page/entry-page.vue +++ b/src/layouts/entry-page/entry-page.vue @@ -143,6 +143,7 @@ { case "policynumber": this.mainStore.order.policy.policyNumber = value; + this.mainStore.issConfig.disabledFields.policyNumber = true; break; case "lossdate": diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 858288dd..3757e2e4 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -14,7 +14,7 @@ isRequired ref="policyNumber" disableAutoFill - :isDisabled="this.isClientPassed" + :isDisabled="isPolicyHolderEnabled" validationRules="policy-number-required" />
@@ -108,7 +108,7 @@ v-model="welcomePageModel.damageState" ref="state" inputId="8fdf9dc2e13e430eb57529499dceb3eb" - :options="stateOptions" + :options="getStates" validationRules="loss-state-required" isRequired disableAutoFill @@ -167,7 +167,7 @@ import { required, regex } from "@/helpers/validation-rules"; import { errorMessages } from "@/constants/error-messages"; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { useMainStore } from '@/store'; -import { issPageValues } from "@/router/router-constants/issPage-values" +import { states } from "@/constants/states" //define validation rules defineRule("loss-date-required", required(errorMessages.LOSS_DATE_REQUIRED)); @@ -235,11 +235,6 @@ export default { methods: { async forwardButtonAction() { - if (this.isClientPassed) - { - this.welcomePageModel.isPolicyNumberDisabled = "true"; - } - this.mainStore.updatePolicyData(this.welcomePageModel); return this.navigateForward(); }, @@ -286,63 +281,6 @@ export default { { return this.getCmsContent("GlassOnlyQuestion", "QuestionText"); }, - stateOptions: { - get: function () { - return { - AL: "Alabama", - AK: "Alaska", - AZ: "Arizona", - AR: "Arkansas", - CA: "California", - CO: "Colorado", - CT: "Connecticut", - DE: "Delaware", - DC: "District Of Columbia", - FL: "Florida", - GA: "Georgia", - HI: "Hawaii", - ID: "Idaho", - IL: "Illinois", - IN: "Indiana", - IA: "Iowa", - KS: "Kansas", - KY: "Kentucky", - LA: "Louisiana", - ME: "Maine", - MD: "Maryland", - MA: "Massachusetts", - MI: "Michigan", - MN: "Minnesota", - MS: "Mississippi", - MO: "Missouri", - MT: "Montana", - NE: "Nebraska", - NV: "Nevada", - NH: "New Hampshire", - NJ: "New Jersey", - NM: "New Mexico", - NY: "New York", - NC: "North Carolina", - ND: "North Dakota", - OH: "Ohio", - OK: "Oklahoma", - OR: "Oregon", - PA: "Pennsylvania", - RI: "Rhode Island", - SC: "South Carolina", - SD: "South Dakota", - TN: "Tennessee", - TX: "Texas", - UT: "Utah", - VT: "Vermont", - VA: "Virginia", - WA: "Washington", - WV: "West Virginia", - WI: "Wisconsin", - WY: "Wyoming", - }; - }, - }, displayDamageCityQuestion(){ return !!this.getCmsContent("DamageCityQuestion","QuestionText"); }, @@ -360,19 +298,13 @@ export default { return true; } }, - isClientPassed() + getStates() { + return states; + }, + isPolicyHolderEnabled() { - const visitedPolicyHolderPage = this.mainStore.pageData(issPageValues.POLICY_HOLDER_DETAILS) ? true : false; - - if(this.mainStore.issConfig.isAuthenticated) - if ((!visitedPolicyHolderPage && this.mainStore.order.policy.policyNumber) || this.mainStore.order.policy.isPolicyNumberDisabled ) - { - return true; - } - return false; + return !!this.mainStore.issConfig.disabledFields.policyNumber; } - - }, components: { siteHeader, diff --git a/src/store/index.js b/src/store/index.js index eb65b52d..ebdc829c 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -48,7 +48,6 @@ const getDefaultState = () => { damageState: null, damageCity: null, isDamageGlassOnly: null, - isPolicyNumberDisabled: null }, customer: { address: { @@ -105,7 +104,10 @@ const getDefaultState = () => { isAuthenticated: false, // Indicates if user is authenticated or not. enableTPAFlow: false, // Indicates if the TPA flow is supported for this client. returnURL: null, - returnURL2: null + returnURL2: null, + disabledFields: { + policyNumber: null + } } }; }; @@ -717,6 +719,7 @@ export const useMainStore = defineStore({ this.issConfig.enableTPAFlow = false; this.issConfig.returnURL = null; this.issConfig.returnURL2 = null; + this.issConfig.disabledFields.policyNumber = null; }, updateVehicleYear(year) { @@ -815,7 +818,6 @@ export const useMainStore = defineStore({ this.order.policy.isDamageGlassOnly = welcomePageModel?.isDamageGlassOnly; this.order.customer.phoneNumber = welcomePageModel?.phoneNumber; this.order.customer.emailAddress = welcomePageModel?.email; - this.order.policy.isPolicyNumberDisabled = welcomePageModel?.isPolicyNumberDisabled; }, updatePolicyHolderDetails(customerQuestions) { From 350f6fd3119be9f69453e4c2b1a0b7aa79f89036 Mon Sep 17 00:00:00 2001 From: Kroell Date: Thu, 27 Apr 2023 15:10:47 -0400 Subject: [PATCH 07/11] redo change to header logo size --- src/iss-components/site-header/site-header.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iss-components/site-header/site-header.vue b/src/iss-components/site-header/site-header.vue index 7ae691e1..75a82bef 100644 --- a/src/iss-components/site-header/site-header.vue +++ b/src/iss-components/site-header/site-header.vue @@ -96,6 +96,6 @@ export default({ } #siteHeaderImage { - height: 1.5rem; + height: 2.5rem; } From 379a8c7cec90f78fcab98e641cf89b4244fbb76f Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 28 Apr 2023 17:57:27 +0530 Subject: [PATCH 08/11] SSR-394 Implement policy lookup call and populate the vehicles --- src/constants/endpoints.js | 6 +- .../policy-holder-details.spec.js | 74 ++++++++++++++++++- .../policy-holder-details.vue | 50 ++++++++++--- .../policy-vehicles-question.vue | 10 ++- .../policy-vehicles/policy-vehicles.vue | 28 ++++++- src/router/router-constants/issPage-values.js | 3 +- .../router-constants/navigation-scenarios.js | 2 +- src/router/router-constants/routing-table.js | 6 +- src/store/index.js | 20 +++++ 9 files changed, 180 insertions(+), 19 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 416c6394..ca2c297f 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -121,7 +121,11 @@ const endpoints = { IsVinbyAddressPermissible:{ url:'/vehicle/api/v1/vehicle/is-vin-by-address-permissible', method:'Get' - } + }, + CoveragePolicyInfo: { + url: '/coverage/api/v1/coverage/get-policy-information', + method: 'POST' +} }; export { endpoints }; diff --git a/src/layouts/policy-holder-details/policy-holder-details.spec.js b/src/layouts/policy-holder-details/policy-holder-details.spec.js index c6b84096..38fd58ea 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.spec.js +++ b/src/layouts/policy-holder-details/policy-holder-details.spec.js @@ -6,7 +6,8 @@ import { shallowMount } from '@vue/test-utils'; import { settleAllPromises } from "@/helpers/layout-helper.js"; import { fetchCmsContentForPage } from "@/helpers/cms-content-helper"; import { getMountOptions } from "@/helpers/unit-test-helper.js"; - +import { useMainStore } from "@/store"; +import { navigationScenarios } from "@/router/router-constants/navigation-scenarios"; // Mock our module for promises. jest.mock("@/helpers/layout-helper.js", () => ({ @@ -65,8 +66,9 @@ describe("navigation", () => { customerQuestions: { addressQuestions: mockRegistrationAddress, }, + isCoverageEnabled:false }); - + wrapper.vm.navigateForward = jest.fn(); // Act @@ -76,6 +78,53 @@ describe("navigation", () => { expect(wrapper.vm.navigateForward).toHaveBeenCalled(); }); + + test("if the coverage policy verified navigate forward to policy-vehicle page", async () => { + // Arrange + const mockRegistrationAddress = { + streetAddress: "1234 Main St", + city: "Columbus", + state: "OH", + zipCode: "43215", + }; + + const { wrapper } = setupMocks(); + + await wrapper.setData({ + firstName: "KK", + lastName:"KK", + customerQuestions: { + addressQuestions: mockRegistrationAddress, + }, + isCoverageEnabled : true, + }); + const vehiclesFound = [{ + vehicles:[ + { + vin: "TEST_VIN", + }, + { + vin: "TEST_VIN2", + } + ]}]; + + 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_POLICY_VERIFIED, + undefined, + {}, + {}, + vehiclesFound + ); + + }); }); @@ -97,8 +146,29 @@ function setupMocks() }) ); + const policies = [{ + vehicles:[ + { + vin: "TEST_VIN", + }, + { + vin: "TEST_VIN2", + } + ] + }, +]; + useMainStore().getCoveragePolicyInfo = jest.fn().mockImplementation(() => { + return Promise.resolve({ + data: { + policies:policies, + }, + }) + }) const apiResponses = { + policyLookupResponse:{ + policies:policies + } }; settleAllPromises.mockImplementation(() => apiResponses); diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue index 1de675b1..324babc7 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.vue +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -97,17 +97,44 @@ export default { this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route); }, - forwardButtonAction() - { - this.mainStore.updatePolicyHolderDetails(this.customerQuestions); - return this.navigateForward(); + async forwardButtonAction() + { + this.mainStore.updatePolicyHolderDetails(this.customerQuestions); + //call coverage policy lookup if isCoverageEnabled flag enabled + var vehiclesFound = {}; + if(this.isCoverageEnabled){ + 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); + vehiclesFound = policyLookupResultMap.policyLookupResponse?.policies; + } + return this.navigateForward(vehiclesFound); }, - navigateForward() { - this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_POLICY_HOLDER_DETAILS, - this.$route - ); + navigateForward(vehiclesFound) { + if(vehiclesFound?.length > 0) + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_POLICY_VERIFIED, + this.$route, + {}, + {}, + vehiclesFound + ); + else + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD_POLICY_HOLDER_DETAILS, + this.$route + ); }, getPolicyHolderDetailsFromStore() { return { @@ -124,6 +151,11 @@ export default { } }, }, + computed:{ + isCoverageEnabled(){ + return this.mainStore.issConfig.isCoverageEnabled; + } + }, components: { siteHeader, siteSubHeader, diff --git a/src/layouts/policy-vehicles/policy-vehicles-question/policy-vehicles-question.vue b/src/layouts/policy-vehicles/policy-vehicles-question/policy-vehicles-question.vue index a69fb31c..8e862b6b 100644 --- a/src/layouts/policy-vehicles/policy-vehicles-question/policy-vehicles-question.vue +++ b/src/layouts/policy-vehicles/policy-vehicles-question/policy-vehicles-question.vue @@ -3,24 +3,28 @@ :questionText="questionText" ref="policyVehiclesQuestion" buttonTypeString="listButton" - isOverflowScrollable + isOverflowScrollable :answers="answers" isRequired /> From 26e177116056ada580f9280ac968c74e90e22d0c Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 28 Apr 2023 19:50:34 +0530 Subject: [PATCH 11/11] navigationScenarios optimised navigationScenarios optimised --- .../policy-holder-details/policy-holder-details.vue | 2 +- src/layouts/welcome-page/welcome-page.vue | 2 +- src/router/router-constants/navigation-scenarios.js | 8 +++++--- src/router/router-constants/routing-table.js | 4 ++-- src/router/router.spec.js | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue index 324babc7..6a75e5b7 100644 --- a/src/layouts/policy-holder-details/policy-holder-details.vue +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -132,7 +132,7 @@ export default { ); else this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_POLICY_HOLDER_DETAILS, + this.navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, this.$route ); }, diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 3757e2e4..737c636c 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -241,7 +241,7 @@ export default { navigateForward() { this.$router.navigate( - this.navigationScenarios.CLICKED_FORWARD_WELCOME_PAGE, + this.navigationScenarios.CLICKED_FORWARD, this.$route ); }, diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index 7bdb0f02..f0a0c871 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -10,10 +10,12 @@ const navigationScenarios = { SELECTED_YEAR: "SELECTED_YEAR", SELECTED_MAKE: "SELECTED_MAKE", SELECTED_MODEL: "SELECTED_MODEL", - SELECTED_STYLE: "SELECTED_STYLE", - CLICKED_FORWARD_WELCOME_PAGE: "CLICKED_FORWARD_WELCOME_PAGE", - CLICKED_FORWARD_POLICY_HOLDER_DETAILS: "CLICKED_FORWARD_POLICY_HOLDER_DETAILS", + SELECTED_STYLE: "SELECTED_STYLE", + + //Policy Holder Details + CLICKED_FORWARD_POLICY_UNVERIFIED: "CLICKED_FORWARD_POLICY_UNVERIFIED", CLICKED_FORWARD_POLICY_VERIFIED: "CLICKED_FORWARD_POLICY_VERIFIED", + // Vehicle Damage CLICKED_FORWARD_WITH_REPAIR: 'CLICKED_FORWARD_WITH_REPAIR', diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 30df077c..b8681067 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -375,7 +375,7 @@ const routingTable = function(store) { destinationIssPageValue: issPageValues.WELCOME_PAGE }, { - scenario: navigationScenarios.CLICKED_FORWARD_WELCOME_PAGE, + scenario: navigationScenarios.CLICKED_FORWARD, destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS } ] @@ -388,7 +388,7 @@ const routingTable = function(store) { destinationIssPageValue: issPageValues.WELCOME_PAGE }, { - scenario: navigationScenarios.CLICKED_FORWARD_POLICY_HOLDER_DETAILS, + scenario: navigationScenarios.CLICKED_FORWARD_POLICY_UNVERIFIED, destinationIssPageValue: issPageValues.VEHICLE_YEAR }, { diff --git a/src/router/router.spec.js b/src/router/router.spec.js index 67962988..92301ca9 100644 --- a/src/router/router.spec.js +++ b/src/router/router.spec.js @@ -15,7 +15,7 @@ describe("Router", () => { it("Should push next view when navigating locally", () => { - let scenario = navigationScenarios.CLICKED_FORWARD_WELCOME_PAGE; + let scenario = navigationScenarios.CLICKED_FORWARD; let currentRoute = { query: { issPage: issPageValues.WELCOME_PAGE }}; router.push = jest.fn();