diff --git a/src/layouts/policy-holder-details/policy-holder-details.vue b/src/layouts/policy-holder-details/policy-holder-details.vue new file mode 100644 index 00000000..b1fb2a8a --- /dev/null +++ b/src/layouts/policy-holder-details/policy-holder-details.vue @@ -0,0 +1,37 @@ + + \ No newline at end of file diff --git a/src/layouts/welcome-page/welcome-page.vue b/src/layouts/welcome-page/welcome-page.vue index 3127e81f..23c6f278 100644 --- a/src/layouts/welcome-page/welcome-page.vue +++ b/src/layouts/welcome-page/welcome-page.vue @@ -214,7 +214,10 @@ }, navigateForward() { - + this.$router.navigate( + this.navigationScenarios.WELCOME_PAGE, + this.$route + ); }, }, computed:{ diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js index d9ac70c4..5f77dd6d 100644 --- a/src/router/router-constants/issPage-values.js +++ b/src/router/router-constants/issPage-values.js @@ -1,5 +1,6 @@ export const issPageValues = { WELCOME_PAGE: "welcome-page", + POLICY_HOLDER_DETAILS: "policy-holder-details", VEHICLE_MAKE: "vehicle-make", VEHICLE_YEAR: "vehicle-year", VEHICLE_MODEL: "vehicle-model", diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index fe2040f3..262af6e7 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -8,6 +8,7 @@ const navigationScenarios = { SELECTED_MAKE: "SELECTED_MAKE", SELECTED_MODEL: "SELECTED_MODEL", SELECTED_STYLE: "SELECTED_STYLE", + WELCOME_PAGE: "WELCOME_PAGE", // Vin selection CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index b832bbab..5346f93b 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -255,58 +255,21 @@ const routingTable = function(store) { destinationIssPageValue: issPageValues.QUOTE, }, ], - }, - { - issPageValue: issPageValues.ADDRESS_LOOKUP, - maps: [ - { - scenario: navigationScenarios.CLICKED_BACK, - destinationIssPageValue: issPageValues.VEHICLE_LOOKUP, - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_MULTIPLE_VEHICLES, - destinationIssPageValue: issPageValues.ADDRESS_VEHICLES, - }, - { - scenario: navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, - destinationIssPageValue: issPageValues.VEHICLE_DAMAGE, - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_PART_QUESTIONS, - destinationIssPageValue: issPageValues.PART_QUESTIONS, - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_MULTIPLE_PARTS_TO_CHOOSE, - destinationIssPageValue: issPageValues.VEHICLE_PARTS, - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOLDING_QUESTIONS, - destinationIssPageValue: issPageValues.MOLDING_QUESTIONS, - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_CAPABILITY_QUESTIONS, - destinationIssPageValue: issPageValues.CAPABILITY_QUESTIONS, - }, - { - scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS, - destinationIssPageValue: issPageValues.QUOTE, - }, - ], - }, - { - issPageValue: issPageValues.WELCOME_PAGE, - maps: [ - { - scenario: navigationScenarios.CLICKED_FORWARD, - destinationIssPageValue: issPageValues.VEHICLE_YEAR, - }, - { - scenario: navigationScenarios.CLICKED_TEST, - destinationUrl: "https://www.google.com" - } - ] - }, - + }, + { + issPageValue: issPageValues.WELCOME_PAGE, + maps: [ + { + scenario: navigationScenarios.CLICKED_BACK, + destinationIssPageValue: issPageValues.WELCOME_PAGE + }, + { + scenario: navigationScenarios.WELCOME_PAGE, + destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS + }, + ], + }, + ]; }; diff --git a/src/router/router.spec.js b/src/router/router.spec.js index c21d2752..42275bf1 100644 --- a/src/router/router.spec.js +++ b/src/router/router.spec.js @@ -15,13 +15,13 @@ describe("Router", () => { it("Should push next view when navigating locally", () => { - let scenario = navigationScenarios.CLICKED_FORWARD; + let scenario = navigationScenarios.WELCOME_PAGE; let currentRoute = { query: { issPage: issPageValues.WELCOME_PAGE }}; router.push = jest.fn(); router.navigate(scenario, currentRoute); - expect(router.push.mock.calls[0][0].query.issPage).toBe(issPageValues.VEHICLE_YEAR); + expect(router.push.mock.calls[0][0].query.issPage).toBe(issPageValues.POLICY_HOLDER_DETAILS); });