Merge branch 'release/2022.12.08' into rlsmerge/2022.12.08-to-develop
This commit is contained in:
commit
9bf2733a81
10 changed files with 177 additions and 60 deletions
6
src/assets/img/icons/ccpa-icon.svg
Normal file
6
src/assets/img/icons/ccpa-icon.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 30 14" viewBox="0 0 30 14">
|
||||
<path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#fff"/>
|
||||
<path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#06f"/>
|
||||
<path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill:#fff"/>
|
||||
<path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill:#06f"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 865 B |
|
|
@ -35,32 +35,15 @@
|
|||
<div class="bar3"></div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header visually-hidden">
|
||||
<h5 class="modal-title" id="footerModalLabel">Footer Navigation</h5>
|
||||
</div>
|
||||
<div class="modal-body d-flex flex-column">
|
||||
<textLink
|
||||
linkType="navigation"
|
||||
text="Terms of use"
|
||||
href="https://www.safelite.com/terms-of-use"
|
||||
target="_blank" />
|
||||
<textLink
|
||||
linkType="navigation"
|
||||
text="Privacy policy"
|
||||
href="https://www.safelite.com/safelite-group-privacy-policy"
|
||||
target="_blank" />
|
||||
<textLink
|
||||
linkType="navigation"
|
||||
text="Do not sell my information"
|
||||
href="https://privacyportal-cdn.onetrust.com/dsarwebform/d3b95a93-e22e-4d4d-a806-482052406557/9e371601-eae3-4338-9430-b90b9036022b.html"
|
||||
target="_blank" />
|
||||
</div>
|
||||
<div class="modal-footer d-flex justify-content-start">
|
||||
© {{ new Date().getFullYear() }} Safelite Group
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body d-flex flex-column">
|
||||
<textLink linkType="navigation" text="Terms of use" href="//www.safelite.com/terms-of-use" target="_blank" />
|
||||
<textLink linkType="navigation" text="Your privacy choices" href="//www.safelite.com/privacy-center" target="_blank">
|
||||
<template v-slot:after-text>
|
||||
<img class="ccpa-icon" src="~@/assets/img/icons/ccpa-icon.svg" alt="Your privacy choices"/>
|
||||
</template>
|
||||
</textLink>
|
||||
<textLink linkType="navigation" text="Warranty" href="//www.safelite.com/national-lifetime-warranty" target="_blank" />
|
||||
<textLink linkType="navigation" text="Notice at collection" href="https://privacyportal-cdn.onetrust.com/dsarwebform/d3b95a93-e22e-4d4d-a806-482052406557/9e371601-eae3-4338-9430-b90b9036022b.html" target="_blank" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,15 @@ const storeActions = {
|
|||
GET_HOMEPAGE_NAME: "getHomepageName",
|
||||
GET_PAGE_DATA: "getPageData",
|
||||
|
||||
// Vehicle Actions
|
||||
GET_VEHICLE_YEARS: "getVehicleYears",
|
||||
GET_VEHICLE_MAKES: "getVehicleMakes",
|
||||
GET_VEHICLE_MODELS: "getVehicleModels",
|
||||
GET_VEHICLE_STYLES: "getVehicleStyles",
|
||||
SET_VEHICLE: "setVehicle",
|
||||
GET_DAMAGE_OPTIONS: "getDamageOptions",
|
||||
GET_EVOX_IMAGE: "getEvoxImage",
|
||||
// Vehicle Actions
|
||||
GET_VEHICLE_YEARS: "getVehicleYears",
|
||||
GET_VEHICLE_MAKES: "getVehicleMakes",
|
||||
GET_VEHICLE_MODELS: "getVehicleModels",
|
||||
GET_VEHICLE_STYLES: "getVehicleStyles",
|
||||
SET_VEHICLE: "setVehicle",
|
||||
GET_DAMAGE_OPTIONS: "getDamageOptions",
|
||||
GET_EVOX_IMAGE: "getEvoxImage",
|
||||
IS_VIN_OPTIONAL_VEHICLE: "isVinOptionalVehicle",
|
||||
|
||||
// Lookup Actions
|
||||
LOOKUP_VEHICLE_BY_YMMS: "lookupVehicleByYmms",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
|||
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
|
||||
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||
import { storeActions } from "@/constants/store-actions.js";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import store from "@/store";
|
||||
import router from "@/router";
|
||||
|
||||
|
|
@ -72,6 +74,17 @@ async function getLatestPageForRedirection() {
|
|||
fmgPageValues.CAPABILITY_QUESTIONS
|
||||
);
|
||||
|
||||
const vinOptionalVehiclePromise = store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
|
||||
const promiseResultMap = [
|
||||
{
|
||||
resultKey: "vinOptionalOptions",
|
||||
promise: vinOptionalVehiclePromise,
|
||||
},
|
||||
];
|
||||
const resultMap = await settleAllPromises(promiseResultMap);
|
||||
|
||||
var isVinOptionalVehicle = resultMap.vinOptionalOptions;
|
||||
|
||||
if (!vehicleMakeComponent.methods.arePagePrerequisitesValid()) {
|
||||
return fmgPageValues.VEHICLE_YEAR;
|
||||
} else if (!vehicleModelComponent.methods.arePagePrerequisitesValid()) {
|
||||
|
|
@ -91,10 +104,8 @@ async function getLatestPageForRedirection() {
|
|||
return fmgPageValues.VEHICLE_PARTS;
|
||||
} else if (partQuestionsComponent.methods.arePagePrerequisitesValid()) {
|
||||
return fmgPageValues.PART_QUESTIONS;
|
||||
} else if (
|
||||
vinLookupComponent.methods.arePagePrerequisitesValid() &&
|
||||
!store.getters.damage.isRepair
|
||||
) {
|
||||
}
|
||||
else if (vinLookupComponent.methods.arePagePrerequisitesValid() && !store.getters.damage.isRepair && !isVinOptionalVehicle) {
|
||||
return fmgPageValues.VIN_LOOKUP;
|
||||
} else {
|
||||
return fmgPageValues.ESTIMATE;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {
|
|||
import * as orderHelper from "@/helpers/heritage-integration/order-helper";
|
||||
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
import { storeMutations } from "@/constants/store-mutations";
|
||||
import { setupMocksForJsFiles, getMockOrderInfo } from "@/helpers/unit-test-helper.js";
|
||||
import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
||||
import { queryStrings } from "@/constants/query-strings";
|
||||
|
|
@ -25,6 +26,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: false,
|
||||
|
|
@ -43,6 +47,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -62,6 +69,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -82,6 +92,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -103,6 +116,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -125,6 +141,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -152,6 +171,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -179,6 +201,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -206,6 +231,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -233,6 +261,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -260,6 +291,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
query: {},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Mock out the lazy load calls for all components.
|
||||
mockLazyLoadComponentReturnValues({
|
||||
[fmgPageValues.VEHICLE_MAKE]: true,
|
||||
|
|
@ -289,6 +323,9 @@ describe("getPageToRouteExistingOrderTo", () => {
|
|||
},
|
||||
};
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
// Act
|
||||
const result = await getPageToRouteExistingOrderTo(toRoute, true);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ describe("estimate.vue", () => {
|
|||
selectedVinLookupMethod: vinLookupMethodSelections.MANUALVIN,
|
||||
});
|
||||
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, false );
|
||||
store.commit( storeMutations.UPDATE_MAKE, "acura" );
|
||||
|
||||
//Act
|
||||
await wrapper.vm.forwardButtonAction();
|
||||
|
||||
|
|
@ -216,8 +219,22 @@ describe("estimate.vue", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("skipVinLookup", () => {
|
||||
const skipOptions = [[true, true, true],
|
||||
[true, false, true],
|
||||
[false, true, true],
|
||||
[false, false, false]];
|
||||
test.each(skipOptions)("isRepair %s and isVinOptional %s should return %s", async (isRepair, isVinOptionalVehicle, expectedVinSkip) => {
|
||||
const { wrapper } = setupMocks({ isVinOptionalVehicle: isVinOptionalVehicle});
|
||||
store.commit( storeMutations.UPDATE_IS_REPAIR, isRepair);
|
||||
|
||||
expect(wrapper.vm.skipVinLookup).toEqual(expectedVinSkip);
|
||||
});
|
||||
});
|
||||
|
||||
function setupMocks({
|
||||
groupName = "estimate",
|
||||
isVinOptionalVehicle = false,
|
||||
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" },
|
||||
|
|
@ -249,6 +266,7 @@ function setupMocks({
|
|||
mountOptions["attachTo"] = document.body;
|
||||
|
||||
const wrapper = shallowMount(estimate, mountOptions);
|
||||
wrapper.vm.isVinOptionalVehicle = isVinOptionalVehicle;
|
||||
|
||||
return { wrapper, apiPromise };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<vehicleBanner cmsWidgetName="VehicleBannerWidget" />
|
||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
|
||||
<div class="fade-on-route-transition sub-container make-tall">
|
||||
<div v-if="!isRepair">
|
||||
<div v-if="!skipVinLookup">
|
||||
<alert
|
||||
class="vinLookupMethodHeading"
|
||||
cmsWidgetName="AlertVinLookupQuestion"
|
||||
|
|
@ -125,6 +125,7 @@ export default {
|
|||
emailAddress: this.getEmailFromStore(),
|
||||
displayInvalidZipAlert: false,
|
||||
displayNonServiceableZipAlert: false,
|
||||
isVinOptionalVehicle: false,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -170,7 +171,7 @@ export default {
|
|||
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||
},
|
||||
async forwardButtonAction() {
|
||||
if (this.isRepair) {
|
||||
if (this.skipVinLookup){
|
||||
const zipCodeData = await this.getZipCodeData(this.serviceZipCode);
|
||||
//todo: validation
|
||||
await this.dispatchStoreAction(storeActions.SAVE_EMAIL, this.emailAddress, false);
|
||||
|
|
@ -241,6 +242,9 @@ export default {
|
|||
isRepair() {
|
||||
return store.getters.damage.isRepair;
|
||||
},
|
||||
skipVinLookup() {
|
||||
return this.isRepair || this.isVinOptionalVehicle;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
serviceZipCode() {
|
||||
|
|
|
|||
|
|
@ -1316,6 +1316,26 @@ export const actions = {
|
|||
!sortedPreviousResultsArray?.every(
|
||||
(x, i) => x.partNum === sortedMoldingQuestionAnswersArray[i].partNum
|
||||
);
|
||||
|
||||
isVinOptionalVehicle(context){
|
||||
switch((context.state.order.vehicle.make).toLowerCase()) {
|
||||
case "mercedes benz":
|
||||
case "volkswagen":
|
||||
case "audi":
|
||||
case "porsche":
|
||||
return true;
|
||||
default:
|
||||
}
|
||||
|
||||
if ((context.state.order.vehicle.make).toLowerCase() === "ford" && context.state.order.vehicle.year >= 2018)
|
||||
return true;
|
||||
|
||||
if ((context.state.order.vehicle.make).toLowerCase() === "bmw" && context.state.order.vehicle.year <= 2017)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (haveMoldingQuestionAnswersChanged) {
|
||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, null);
|
||||
|
|
|
|||
|
|
@ -2711,3 +2711,28 @@ describe("Getters", () => {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("isVinOptionalVehicle", () => {
|
||||
const testVehicles = [["2017", "acura", false],
|
||||
["2017", "ford", false],
|
||||
["2018", "ford", true],
|
||||
["2018", "bmw", false],
|
||||
["2017", "bmw", true],
|
||||
["2016", "bmw", true],
|
||||
["2016", "mercedes benz", true],
|
||||
["2016", "volkswagen", true],
|
||||
["2016", "audi", true],
|
||||
["2016", "porsche", true]];
|
||||
test.each(testVehicles)("%s %s should skip vin lookup is %s", async (year, make, expectedVinSkip) => {
|
||||
const context = state;
|
||||
|
||||
context.state = {
|
||||
order: {
|
||||
vehicle: { year: year, make: make}
|
||||
}
|
||||
};
|
||||
|
||||
var vinOptionalResult = actions.isVinOptionalVehicle(context);
|
||||
expect(vinOptionalResult).toEqual(expectedVinSkip);
|
||||
});
|
||||
});
|
||||
|
|
@ -1,19 +1,8 @@
|
|||
<template>
|
||||
<a v-if="linkType === 'navigation'" @click="handleClick" class="navigation-link" :href="href">{{
|
||||
text
|
||||
}}</a>
|
||||
<a
|
||||
v-else-if="linkType === 'footer'"
|
||||
@click="handleClick"
|
||||
class="footer-link"
|
||||
:href="href"
|
||||
target="_blank"
|
||||
>{{ text }}</a
|
||||
>
|
||||
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{
|
||||
text
|
||||
}}</a>
|
||||
<a v-else-if="linkType === 'text'" @click="handleClick" :href="href">{{ text }}</a>
|
||||
<a v-if="linkType === 'navigation'" @click="handleClick" class="navigation-link" :href="href">{{text}}<slot name="after-text"></slot></a>
|
||||
<a v-else-if="linkType === 'footer'" @click="handleClick" class="footer-link" :href="href" target="_blank">{{text}}<slot name="after-text"></slot></a>
|
||||
<a v-else-if="linkType === 'textSmall'" @click="handleClick" class="small" :href="href">{{text}}<slot name="after-text"></slot></a>
|
||||
<a v-else-if="linkType === 'text'" @click="handleClick" :href="href">{{text}}<slot name="after-text"></slot></a>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -42,12 +31,35 @@ export default {
|
|||
|
||||
<style lang="scss">
|
||||
a {
|
||||
display: inline-flex !important;
|
||||
color: $blue;
|
||||
text-underline-offset: 0.5em;
|
||||
display: inline-flex !important;
|
||||
color: $blue;
|
||||
text-underline-offset: 0.5em;
|
||||
line-height: 26px;
|
||||
padding: 0 0 4px 0;
|
||||
font-weight: 500;
|
||||
max-width: fit-content;
|
||||
&:hover {
|
||||
color: $blue-700;
|
||||
}
|
||||
&.small {
|
||||
line-height: 24px;
|
||||
&:hover {
|
||||
color: $blue-700;
|
||||
}
|
||||
}
|
||||
&.navigation-link {
|
||||
color: $black;
|
||||
line-height: 26px;
|
||||
padding: 0 0 4px 0;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
}
|
||||
&.footer-link {
|
||||
color: $gray-600;
|
||||
text-decoration: none;
|
||||
line-height: 20px;
|
||||
padding: 0 0 2px 0;
|
||||
font-weight: 400;
|
||||
font-size: 0.75rem;
|
||||
&:hover {
|
||||
color: $blue-700;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue