Merge 'develop' into feature/digital/SSR-179
This commit is contained in:
commit
68731cac91
6 changed files with 60 additions and 55 deletions
37
src/layouts/policy-holder-details/policy-holder-details.vue
Normal file
37
src/layouts/policy-holder-details/policy-holder-details.vue
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
<template>
|
||||||
|
<Form @submit="onSubmit" @invalid-submit="onInvalidSubmit" ref="theForm" v-slot="{ meta }" >
|
||||||
|
<div class="page-container-grouped-styles overflow-auto welcome">
|
||||||
|
<div class="fade-on-route-transition">
|
||||||
|
<siteHeader cmsWidgetName="SiteHeaderWidget"/>
|
||||||
|
<siteSubHeader cmsWidgetName="SiteSubHeaderWidget"/>
|
||||||
|
<div class="row mt-4">
|
||||||
|
<div class="col">
|
||||||
|
<span>PlaceHolder for policy holder details</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
// Components
|
||||||
|
import siteHeader from '@/common-components/site-header/site-header';
|
||||||
|
import siteSubHeader from '@/common-components/site-sub-header/site-sub-header';
|
||||||
|
|
||||||
|
// Supporting files
|
||||||
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
|
import { Form, defineRule } from "vee-validate";
|
||||||
|
import { required, regex } from "@/helpers/validation-rules";
|
||||||
|
import { errorMessages } from "@/constants/error-messages";
|
||||||
|
import BaseFormMixin from '@/mixins/base-form-mixin.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "policy-holder-details",
|
||||||
|
components: {
|
||||||
|
siteHeader,
|
||||||
|
siteSubHeader,
|
||||||
|
Form,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -214,7 +214,10 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateForward() {
|
navigateForward() {
|
||||||
|
this.$router.navigate(
|
||||||
|
this.navigationScenarios.WELCOME_PAGE,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
export const issPageValues = {
|
export const issPageValues = {
|
||||||
WELCOME_PAGE: "welcome-page",
|
WELCOME_PAGE: "welcome-page",
|
||||||
|
POLICY_HOLDER_DETAILS: "policy-holder-details",
|
||||||
VEHICLE_MAKE: "vehicle-make",
|
VEHICLE_MAKE: "vehicle-make",
|
||||||
VEHICLE_YEAR: "vehicle-year",
|
VEHICLE_YEAR: "vehicle-year",
|
||||||
VEHICLE_MODEL: "vehicle-model",
|
VEHICLE_MODEL: "vehicle-model",
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ const navigationScenarios = {
|
||||||
SELECTED_MAKE: "SELECTED_MAKE",
|
SELECTED_MAKE: "SELECTED_MAKE",
|
||||||
SELECTED_MODEL: "SELECTED_MODEL",
|
SELECTED_MODEL: "SELECTED_MODEL",
|
||||||
SELECTED_STYLE: "SELECTED_STYLE",
|
SELECTED_STYLE: "SELECTED_STYLE",
|
||||||
|
WELCOME_PAGE: "WELCOME_PAGE",
|
||||||
|
|
||||||
// Vin selection
|
// Vin selection
|
||||||
CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN",
|
CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN",
|
||||||
|
|
|
||||||
|
|
@ -255,58 +255,21 @@ const routingTable = function(store) {
|
||||||
destinationIssPageValue: issPageValues.QUOTE,
|
destinationIssPageValue: issPageValues.QUOTE,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
issPageValue: issPageValues.ADDRESS_LOOKUP,
|
issPageValue: issPageValues.WELCOME_PAGE,
|
||||||
maps: [
|
maps: [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_BACK,
|
scenario: navigationScenarios.CLICKED_BACK,
|
||||||
destinationIssPageValue: issPageValues.VEHICLE_LOOKUP,
|
destinationIssPageValue: issPageValues.WELCOME_PAGE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_FORWARD_WITH_MULTIPLE_VEHICLES,
|
scenario: navigationScenarios.WELCOME_PAGE,
|
||||||
destinationIssPageValue: issPageValues.ADDRESS_VEHICLES,
|
destinationIssPageValue: issPageValues.POLICY_HOLDER_DETAILS
|
||||||
},
|
},
|
||||||
{
|
],
|
||||||
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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@ describe("Router", () => {
|
||||||
|
|
||||||
|
|
||||||
it("Should push next view when navigating locally", () => {
|
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 }};
|
let currentRoute = { query: { issPage: issPageValues.WELCOME_PAGE }};
|
||||||
|
|
||||||
router.push = jest.fn();
|
router.push = jest.fn();
|
||||||
|
|
||||||
router.navigate(scenario, currentRoute);
|
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);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue