+
diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue
index c5aec920c..137dda687 100644
--- a/src/layouts/vehicle-style/vehicle-style.vue
+++ b/src/layouts/vehicle-style/vehicle-style.vue
@@ -96,7 +96,10 @@ export default {
);
},
arePagePrerequisitesValid() {
- return store.getters.vehicle.model !== null;
+ if(store.getters.vehicle.model){
+ return true;
+ }
+ return false;
},
resetDependentState() {
// Invokes
diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js
index f54909d06..e7f188589 100644
--- a/src/mixins/base-mixin.js
+++ b/src/mixins/base-mixin.js
@@ -2,7 +2,6 @@ import store from "@/store";
import { storeActions } from "@/constants/store-actions.js";
import { storeMutations } from "@/constants/store-mutations.js";
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
-import { widgetNames } from "@/constants/widget-names.js";
import { vehicleCategories } from "@/constants/vehicle-categories.js";
export default {
@@ -44,9 +43,6 @@ export default {
navigationScenarios() {
return navigationScenarios;
},
- widgetNames() {
- return widgetNames;
- },
vehicleCategories() {
return vehicleCategories;
},
diff --git a/src/mixins/base-mixin.spec.js b/src/mixins/base-mixin.spec.js
index d32163469..48af9a7c0 100644
--- a/src/mixins/base-mixin.spec.js
+++ b/src/mixins/base-mixin.spec.js
@@ -1,6 +1,5 @@
import baseMixin from "@/mixins/base-mixin";
import { storeActions } from "@/constants/store-actions.js";
-import { widgetNames } from "@/constants/widget-names.js";
import { storeMutations } from "@/constants/store-mutations.js";
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
import { vehicleCategories } from "@/constants/vehicle-categories.js";
@@ -67,18 +66,6 @@ describe("baseMixin.js", () => {
// Assert
expect(navigationScenariosForTest).toEqual(navigationScenarios);
});
-
- test("computed: widgetNames should be equal to import object", () => {
- // Arrange
- const mixIn = getMixInInstance({});
-
- // Act
- let widgetNamesForTest = mixIn.computed.widgetNames();
-
- // Assert
- expect(widgetNamesForTest).toEqual(widgetNames);
- });
-
test("computed: vehicleCategories should be equal to import object", () => {
// Arrange
const mixIn = getMixInInstance({});
@@ -131,7 +118,6 @@ function getMixInInstance({ isDispatchSuccess = true }) {
const baseMixIn = baseMixin;
baseMixIn.methods.$route = route;
baseMixIn.methods.storeActions = storeActions;
- baseMixIn.methods.widgetNames = widgetNames;
baseMixIn.methods.vehicleCategories = vehicleCategories;
store.dispatch = storeDispatch;
diff --git a/src/router/index.js b/src/router/index.js
index be434e9d8..eef9d4b23 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,19 +1,23 @@
// Supporting files
import { createWebHistory, createRouter } from "vue-router";
import { storeActions } from "@/constants/store-actions";
-import baseMixin from "@/mixins/base-mixin";
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
import { routingTable } from "@/router/router-constants/routing-table.js";
import { globalEvents, globalEventTypes } from "@/constants/events";
+
+// Heritage integration
+import { isSavedSessionStillActive } from "@/helpers/heritage-integration/session-helper";
+import { updateOrCreateConceptCookie,getConceptCookie } from "@/helpers/heritage-integration/cookie-helper";
+import { loadOrderIfPresent, saveOrder } from "@/helpers/heritage-integration/order-helper";
+import { getPageToRouteExistingOrderTo, navigateToHeritageFunnel} from "@/helpers/heritage-integration/navigation-helper";
+
+import baseMixin from "@/mixins/base-mixin";
import eventBus from "@/helpers/event-bus/event-bus";
import store from "@/store";
// Components
import ComponentTest from "@/layouts/component-test/component-test.vue";
-import AddressPOC from "@/layouts/address-poc/address-poc.vue";
import FormTest from "@/layouts/form-test/form-test.vue";
-import NestedRadio from "@/layouts/nested-radio-poc/nested-radio.vue";
-import buttonQuestionExamples from "@/layouts/button-question-examples/button-question-examples.vue"
const routes = [
{
@@ -26,26 +30,6 @@ const routes = [
name: "FormTest",
component: FormTest,
},
- {
- path: "/address-poc", // This is a temporary route for testing.
- name: "AddressPOC",
- component: AddressPOC,
- },
- {
- path: "/form-test", // This is a temporary route for testing.
- name: "FormTest",
- component: FormTest,
- },
- {
- path: "/nested-radio", // This is a temporary route for testing.
- name: "NestedRadio",
- component: NestedRadio,
- },
- {
- path: "/button-question-examples", // This is a temporary route for testing.
- name: "buttonQuestionExamples",
- component: buttonQuestionExamples,
- },
{
path: "/",
name: "root",
@@ -55,9 +39,35 @@ const routes = [
await GoToFunnelStartOn404(next);
} else {
try {
+
+ // If the saved session has timed out, clear the session, execute 404 logic.
+ if (!isSavedSessionStillActive()) {
+ await GoToFunnelStartOn404(next);
+ }
+
+ // Process concept funnel cookie.
+ updateOrCreateConceptCookie();
+
+ // On entering the concept funnel "fresh", read cookie information, decide what to do next.
+ if (from.redirectedFrom === undefined) {
+ const loadOrderResponse = await loadOrderIfPresent();
+ const pageToRedirectTo = await getPageToRouteExistingOrderTo(to, loadOrderResponse);
+
+ // If getPageToRouteExistingOrderTo determines that the return user needs to
+ // go back to heritage funnel, send them there and stop our current navigation.
+ if (pageToRedirectTo === 'heritage') {
+ await navigateToHeritageFunnel();
+ return next(false);
+ }
+
+ // Assign our fmgPage so it will load normally like the other pages.
+ to.query.fmgPage = pageToRedirectTo;
+
+ console.log("Page to redirect to: ", pageToRedirectTo);
+ }
+
// If we already have our route, go to it.
if (router.hasRoute(to.query.fmgPage)) {
-
// Since our route is already in scope, we can grab the component from it and call the arePagePrerequisitesValid function.
let component = router.getRoutes().filter((x) => x.name === to.query.fmgPage)[0].components;
@@ -123,10 +133,14 @@ router.navigateAfterSave = (scenario, currentRoute, optionalQuery = {}, optional
navigate(scenario, currentRoute, true, optionalQuery, optionalParams, optionalPageData);
}
+router.navigateToExternalUrl = (url, optionalQuery = {}) => {
+ navigateToUrl(url, optionalQuery);
+}
+
// PRIVATE FUNCTIONS
// Navigate to the next route, depending on the scenario.
-function navigate(scenario, currentRoute, invalidateOnSave, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) {
+async function navigate(scenario, currentRoute, invalidateOnSave, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) {
if (!scenario) {
console.error("No scenario provided. Please review the routing table.");
return;
@@ -134,8 +148,9 @@ function navigate(scenario, currentRoute, invalidateOnSave, optionalQuery = {},
// Match our maps up and navigate if we have a destination.
const matchingScenarioMap = getNavigationMap(scenario, currentRoute);
+ const destinationFmgPageValue = matchingScenarioMap.destinationFmgPageValue;
- if (matchingScenarioMap.destinationFmgPageValue !== undefined) {
+ if (destinationFmgPageValue !== undefined) {
// We're always pushing the same path, just changing query strings. Make sure our optional query strings get combined with our fmgPage one.
// If we need to do invalidation
@@ -146,17 +161,22 @@ function navigate(scenario, currentRoute, invalidateOnSave, optionalQuery = {},
}
// Append page data to the store for the NEXT page, if any. It will be an empty object if none is provided.
- baseMixin.methods.savePageDataToStore(matchingScenarioMap.destinationFmgPageValue, optionalPageData);
+ baseMixin.methods.savePageDataToStore(destinationFmgPageValue, optionalPageData);
+
+ // if cookie and referralNumber/Date exists
+ if (getConceptCookie()?.ReferralNumber && getConceptCookie()?.ReferralDate) {
+ await saveOrder();
+ }
router.push({
name: "root",
query: Object.assign(optionalQuery, {
- fmgPage: matchingScenarioMap.destinationFmgPageValue,
+ fmgPage: destinationFmgPageValue,
}),
- params: optionalParams,
+ params: optionalParams
});
} else if (matchingScenarioMap.destinationUrl !== undefined) {
- navigateToUrl(matchingScenarioMap.destinationUrl);
+ navigateToUrl(matchingScenarioMap.destinationUrl, optionalQuery);
}
}
@@ -177,9 +197,15 @@ function getNavigationMap(scenario, currentRoute) {
//---------------------------------------------------------- Private Functions ----------------------------------------------------------
// Navigate to an external url.
-function navigateToUrl(url) {
+function navigateToUrl(url, optionalQuery = {}) {
// possibly show some loading screen in the future here.
- window.location.assign(url);
+ var externalUrl = new URL(url);
+
+ for (const queryKey in optionalQuery) {
+ externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
+ }
+
+ window.location.assign(externalUrl);
}
// Get route information by page name.
diff --git a/src/router/router-constants/externalUrl-values.js b/src/router/router-constants/externalUrl-values.js
new file mode 100644
index 000000000..a5b059480
--- /dev/null
+++ b/src/router/router-constants/externalUrl-values.js
@@ -0,0 +1,5 @@
+const externalUrls = {
+ HERITAGE_FUNNEL: process.env.VUE_APP_HERITAGE_FUNNEL,
+};
+
+export { externalUrls };
\ No newline at end of file
diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js
index 9fd1c6311..55efdcaec 100644
--- a/src/router/router-constants/navigation-scenarios.js
+++ b/src/router/router-constants/navigation-scenarios.js
@@ -4,6 +4,7 @@ const navigationScenarios = {
SELECTED_MAKE: "SELECTED_MAKE",
SELECTED_STYLE: "SELECTED_STYLE",
CLICKED_BACK: "CLICKED_BACK",
+ CLICKED_FORWARD: "CLICKED_FORWARD",
SELECTED_PARTS: "SELECTED_PARTS",
SELECTED_DAMAGE_WITH_SINGLE_PART: "SELECTED_DAMAGE_WITH_SINGLE_PART",
SELECTED_DAMAGE_WITH_MULTIPLE_PARTS: "SELECTED_DAMAGE_WITH_MULTIPLE_PARTS",
diff --git a/src/router/router-constants/router-parameter-keys.js b/src/router/router-constants/router-parameter-keys.js
deleted file mode 100644
index 0c75eb738..000000000
--- a/src/router/router-constants/router-parameter-keys.js
+++ /dev/null
@@ -1,3 +0,0 @@
-const routerParameterKeys = { };
-
- export { routerParameterKeys };
\ No newline at end of file
diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js
index 584796a61..760dac76a 100644
--- a/src/router/router-constants/routing-table.js
+++ b/src/router/router-constants/routing-table.js
@@ -1,5 +1,6 @@
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
+import { applicationConfig } from "@/constants/application-config";
const routingTable = [
{
@@ -59,7 +60,7 @@ const routingTable = [
},
{
scenario: navigationScenarios.SELECTED_DAMAGE_WITH_SINGLE_PART,
- destinationFmgPageValue: fmgPageValues.REVEAL,
+ destinationFmgPageValue: fmgPageValues.REVEAL
},
{
scenario: navigationScenarios.SELECTED_DAMAGE_WITH_MULTIPLE_PARTS,
@@ -80,6 +81,10 @@ const routingTable = [
},
{
scenario: navigationScenarios.SELECTED_PARTS,
+ destinationFmgPageValue: fmgPageValues.QUOTE,
+ },
+ {
+ scenario: navigationScenarios.CLICKED_FORWARD,
destinationFmgPageValue: fmgPageValues.REVEAL,
},
],
diff --git a/src/store/index.js b/src/store/index.js
index 53e977114..26a0b31b6 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,55 +1,64 @@
import { createStore } from "vuex";
import { endpoints } from "@/constants/endpoints.js";
import { storeMutations } from "@/constants/store-mutations";
+import { getDateForSavedSessionTimeout } from "@/helpers/heritage-integration/session-helper";
import createPersistedState from "vuex-persistedstate";
import globalMethods from "@/global-methods";
-
-
// Export State
-export const state = {
- order: {
- vehicle: {
- year: null,
- make: null,
- model: null,
- style: null,
- carId: null,
- category: null,
- imageUrl: null,
- imageVifNumber: null,
- imageColor: null,
- registration: {
- licensePlate: null,
- address: null,
- city: null,
- state: null,
- zipCode: null,
- firstName: null,
- lastName: null,
+const getDefaultState = () => {
+ return {
+ order: {
+ vehicle: {
+ year: null,
+ make: null,
+ model: null,
+ style: null,
+ carId: null,
+ category: null,
+ vin: null,
+ imageUrl: null,
+ imageVifNumber: null,
+ imageColor: null,
+ registration: {
+ licensePlate: null,
+ address: null,
+ city: null,
+ state: null,
+ zipCode: null,
+ firstName: null,
+ lastName: null,
+ },
},
+ serviceLocation: {
+ zip: null,
+ },
+ customer: {
+ emailAddress: null,
+ },
+ damage: {
+ isRepair: null,
+ numberOfChips: null,
+ glassToReplace: null,
+ },
+ lineItems: {
+ glassParts: null,
+ otherParts: null
+ },
+ referralNumber: null,
+ referralDate: null,
+ referralCorrelationId: null,
+ parentAccountNumber: null,
},
- serviceLocation: {
- zip: null,
+ applicationUser: {
+ eventBus: [],
+ pageData: {},
+ savedSessionTimeout: getDateForSavedSessionTimeout()
},
- customer: {
- emailAddress: null,
- },
- damage: {
- isRepair: null,
- numberOfChips: null,
- glassToReplace: null,
- },
- lineItems:{
- glassParts: {},
- otherParts: {}
- }
- },
- applicationUser: {
- eventBus: [],
- pageData: {}
- },
-}
+ }
+};
+
+export const state = getDefaultState();
// Export Mutations
export const mutations = {
@@ -81,49 +90,35 @@ export const mutations = {
updateVehicleImageColor(state, imageColor) {
state.order.vehicle.imageColor = imageColor;
},
- updateIsRepair(state, isRepair){
+ updateIsRepair(state, isRepair) {
state.order.damage.isRepair = isRepair;
},
- updateNumberOfChips(state, numberOfChips){
+ updateNumberOfChips(state, numberOfChips) {
state.order.damage.numberOfChips = numberOfChips;
},
- updateGlassToReplace(state, glassToReplace){
+ updateGlassToReplace(state, glassToReplace) {
state.order.damage.glassToReplace = glassToReplace;
},
- updateParts(state, partsData){
+ updateParts(state, partsData) {
state.order.lineItems.glassParts = partsData;
},
- updatePageData(state, pageData){
+ updatePageData(state, pageData) {
state.applicationUser.pageData[pageData.page] = pageData.data;
},
- updateRegistrationAddress(state, registrationAddress){
- state.order.vehicle.registration.address = registrationAddress;
+ updateReferralCorrelationId(state, referralCorrelationId) {
+ state.order.referralCorrelationId = referralCorrelationId;
},
- updateRegistrationCity(state, registrationCity){
- state.order.vehicle.registration.city = registrationCity;
+ updateReferralNumber(state, referralNumber) {
+ state.order.referralNumber = referralNumber;
},
- updateRegistrationState(state, registrationState){
- state.order.vehicle.registration.state = registrationState;
+ updateReferralDate(state, referralDate) {
+ state.order.referralDate = referralDate;
},
- updateRegistrationZipCode(state, registrationZipCode){
- state.order.vehicle.registration.zipCode = registrationZipCode;
- },
- updateRegistrationFirstName(state, registrationFirstName){
- state.order.vehicle.registration.firstName = registrationFirstName;
- },
- updateRegistrationLastName(state, registrationLastName){
- state.order.vehicle.registration.lastName = registrationLastName;
- },
- updateRegistrationLicensePlate(state, registrationLicensePlate){
- state.order.vehicle.registration.licensePlate = registrationLicensePlate;
- },
- updateServiceLocationZip(state, serviceLocationZip){
- state.order.vehicle.serviceLocation.zip = serviceLocationZip;
- },
- updateCustomerEmailAddress(state, customerEmailAddress){
- state.order.vehicle.customer.emailAddress = customerEmailAddress;
+ updateParentAcctNumber(state, parentAcctNumber) {
+ state.order.parentAccountNumber = parentAcctNumber;
},
+
// EVENT BUS MUTATIONS
addEventToBus(state, event) {
state.applicationUser.eventBus.push(event);
@@ -168,6 +163,32 @@ export const mutations = {
resetPartsState(state) {
state.order.lineItems.glassParts = null;
state.order.lineItems.otherParts = null;
+ },
+ resetState(state) {
+ Object.assign(state, getDefaultState());
+ },
+
+ // Misc Mutations
+ setLoadOrderInformation(state, orderInformation) {
+ state.order.referralNumber = orderInformation.referralNumber;
+ state.order.referralDate = orderInformation.referralDate;
+ state.order.referralCorrelationId = orderInformation.referralCorrelationId;
+ state.order.vehicle = {
+ year: orderInformation.vehicle?.year,
+ make: orderInformation.vehicle?.make,
+ model: orderInformation.vehicle?.model,
+ style: orderInformation.vehicle?.style,
+ carId: orderInformation.vehicle?.carId,
+ category: orderInformation.vehicle?.category,
+ imageUrl: orderInformation.vehicle?.imageUrl,
+ imageVifNumber: orderInformation.vehicle?.imageVifNumber,
+ imageColor: orderInformation.vehicle?.imageVifColor
+ };
+ state.order.damage.glassToReplace = orderInformation.glassToReplace;
+ state.order.damage.isRepair = orderInformation.isRepair;
+ state.order.damage.numberOfChips = orderInformation.numberOfChips;
+ state.order.lineItems.glassParts = orderInformation.parts;
+ state.order.parentAccountNumber = orderInformation.parentAccountNumber;
}
}
@@ -187,7 +208,9 @@ export const getters = {
lineItems: (state) => state.order.lineItems,
pageData: (state) => (page) => {
return state.applicationUser.pageData[page];
- }
+ },
+ applicationUser: (state) => state.applicationUser,
+ order: (state) => state.order,
}
// Export Actions
@@ -278,6 +301,9 @@ export const actions = {
resetPartsAndDependencies(context) {
context.commit(storeMutations.RESET_PARTS_STATE);
},
+ resetState(context) {
+ context.commit(storeMutations.RESET_STATE);
+ },
// Content API Actions
getRouteInfo(context, { pageName }) {
@@ -310,6 +336,13 @@ export const actions = {
});
},
+ // Misc Actions
+ setReferralInformation(context, { referralNumber, referralDate, referralCorrelationId }) {
+ context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber);
+ context.commit(storeMutations.UPDATE_REFERRAL_DATE, referralDate);
+ context.commit(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, referralCorrelationId);
+ },
+
// Parts API Actions
getPartsOrQuestions(context, { carId, glassArray, zipCode, vin = '' }) {
return globalMethods.callHttpClient({
@@ -322,6 +355,45 @@ export const actions = {
vin: vin
},
});
+ },
+
+ // Order API Actions
+ saveOrder(context) {
+ const vehicle = context.getters.vehicle;
+ const damage = context.getters.damage;
+
+ return globalMethods.callHttpClient({
+ method: endpoints.SaveOrder.method,
+ endpoint: endpoints.SaveOrder.url,
+ payload: {
+ vehicle: {
+ carId: vehicle.carId,
+ year: vehicle.year,
+ make: vehicle.make,
+ model: vehicle.model,
+ style: vehicle.style,
+ },
+ numberOfChips: damage.numberOfChips,
+ glassToReplace: damage.glassToReplace,
+ referralNumber: context.state.order.referralNumber,
+ referralDate: context.state.order.referralDate
+ },
+ });
+ },
+
+ loadOrder(context, { referralNumber, referralDate, referralCorrelationId }) {
+ return globalMethods.callHttpClient({
+ method: endpoints.LoadOrder.method,
+ endpoint: endpoints.LoadOrder.url,
+ payload: {
+ referralNumber: referralNumber,
+ referralDate: referralDate,
+ referralCorrelationId: referralCorrelationId
+ },
+ }).then((response) => {
+ context.commit(storeMutations.SET_LOAD_CONCEPT_SESSION_INFO, response.data);
+ return response;
+ });
}
}
@@ -337,3 +409,5 @@ export default createStore({
getters,
actions,
});
+
+// Private Functions
diff --git a/src/store/store.spec.js b/src/store/store.spec.js
index a3f8a5cb5..b97ede119 100644
--- a/src/store/store.spec.js
+++ b/src/store/store.spec.js
@@ -200,6 +200,38 @@ describe("Mutations", () => {
expect(storeState.applicationUser.pageData['vehicle-year']).toEqual({});
});
+ it("setLoadOrderInformation, should set order information in state", () => {
+ // Arrange
+ const storeState = state;
+
+ // Act
+ mutations.setLoadOrderInformation(storeState, {
+ referralNumber: 123,
+ referralDate: new Date().toUTCString(),
+ referralCorrelationId: "xxx-xxx-xxx",
+ vehicle: {
+ year: "2019",
+ make: "Acura",
+ model: "ILX",
+ style: "4 DOOR SEDAN",
+ carId: "C0000001",
+ category: "CAR"
+ },
+ glassToReplace: ["Windshield"],
+ isRepair: false,
+ numberOfChips: 0,
+ parts: [],
+ parentAccountNumber: "123456789",
+ });
+
+ // Assert
+ expect(storeState.order.referralNumber).toEqual(123);
+ expect(storeState.order.referralCorrelationId).toEqual("xxx-xxx-xxx");
+ expect(storeState.order.vehicle.year).toEqual("2019");
+ expect(storeState.order.vehicle.make).toEqual("Acura");
+ expect(storeState.order.vehicle.model).toEqual("ILX");
+ });
+
});
describe("Actions", () => {
@@ -466,6 +498,66 @@ describe("Actions", () => {
expect(response.data).toEqual({ imageUrl: "https://test.com" });
});
+ it("saveOrder action, returns order information", async () => {
+ // Arrange
+ const context = state;
+
+ context.getters = {
+ vehicle: {},
+ damage: {},
+ };
+ context.state = {
+ order: {}
+ };
+
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: { referralNumber: 123 } });
+ });
+
+ // Act
+ const response = await actions.saveOrder(context);
+
+ // Assert
+ expect(response.data).toEqual({ referralNumber: 123 });
+ });
+
+
+ it("loadOrder action, returns order information, calls mutation", async () => {
+ // Arrange
+ const context = state;
+
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ data: { referralNumber: 123 } });
+ });
+
+ const commit = jest.fn();
+
+ context.commit = commit;
+
+ // Act
+ const response = await actions.loadOrder(context, {referralNumber: "123", referralDate: new Date().toUTCString(), referralCorrelationId: "xxx-xxx-xxx"});
+
+ // Assert
+ expect(response.data).toEqual({ referralNumber: 123 });
+ expect(commit).toBeCalledWith(storeMutations.SET_LOAD_CONCEPT_SESSION_INFO, {"referralNumber": 123});
+ });
+
+ it("setReferralInformation, should call commit three times", () => {
+ // Arrange
+ const context = state;
+ const commit = jest.fn();
+
+ context.commit = commit;
+
+ // Act
+ actions.setReferralInformation(context, {referralNumber: "123", referralDate: new Date().toUTCString(), referralCorrelationId: "xxx-xxx-xxx"});
+
+ // Assert
+ expect(commit).toBeCalledWith(storeMutations.UPDATE_REFERRAL_NUMBER, "123");
+ expect(commit).toBeCalledWith(storeMutations.UPDATE_REFERRAL_DATE, new Date().toUTCString());
+ expect(commit).toBeCalledWith(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, "xxx-xxx-xxx");
+ });
+
});
describe("Getters", () => {
diff --git a/vue.config.js b/vue.config.js
index 25494f865..7bca415e3 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -1,5 +1,7 @@
process.env.VUE_APP_CONSUMER_API_GATEWAY =
"https://consumerapidev.safelite.com";
+process.env.VUE_APP_HERITAGE_FUNNEL =
+ "http://localhost:38000/default.aspx";
process.env.VUE_APP_GOOGLE_PLACES_API_KEY =
"AIzaSyDptGCkOPgN2uWJOy4ou4M33phRD4MAoJo"
@@ -22,4 +24,7 @@ module.exports = {
},
},
},
+ configureWebpack: {
+ devtool: 'source-map'
+ },
};
diff --git a/vue.release.config.js b/vue.release.config.js
index 0c470ffe4..86563f59e 100644
--- a/vue.release.config.js
+++ b/vue.release.config.js
@@ -1,5 +1,6 @@
process.env.VUE_APP_CONSUMER_API_GATEWAY = "__VUE_APP_CONSUMER_API_GATEWAY__";
process.env.VUE_APP_GOOGLE_PLACES_API_KEY = "__VUE_APP_GOOGLE_PLACES_API_KEY__";
+process.env.VUE_APP_HERITAGE_FUNNEL = "__VUE_APP_HERITAGE_FUNNEL__";
module.exports = {
outputDir: "dist/fmg",