@@ -29,7 +51,7 @@ import { errorMessages } from "@/constants/error-messages";
defineRule("first-name-required", required(errorMessages.FIRST_NAME_REQUIRED));
defineRule("last-name-required", required(errorMessages.LAST_NAME_REQUIRED));
defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIRED));
-defineRule("email-address-format", regex(/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+).([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT));
+defineRule("email-address-format", regex(/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT));
export default ({
name: "customer-questions",
diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue
index f21015061..34937bfb7 100644
--- a/src/layouts/address-vehicles/address-vehicles.vue
+++ b/src/layouts/address-vehicles/address-vehicles.vue
@@ -10,7 +10,7 @@
+
{{ copy.split(':')[1].split(',')[1] }}
@@ -240,4 +240,4 @@ export default {
line-height: inherit;
}
}
-
\ No newline at end of file
+
diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js
index 9afd7e39a..281947ae4 100644
--- a/src/layouts/license-plate-lookup/license-plate-lookup.spec.js
+++ b/src/layouts/license-plate-lookup/license-plate-lookup.spec.js
@@ -86,7 +86,6 @@ describe("license-plate-lookup.vue", () => {
//Assert
expect(wrapper.vm.$router.navigate).toHaveBeenCalled();
-
});
});
diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue
index 5e7fdc2c1..38217009d 100644
--- a/src/layouts/license-plate-lookup/license-plate-lookup.vue
+++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue
@@ -8,28 +8,73 @@
@@ -46,56 +91,25 @@ import alert from "@/ux-components/alert/alert";
import textboxQuestion from "@/common-components/textbox-question/textbox-question";
import loadingModal from '@/common-components/loading-modal/loading-modal.vue';
// Supporting files
-import {
- fetchCmsContentForPage
-} from "@/helpers/cms-content-helper";
-import {
- settleAllPromises
-} from "@/helpers/layout-helper";
+import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
+import { settleAllPromises } from "@/helpers/layout-helper";
import store from "@/store";
import baseMixin from "@/mixins/base-mixin.js";
-import {
- storeActions
-} from "@/constants/store-actions";
-import {
- storeMutations
-} from "@/constants/store-mutations";
-import {
- errorMessages
-} from "@/constants/error-messages";
-import {
- navigateAfterSaveToHeritageFunnel
-} from "@/helpers/heritage-integration/navigation-helper";
-import {
- getDamageString,
- isGlassAvailableForCarId,
-} from "@/helpers/damage-helper";
-import {
- required,
- regex,
-} from "@/helpers/validation-rules";
-import {
- Form,
- defineRule,
-} from "vee-validate";
+import { storeActions } from "@/constants/store-actions";
+import { storeMutations } from "@/constants/store-mutations";
+import { errorMessages } from "@/constants/error-messages";
+import { navigateAfterSaveToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
+import { getDamageString, isGlassAvailableForCarId, } from "@/helpers/damage-helper";
+import { required, regex, } from "@/helpers/validation-rules";
+import { Form, defineRule, } from "vee-validate";
// DEFINE VALIDATION RULES
-defineRule(
- "license-plate-required",
- required(errorMessages.LICENSE_PLATE_REQUIRED)
-);
+defineRule("license-plate-required", required(errorMessages.LICENSE_PLATE_REQUIRED));
defineRule("zip-required", required(errorMessages.REGISTRATION_ZIP_REQUIRED));
-defineRule(
- "email-address-required",
- required(errorMessages.EMAIL_ADDRESS_REQUIRED)
-);
-defineRule(
- "email-address-format",
- regex(
- /^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+).([a-zA-Z]{2,})$/,
- errorMessages.EMAIL_ADDRESS_FORMAT
- )
-);
+defineRule("zip-format", regex(/(^\d{5}$)|(^\d{5}-\d{4}$)/, errorMessages.SERVICE_ZIP_FORMAT));
+defineRule("email-address-required", required(errorMessages.EMAIL_ADDRESS_REQUIRED));
+defineRule("email-address-format", regex(/^([a-zA-Z0-9_\-.+]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,})$/, errorMessages.EMAIL_ADDRESS_FORMAT));
+
export default {
name: "license-plate-lookup",
async beforeRouteEnter(to, from, next) {
@@ -188,12 +202,12 @@ export default {
},
attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
- this.pushEventToGA(
+ this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
this.GaLabels.LICENSE_PLATE_LOOKUP,
true
- );
+ );
});
},
getLicensePlateFromStore() {
@@ -212,20 +226,29 @@ export default {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK, this.$route);
},
async forwardButtonAction() {
- const zipValidation = this.serviceZip ?
- await this.validateZip(this.serviceZip) :
- await this.validateZip(this.registrationZip);
- if (!zipValidation.data.isServiceable) {
+
+ //Call zip validation services
+ const registrationZipValidationPromise = this.validateZip(this.registrationZip);
+ const serviceZipValidationPromise = this.serviceZip ? this.validateZip(this.serviceZip) : null;
+ const registrationZipValidationResults = await registrationZipValidationPromise;
+ const serviceZipValidationResults = serviceZipValidationPromise !== null ? (await serviceZipValidationPromise) : registrationZipValidationResults;
+
+ //Handle service zip validations
+ if (!serviceZipValidationResults.data.isServiceable) {
this.$refs.funnelFooter.removeLoader();
this.isVinValid = true;
this.isRegistrationZipServicable = false;
this.isCarIdDifferent = false;
this.zipToDisplay = this.serviceZip ? this.serviceZip : this.registrationZip;
return;
- }
+ } else if (!this.serviceZip) {
+ this.serviceZip = this.registrationZip;
+ }
+
+ //Lookup vin
const vinLookup = await this.lookupVin(
this.licensePlate,
- zipValidation.data.state
+ registrationZipValidationResults.data.state
).catch(() => {
this.$refs.funnelFooter.removeLoader();
this.isVinValid = false;
@@ -235,6 +258,7 @@ export default {
this.isCarIdDifferent =
vinLookup.data.vehicle.carId !== store.getters.vehicle.carId;
+ //Handle changing car
if (
this.isCarIdDifferent &&
vinLookup.data.vehicle.carId !== this.previouslyEnteredCarId
@@ -251,12 +275,15 @@ export default {
return;
}
+ //Save
this.updateCustomerInfo(
vinLookup.data.vin,
vinLookup.data.vehicle,
- zipValidation.data.state
+ registrationZipValidationResults.data.state,
+ serviceZipValidationResults.data.state
);
-
+
+ //Navigate
this.navigateForward();
},
navigateForward() {
@@ -281,12 +308,9 @@ export default {
});
},
lookupVin(plate, state) {
- return baseMixin.methods.dispatchStoreAction(
- storeActions.LOOKUP_VIN_BY_PLATE,
- { licensePlate: plate, licenseState: state }
- );
+ return baseMixin.methods.dispatchStoreAction(storeActions.LOOKUP_VIN_BY_PLATE,{ licensePlate: plate, licenseState: state }, false);
},
- updateCustomerInfo(vin, vehicleInfo, registrationState) {
+ updateCustomerInfo(vin, vehicleInfo, registrationState, serviceState) {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
}
@@ -304,6 +328,7 @@ export default {
store.commit(storeMutations.UPDATE_REGISTRATION_STATE, registrationState);
store.commit(storeMutations.UPDATE_REGISTRATION_ZIP_CODE, this.registrationZip);
store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.serviceZip);
+ store.commit(storeMutations.UPDATE_SERVICE_LOCATION_STATE, serviceState);
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
},
},
@@ -335,4 +360,4 @@ export default {
loadingModal,
},
};
-
\ No newline at end of file
+
diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js
index b722fccbf..0ce0fe085 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.spec.js
+++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js
@@ -18,6 +18,7 @@ import store from "@/store";
import { validate } from "vee-validate";
import { damageLocationsSelected } from "@/constants/damage-locations-selected.js";
import { routerParams } from "@/router/router-constants/router-params";
+import * as cookieHelper from "@/helpers/heritage-integration/cookie-helper";
// Mock our module for promises.
jest.mock("@/helpers/layout-helper.js", () => ({
@@ -29,6 +30,11 @@ jest.mock("@/helpers/cms-content-helper", () => ({
fetchCmsContentForPage: jest.fn(),
}));
+// Mock getFunnelCookie
+jest.mock("@/helpers/heritage-integration/cookie-helper", () => ({
+ getFunnelCookie: jest.fn(),
+}));
+
// Mock Store
jest.mock("@/store", () => ({
commit: jest.fn(),
@@ -653,6 +659,10 @@ describe("vehicle-damage.vue", () => {
})
});
+describe("vehicle-damage.vue wasDelayedClaimRegistration", () => {
+ test.todo("if wasDelayedClaimRegistration, should hide back button")
+});
+
// THE FOLLOWING TEST IS NOT NECESSARILY REQUIRED FOR COVERAGE
// BUT KEEP FOR AN EXAMPLE OF A VALIDATION TEST
//
@@ -741,6 +751,7 @@ function setupMocks({pageHeaderWidgetHeaderText, mountOptionsMockData}) {
settleAllPromises.mockImplementation(() => apiPromise);
fetchCmsContentForPage.mockImplementation(() => Promise.resolve());
+ cookieHelper.getFunnelCookie = jest.spyOn(cookieHelper, "getFunnelCookie").mockReturnValue({});
//Mock damage initialize methods
damageLocationQuestion.methods = {
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index ddeae5bec..d4e44feb7 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -32,7 +32,7 @@
:selectedDamageLocations="selectedDamageLocations"
/>
-
@@ -56,10 +56,10 @@ defineRule("windshield-chip-count-required", required(errorMessages.WINDSHIELD_C
defineRule("windshield-replace-options-required", required(errorMessages.WINSHIELD_REPLACE_OPTIONS_REQUIRED));
defineRule("check-for-repair-and-replace", (value, [otherFieldValue]) => {
- if (value.toString().toUpperCase().includes(damageLocationsSelected.REPAIR.toUpperCase()) &&
- otherFieldValue.toString().toUpperCase().includes(damageLocationsSelected.WINDSHIELD.toUpperCase()) &&
- Array.isArray(otherFieldValue) &&
- otherFieldValue.length > 1)
+ if (value.toString().toUpperCase().includes(damageLocationsSelected.REPAIR.toUpperCase()) &&
+ otherFieldValue.toString().toUpperCase().includes(damageLocationsSelected.WINDSHIELD.toUpperCase()) &&
+ Array.isArray(otherFieldValue) &&
+ otherFieldValue.length > 1)
{
return false;
}
@@ -72,8 +72,8 @@ defineRule("repair-only", (value) => {
return false;
});
defineRule("prevent-split-and-single-together", (value) => {
- if (value.toString().toUpperCase().includes(damageLocationsSelected.SINGLE.toUpperCase()) &&
- (value.toString().toUpperCase().includes(damageLocationsSelected.DRIVER.toUpperCase()) ||
+ if (value.toString().toUpperCase().includes(damageLocationsSelected.SINGLE.toUpperCase()) &&
+ (value.toString().toUpperCase().includes(damageLocationsSelected.DRIVER.toUpperCase()) ||
value.toString().toUpperCase().includes(damageLocationsSelected.PASSENGER.toUpperCase())))
{
return false;
@@ -145,7 +145,7 @@ export default ({
}
},
isWindshieldDamageLocation() {
- return this.selectedDamageLocations.some(selectedDamages =>
+ return this.selectedDamageLocations.some(selectedDamages =>
{
return Boolean(selectedDamages.toUpperCase() === "WINDSHIELD");
});
@@ -193,4 +193,4 @@ export default ({
alert,
},
})
-
\ No newline at end of file
+
diff --git a/src/layouts/vehicle-make/vehicle-make.vue b/src/layouts/vehicle-make/vehicle-make.vue
index 9e75d7036..aecd90a6f 100644
--- a/src/layouts/vehicle-make/vehicle-make.vue
+++ b/src/layouts/vehicle-make/vehicle-make.vue
@@ -88,6 +88,10 @@ export default {
store.commit(storeMutations.UPDATE_STYLE, null);
store.commit(storeMutations.UPDATE_CAR_ID, null);
store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null);
// Invokes
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
diff --git a/src/layouts/vehicle-model/vehicle-model.vue b/src/layouts/vehicle-model/vehicle-model.vue
index 66516a729..c661c824e 100644
--- a/src/layouts/vehicle-model/vehicle-model.vue
+++ b/src/layouts/vehicle-model/vehicle-model.vue
@@ -88,6 +88,10 @@ export default {
store.commit(storeMutations.UPDATE_STYLE, null);
store.commit(storeMutations.UPDATE_CAR_ID, null);
store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null);
// Invokes
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue
index 4f756b600..c7589d32d 100644
--- a/src/layouts/vehicle-style/vehicle-style.vue
+++ b/src/layouts/vehicle-style/vehicle-style.vue
@@ -101,6 +101,7 @@ export default {
store.commit(storeMutations.UPDATE_IS_REPAIR, null);
store.commit(storeMutations.UPDATE_NUMBER_OF_CHIPS, null);
store.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, []);
+ store.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
},
},
diff --git a/src/layouts/vehicle-year/vehicle-year.vue b/src/layouts/vehicle-year/vehicle-year.vue
index ddca6b8bd..1041f82ae 100644
--- a/src/layouts/vehicle-year/vehicle-year.vue
+++ b/src/layouts/vehicle-year/vehicle-year.vue
@@ -107,8 +107,11 @@ export default {
store.commit(storeMutations.UPDATE_STYLE, null);
store.commit(storeMutations.UPDATE_CAR_ID, null);
store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_VIN, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null);
+ store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null);
-
// Invokes
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
store.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES);
diff --git a/src/layouts/vin-lookup/vin-information/vin-information.vue b/src/layouts/vin-lookup/vin-information/vin-information.vue
index 3e5b67a91..91cee616f 100644
--- a/src/layouts/vin-lookup/vin-information/vin-information.vue
+++ b/src/layouts/vin-lookup/vin-information/vin-information.vue
@@ -41,6 +41,9 @@ export default {
font-size: .875rem;
color: $gray-600;
}
+ li {
+ line-height: 26px;
+ }
a {
font-size: .875rem;
}
@@ -70,6 +73,7 @@ export default {
overflow: hidden;
opacity: 0;
img {
+ max-width: 420px;
width: 117%;
height: auto;
}
diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue
index f6c3b5ecb..6c0f305b5 100644
--- a/src/layouts/vin-lookup/vin-lookup.vue
+++ b/src/layouts/vin-lookup/vin-lookup.vue
@@ -14,7 +14,7 @@
/>
-
+
-
+
@@ -41,7 +42,7 @@
mask="#####"
isRequired
disableAutoFill
- validationRules="zip-required"
+ validationRules="zip-required|zip-format"
/>
@@ -54,34 +55,35 @@
isRequired
disableAutoFill
validationRules="email-address-required|email-address-format"
+ semiAggressiveValidation
/>
0,
};
},
+ mounted() {
+ this.attachCustomEvents();
+ },
+ watch: {
+ vin() {
+ this.vinNotFound = false;
+ this.$refs.funnelFooter.updateButtonText(
+ this.getCmsContent("FunnelFooterWidget", "ForwardButtonText")
+ );
+ }
+ },
computed: {
perfectMatchNewVinAlert() {
const isVinPerfectMatch = this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore();
- if (isVinPerfectMatch) {
- this.isCarIdDifferent = false;
- }
+ this.updateIsCarIdDifferent(isVinPerfectMatch);
return isVinPerfectMatch;
},
MatchedDifferentVehicleAlertHeader(){
@@ -236,7 +238,7 @@ export default {
getIsWindshieldOnly())
},
isVinFieldReadOnly(){
- return this.$store.getters.payment.insuranceCoverage.isVerified;
+ return this.$store.getters.payment.insuranceCoverage.isVerified || getFunnelCookie().HasDelayedClaimRegistration;
},
},
methods: {
@@ -259,16 +261,21 @@ export default {
getZipFromStore(){
return store.getters.order.serviceLocation.zipCode;
},
- attachCustomEvents() {
+ attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
- this.GaLabels.VINLOOKUP,
+ this.GaLabels.VIN_LOOKUP,
true
);
});
},
+ updateIsCarIdDifferent(isVinPerfectMatch){
+ if (isVinPerfectMatch) {
+ this.isCarIdDifferent = false;
+ }
+ },
backButtonAction() {
if (store.getters.vehicle.vin) {
this.$router.navigate(this.navigationScenarios.CLICKED_BACK_WITH_VIN, this.$route);
@@ -307,7 +314,7 @@ export default {
this.isCarIdDifferent = true;
return;
}
- this.updateStore(vehicleLookupResponse.data);
+ this.updateStore(vehicleLookupResponse.data, zipValidationResponse.data);
this.navigateForward();
},
navigateForward(){
@@ -331,7 +338,7 @@ export default {
{ vin }
);
},
- updateStore(carInfo) {
+ updateStore(carInfo, zipInfo) {
if(this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle){
store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES);
}
@@ -346,6 +353,7 @@ export default {
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, carInfo.imageVifNumber);
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, carInfo.imageVifNumber);
store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.zip);
+ store.commit(storeMutations.UPDATE_SERVICE_LOCATION_STATE, zipInfo.state);
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
},
},
diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js
index d13e1b222..ca5a24a3e 100644
--- a/src/mixins/analytics-mixin.js
+++ b/src/mixins/analytics-mixin.js
@@ -9,12 +9,18 @@ import baseMixin from "@/mixins/base-mixin";
export default {
methods: {
logPageView(pageEvent) {
+ // if the user does not have a session id from the content site, do not log.
+ const sid = getSessionIdValue();
+ if (sid === '00000000-0000-0000-0000-000000000000' || sid == null) {
+ return;
+ }
+
const currentPageName = getPageNameByQueryString();
var payload = {
userId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(),
pageName: currentPageName,
- sessionId: getSessionIdValue(),
+ sessionId: sid,
action: '',
event: pageEvent,
shouldUseSessionId: true,
@@ -24,12 +30,18 @@ export default {
},
logCustomEvent(category, action, label, value) {
+ // if the user does not have a session id from the content site, do not log.
+ const sid = getSessionIdValue();
+ if (sid === '00000000-0000-0000-0000-000000000000' || sid == null) {
+ return;
+ }
+
const currentPageName = getPageNameByQueryString();
var payload = {
userId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(),
pageName: currentPageName,
- sessionId: getSessionIdValue(),
+ sessionId: sid,
category: category,
action: action,
label: label,
@@ -97,8 +109,9 @@ export default {
},
prependActionToMethod(object, method, actionToPrepend) {
- const baseMethod = object[method.name];
- object[method.name] = function () {
+ const baseMethodName = method.name.startsWith('bound ') ? method.name.substring(6) : method.name ;
+ const baseMethod = object[baseMethodName];
+ object[baseMethodName] = function () {
actionToPrepend.apply(this, arguments);
return baseMethod.apply(object, arguments);
};
diff --git a/src/mixins/analytics-mixin.spec.js b/src/mixins/analytics-mixin.spec.js
index e63778466..db773da56 100644
--- a/src/mixins/analytics-mixin.spec.js
+++ b/src/mixins/analytics-mixin.spec.js
@@ -1,5 +1,5 @@
import analyticsMixin from "@/mixins/analytics-mixin";
-import { setupMocksForJsFiles } from "@/helpers/unit-test-helper.js";
+import { setupMocksForJsFiles, setupCookies } from "@/helpers/unit-test-helper.js";
import { storeActions } from "@/constants/store-actions";
describe("analyticsMixin.js", () => {
@@ -14,6 +14,12 @@ describe("analyticsMixin.js", () => {
}
const mocks = setupMocksForJsFiles(mockData);
+ const testCookieValue = {
+ sid: '10000000-0000-0000-0000-000000000001'
+ }
+
+ setupCookies({ funnelCookieValue: JSON.stringify(testCookieValue) });
+
analyticsMixin.methods.logPageView(type, payload);
expect(mocks.baseMixin.methods.dispatchStoreAction).toBeCalled();
@@ -107,4 +113,17 @@ describe("analyticsMixin.js", () => {
}]);
});
+
+ test("Obj is not null after action prepended", () => {
+ //Arrange
+ const obj = {baseMethodName:"testMethodName", data:"testData"};
+ const method = {name:"testMethodName", data:"testData" }
+ const action = "testAction";
+
+ //Act
+ analyticsMixin.methods.prependActionToMethod(obj, method, action);
+
+ //Assert
+ expect(obj!=null);
+ });
});
\ No newline at end of file
diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js
index d8df53281..d0474d67b 100644
--- a/src/mixins/base-mixin.js
+++ b/src/mixins/base-mixin.js
@@ -42,6 +42,10 @@ export default {
el && el.focus();
}
},
+ getFooterInfoBoxHeight() {
+ const footerInfoBox = document.querySelector(".footer #infoBox");
+ return footerInfoBox ? footerInfoBox.offsetHeight : 0;
+ }
},
computed: {
storeActions() {
diff --git a/src/router/index.js b/src/router/index.js
index f11bd4228..c8d614d48 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -21,6 +21,7 @@ import analyticsMixin from "@/mixins/analytics-mixin";
// Components
import ComponentTest from "@/layouts/component-test/component-test.vue";
import FormTest from "@/layouts/form-test/form-test.vue";
+import Modal from "@/common-components/loading-modal/loading-modal.vue";
const routes = [
@@ -34,6 +35,11 @@ const routes = [
name: "FormTest",
component: FormTest,
},
+ {
+ path: "/loading-modal", // This is a temporary route for testing.
+ name: "Modal",
+ component: Modal,
+ },
{
path: "/",
name: "root",
@@ -126,7 +132,7 @@ const router = createRouter({
router.afterEach(async (to, from) => {
// Push page view to GA
analyticsMixin.methods.pushPageViewToGA(to.query[queryStrings.FMG_PAGE]);
-
+
baseMixin.methods.dispatchStoreAction(storeActions.GET_EXPERIMENTS_BY_USER, { userId: getDeviceIdValue() })
.then( (response) => {
analyticsMixin.methods.pushExperimentsToDataLayer(response.data);
@@ -214,13 +220,6 @@ function navigateToUrl(url, optionalQuery = {}) {
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
}
- /////////////////////////////////////////////////////
- // TEMP CODE FOR TESTING WITH SPECIFIC EXPERIMENTS //
- /////////////////////////////////////////////////////
- if (externalUrl.search.indexOf("corid=") != -1)
- externalUrl.search = externalUrl.search + '&experiments=CollectEmailOnQuote=CollectEmailOnQuote_V1=YesCollectEmail_TEST1=true,RemoveServiceAreaPage=ServAreaRemoval_V7=ServAreaNoRemove_V7_TEST=true,VINeducationV2=VINeducation_V2=NoShowVINmodalV2_CONTROL=true,ServicePackages=ServicePackages_V1=NoShowPackages_CONTROL=true,PhotoUploadRedesign=PhotoUploadRedesign_V1=CurrentPhotoUpload_CONTROL=true,ScheduleDetailsServiceType=ScheduleBeforeServiceType_V1=ServTypeThenSched_CONTROL=true';
- ///////////// END TEMP CODE /////////////////////////
-
window.location.assign(externalUrl);
}
@@ -278,4 +277,4 @@ function resetDependentState(component) {
return component.default.methods.resetDependentState();
}
-export default router;
\ No newline at end of file
+export default router;
diff --git a/src/store/index.js b/src/store/index.js
index 69f6c2ba0..814ca2d5b 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -153,6 +153,9 @@ export const mutations = {
updateServiceLocationZipCode(state, serviceLocationZip){
state.order.serviceLocation.zipCode = serviceLocationZip;
},
+ updateServiceLocationState(state, serviceLocationState){
+ state.order.serviceLocation.state = serviceLocationState;
+ },
updateRegistrationFirstName(state, firstName){
state.order.vehicle.registration.firstName = firstName;
},
@@ -190,6 +193,10 @@ export const mutations = {
state.order.vehicle.style = null;
state.order.vehicle.carId = null;
state.order.vehicle.category = null;
+ state.order.vehicle.vin = null;
+ state.order.vehicle.imageUrl = null;
+ state.order.vehicle.imageVifNumber = null;
+ state.order.vehicle.imageColor = null;
},
resetDamageState(state) {
state.order.damage.isRepair = null;
@@ -566,9 +573,9 @@ export const actions = {
state: order.serviceLocation.state,
zipCode: order.serviceLocation.zipCode
},
- referralNumber: order.referralNumber,
+ referralNumber: order.referralNumber?.toString(), // TODO It'd be nice to save these as strings in the first place
referralDate: order.referralDate,
- accountNumber: order.accountNumber
+ accountNumber: order.accountNumber?.toString()
},
});
},
@@ -578,10 +585,10 @@ export const actions = {
method: endpoints.LoadOrder.method,
endpoint: endpoints.LoadOrder.url,
payload: {
- referralNumber: referralNumber,
+ referralNumber: referralNumber?.toString(),
referralDate: referralDate,
referralCorrelationId: referralCorrelationId,
- accountNumber: accountNumber
+ accountNumber: accountNumber?.toString()
},
}).then((response) => {
context.commit(storeMutations.RESET_STATE);
diff --git a/src/styles/common-animations.scss b/src/styles/common-animations.scss
index e247f3ded..c03c267ab 100644
--- a/src/styles/common-animations.scss
+++ b/src/styles/common-animations.scss
@@ -12,11 +12,11 @@
}
.route-fade-enter-active .fade-on-route-transition {
- transition: opacity 0.8s ease;
+ transition: opacity 0.2s ease-out; //This duration should be kept in sync with the app.vue element attribute
}
.route-fade-leave-active .fade-on-route-transition {
- transition: opacity 0.3s ease;
+ transition: opacity 0.2s ease-in; //This duration should be kept in sync with the app.vue element attribute
}
.route-fade-enter-from .fade-on-route-transition,
diff --git a/src/styles/common-error-styles.scss b/src/styles/common-error-styles.scss
index 369c39a0e..95985f7c4 100644
--- a/src/styles/common-error-styles.scss
+++ b/src/styles/common-error-styles.scss
@@ -1,8 +1,9 @@
html {
.has-error {
&.list-button,
- &.list-card,
+ &.list-card,
&.list-card.list-button {
+ border: none;
color: $red;
input[type=checkbox]:focus + label,
input[type=radio]:focus + label {
@@ -13,15 +14,16 @@ html {
}
&:hover {
box-shadow: 0px 0px 0px 4px $red-200;
- border-radius: 10px;
+ border-radius: .5rem;
}
label {
- border: 1px solid $red;
+ border: 1px solid $red;
+ border-radius: .5rem;
}
label:hover {
box-shadow: 0px 0px 0px 4px $red-200;
border-radius: 10px;
- border: 1px solid $red;
+ border: 1px solid $red;
}
}
&.list-button-horizontal {
@@ -51,12 +53,21 @@ html {
}
&.textbox-question,
&.dropdown-question {
+ input:hover {
+ box-shadow: 0px 0px 0px 4px $red-200;
+ border-radius: .5rem;
+ border: 1px solid $red;
+ }
+ input:focus {
+ box-shadow: 0 0 0 2.5px $red;
+ }
p {
color: $red;
}
input,
select {
- border: 1px solid $red;
+ border: 1px solid transparent;
+ box-shadow: 0 0 0 1px $red;
&:focus {
border: 1px solid transparent;
}
@@ -77,12 +88,14 @@ html {
border: 1px solid $gray-500;
input:not(:focus) {
+ label {
+ border: none;
box-shadow: 0 0 0 1px $gray-500;
border-radius: .5rem;
}
}
input:checked:focus {
+ label {
+ border: none;
box-shadow: 0 0 0 2.5px $blue;
border-radius: .5rem;
}
@@ -114,8 +127,6 @@ html {
color: $red;
font-size: .875rem;
font-weight: 500;
- height: 1.5rem;
- margin-top: .25rem !important;
}
.form-test-invalid {
@@ -129,7 +140,6 @@ html {
&.btn.btn-primary:hover,
&.btn.btn-primary:focus,
&.btn.btn-primary:focus-visible {
- color: $gray !important;
background: $gray-200;
box-shadow: none;
}
diff --git a/src/ux-components/alert/alert.spec.js b/src/ux-components/alert/alert.spec.js
index 6f4bb9822..59becf922 100644
--- a/src/ux-components/alert/alert.spec.js
+++ b/src/ux-components/alert/alert.spec.js
@@ -66,6 +66,7 @@ describe("alert.vue", () => {
const mockMixin = {
methods: {
- getCmsContent: jest.fn()
+ getCmsContent: jest.fn(),
+ getFooterInfoBoxHeight: jest.fn(()=> 80),
}
}
\ No newline at end of file
diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue
index 8170a69a6..5c0d7a270 100644
--- a/src/ux-components/alert/alert.vue
+++ b/src/ux-components/alert/alert.vue
@@ -5,15 +5,17 @@
:class="[isDismissible ? 'alert-dismissible' : '', this.alertClass]"
>
{{ alertHeadline }}
-
-
-
- {{ copy.split(':')[1].split(',')[1] }}
-
-
-
-
-
+
+
+
+
+
+
+ {{ getRouterLinkDisplayTextFromCopy(copy) }}
+
+
+
+