-
-
-
-
+
diff --git a/src/layouts/vehicle-damage/vehicle-damage.spec.js b/src/layouts/vehicle-damage/vehicle-damage.spec.js
index 9a9f7e6d7..b722fccbf 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.spec.js
+++ b/src/layouts/vehicle-damage/vehicle-damage.spec.js
@@ -182,66 +182,6 @@ describe("vehicle-damage.vue", () => {
});
});
-describe("vehicle-damage.vue", () => {
- test("Windshield replace with single part on ForwardButtonAction triggers a router.navigate and saves selections to store", async () => {
- //Arrange
- const partsData = { partsOrQuestions: [
- {
- glassLocation: "Windshield",
- glassName: "Single",
- partQuestions: null,
- parts: [
- {
- color: "Green Tint, Green Shade",
- description: "rain sensor, solar",
- partNumber: "FW02728GGYN",
- requiresCapabilityQuestions: false,
- requiresRecalibration: false
- }
- ]}]};
-
- const { wrapper } = setupMocks({
- pageHeaderWidgetHeaderText: "",
- mountOptionsMockData: {
- router: { navigate: jest.fn(), },
- actionList: [{ actionName: storeActions.GET_PARTS_OR_QUESTIONS, data: partsData, },],
- store: {
- getters: {
- vehicle: {},
- payment: { insuranceCoverage: { isVerified: false } },
- },
- },
- },
- });
-
- wrapper.vm.selectedDamageLocations = ["Windshield"];
- wrapper.vm.selectedWindshieldOptions = {
- selectedWindshieldChipCount : null,
- selectedWindshieldReplaceOptions : ["Single"],
- selectedWindshieldDamageType: ["Replace"]
- };
-
- const expectedGlassToReplace = [{location: "Windshield", name: "Single"},];
-
- //Act
- vehicleDamage.beforeRouteEnter.call(
- wrapper.vm,
- { query: { fmgPage: "vehicle-damage" } },
- undefined,
- (c) => c(wrapper.vm)
- );
-
- await wrapper.vm.forwardButtonAction();
-
- //Assert
- expect(wrapper.vm.$router.navigate).toHaveBeenCalled();
- expect(wrapper.vm.selectedGlassToReplace()).toEqual(expectedGlassToReplace);
- expect(store.commit).toBeCalledWith(storeMutations.UPDATE_IS_REPAIR, false);
- expect(store.commit).toBeCalledWith(storeMutations.UPDATE_GLASS_TO_REPLACE, expectedGlassToReplace);
- expect(store.commit).toBeCalledWith(storeMutations.UPDATE_PARTS, partsData.partsOrQuestions[0].parts);
- });
-});
-
describe("vehicle-damage.vue", () => {
test("Windshield replace with multiple parts on ForwardButtonAction triggers a router.navigateAfterSave and saves selections to store", async () => {
//Arrange
@@ -332,48 +272,6 @@ describe("vehicle-damage.vue", () => {
});
});
-
-describe("vehicle-damage.vue", () => {
- test("Windshield repair on ForwardButtonAction triggers a router.navigate and saves selection to store", async () => {
- //Arrange
- const partsData = { partsOrQuestions: []};
- const { wrapper } = setupMocks({
- pageHeaderWidgetHeaderText: "",
- mountOptionsMockData: {
- router: { navigate: jest.fn(), },
- actionList: [{ actionName: storeActions.GET_PARTS_OR_QUESTIONS, data: partsData, },],
- store: {
- getters: {
- vehicle: {},
- payment: { insuranceCoverage: { isVerified: false } },
- },
- },
- },
- });
-
- wrapper.vm.selectedDamageLocations = ["Windshield"];
- wrapper.vm.selectedWindshieldOptions = {
- selectedWindshieldChipCount : [2],
- selectedWindshieldDamageType: ["Repair"]
- };
-
- //Act
- vehicleDamage.beforeRouteEnter.call(
- wrapper.vm,
- { query: { fmgPage: "vehicle-damage" } },
- undefined,
- (c) => c(wrapper.vm)
- );
-
- await wrapper.vm.forwardButtonAction();
-
- //Assert
- expect(wrapper.vm.$router.navigate).toHaveBeenCalled();
- expect(store.commit).toBeCalledWith(storeMutations.UPDATE_IS_REPAIR, true);
- expect(store.commit).toBeCalledWith(storeMutations.UPDATE_NUMBER_OF_CHIPS, 2);
- });
-});
-
describe("vehicle-damage.vue", () => {
test("isWindshieldDamageLocation is true when windshield is selected", async () => {
diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue
index b099ca091..b3f89f833 100644
--- a/src/layouts/vehicle-damage/vehicle-damage.vue
+++ b/src/layouts/vehicle-damage/vehicle-damage.vue
@@ -293,55 +293,20 @@ export default {
store.commit(this.storeMutations.UPDATE_GLASS_TO_REPLACE, this.selectedGlassToReplace());
- const partsData = await baseMixin.methods.dispatchStoreAction(this.storeActions.GET_PARTS_OR_QUESTIONS,
- { carId: store.getters.vehicle.carId, glassArray: this.selectedGlassToReplace()}, false);
-
- this.navigateForward(partsData);
+ this.navigateForward();
},
- navigateForward(partsData){
-
- // Temporary easter egg to navigate to heritage funnel.
- const vehicleYearsToShowHeritageFunnel = [ 2001, 2002, 2010, 2016 ];
- if (vehicleYearsToShowHeritageFunnel.includes(store.getters.vehicle.year)) {
- navigateToHeritageFunnel();
- return;
- }
-
- // Temporary easter egg to navigate to address-lookup.
- if (store.getters.vehicle.year === 2014) {
- this.$router.navigateAfterSave(this.navigationScenarios.TEMPORARY_TO_ADDRESS_LOOKUP, this.$route, {}, {}, partsData.data);
- return;
- }
+ navigateForward(){
// If vin already exists, navigate directly to vin-lookup
- if(this.$store.getters.vehicle.vin){
- this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route);
+ if(store.getters.vehicle.vin) {
+ this.$router.navigateAfterSave(this.navigationScenarios.CLICKED_FORWARD_WITH_VIN, this.$route);
+ return;
+ }
+ else {
+ this.$router.navigateAfterSave(this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN, this.$route);
return;
}
-
- //found problem questions
- if (partsData.data.partsOrQuestions.some(pq => pq.partQuestions != null && pq.partQuestions.length > 0)){
- this.$router.navigateAfterSave(this.navigationScenarios.SELECTED_DAMAGE_WITH_PART_QUESTIONS, this.$route, {}, {}, partsData.data);
- return;
- }
-
- //found multiple parts for a single glass location (Windshield, Driver, Passenger, Rear)
- if (partsData.data.partsOrQuestions){
- for (var i = 0; i < partsData.data.partsOrQuestions.length; i++){
- if (partsData.data.partsOrQuestions[i].parts != null && partsData.data.partsOrQuestions[i].parts.length > 1){
- this.$router.navigateAfterSave(this.navigationScenarios.SELECTED_DAMAGE_WITH_MULTIPLE_PARTS, this.$route, {}, {}, partsData.data);
- return;
- }
- }
- }
-
- //if not a repair then there should only be 1 part and no problem questions at this point so save the part to the store.
- if (!this.isWindshieldRepair){
- store.commit(this.storeMutations.UPDATE_PARTS, partsData.data.partsOrQuestions[0].parts);
- }
-
- this.$router.navigate(this.navigationScenarios.SELECTED_DAMAGE_WITH_SINGLE_PART, this.$route);
},
selectedGlassToReplace() {
diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue
index ef47a043c..8a3f28a7d 100644
--- a/src/layouts/vin-lookup/vin-lookup.vue
+++ b/src/layouts/vin-lookup/vin-lookup.vue
@@ -309,7 +309,7 @@ export default {
store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, carInfo.imageUrl);
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, this.zip);
+ store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, this.zip);
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, this.email);
},
},
diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js
index 85402c8cb..6b1943241 100644
--- a/src/mixins/analytics-mixin.js
+++ b/src/mixins/analytics-mixin.js
@@ -11,24 +11,34 @@ const currentPageName = getPageNameByQueryString();
export default {
methods: {
- logEvent(pageEvent, category, action, label, value) {
+ logPageView(pageEvent) {
var payload = {
userId: getDeviceIdValue(),
sessionKey: getSessionKeyValue(),
pageName: currentPageName,
sessionId: getSessionIdValue(),
+ action: '',
+ event: pageEvent,
shouldUseSessionId: true,
};
- if (pageEvent) {
- payload.pageEvent = { action: '', event: pageEvent };
- }
+ baseMixin.methods.dispatchStoreAction(storeActions.LOG_PAGE_VIEW, payload, false);
+ },
- if (category) {
- payload.customEvent = { category: category, action: action, label: label, value: value };
- }
+ logCustomEvent(category, action, label, value) {
+ var payload = {
+ userId: getDeviceIdValue(),
+ sessionKey: getSessionKeyValue(),
+ pageName: currentPageName,
+ sessionId: getSessionIdValue(),
+ category: category,
+ action: action,
+ label: label,
+ value: value,
+ shouldUseSessionId: true,
+ };
- baseMixin.methods.dispatchStoreAction(storeActions.LOG_ACTIVITY, payload, false);
+ baseMixin.methods.dispatchStoreAction(storeActions.LOG_CUSTOM_EVENT, payload, false);
},
pushEventToGA(category, action, label, pushToLogApp = false) {
@@ -44,7 +54,7 @@ export default {
pushToDataLayerIfDefined(eventToBePushed);
if (pushToLogApp) {
- this.logEvent(undefined, category, action, label, undefined);
+ this.logCustomEvent(category, action, label, undefined);
}
},
@@ -58,11 +68,11 @@ export default {
pushToDataLayerIfDefined(pageViewEvent);
- this.logEvent(currentPageName, analyticsPageEvents.ENTRY);
+ this.logPageView(analyticsPageEvents.ENTRY);
},
pushExperimentsToDataLayer(experiments) {
- experiments?.data?.forEach(exp => {
+ experiments?.forEach(exp => {
// Set Google Dimension Index based on experiment settings.
let googleDimensionIndex = 99;
@@ -72,11 +82,13 @@ export default {
}
// Create object with dimension index and value.
- const experimentWithDimension = {};
-
- Object.keys(exp).forEach(key => {
- experimentWithDimension[`${key}_${googleDimensionIndex}`] = exp[key];
- });
+ const experimentWithDimension = {
+ [`experimentId_${googleDimensionIndex}`]: exp.universeId,
+ [`variationId_${googleDimensionIndex}`]: exp.variationId,
+ [`experimentName_${googleDimensionIndex}`]: exp.universeName,
+ [`variationName_${googleDimensionIndex}`]: exp.variationName,
+ [`customDimension_${googleDimensionIndex}`]: `${exp.universeId}_${exp.variationId}_${exp.universeName}_${exp.variationName}`
+ };
// Push to the data layer with the Google Custom Dimension Index.
pushToDataLayerIfDefined(experimentWithDimension);
diff --git a/src/mixins/analytics-mixin.spec.js b/src/mixins/analytics-mixin.spec.js
index ae1ba00a7..e63778466 100644
--- a/src/mixins/analytics-mixin.spec.js
+++ b/src/mixins/analytics-mixin.spec.js
@@ -3,18 +3,34 @@ import { setupMocksForJsFiles } from "@/helpers/unit-test-helper.js";
import { storeActions } from "@/constants/store-actions";
describe("analyticsMixin.js", () => {
- test("logEvent: calls dispatch with type and payload", () => {
+ test("logPageView: calls dispatch with type and payload", () => {
const type = "";
const payload = {};
const mockData = {
actionList: [{
- actionName: storeActions.LOG_ACTIVITY
+ actionName: storeActions.LOG_PAGE_VIEW
}],
}
const mocks = setupMocksForJsFiles(mockData);
- analyticsMixin.methods.logEvent(type, payload);
+ analyticsMixin.methods.logPageView(type, payload);
+
+ expect(mocks.baseMixin.methods.dispatchStoreAction).toBeCalled();
+ });
+
+ test("logCustomEvent: calls dispatch with type and payload", () => {
+ const type = "";
+ const payload = {};
+
+ const mockData = {
+ actionList: [{
+ actionName: storeActions.LOG_CUSTOM_EVENT
+ }],
+ }
+ const mocks = setupMocksForJsFiles(mockData);
+
+ analyticsMixin.methods.logCustomEvent(type, payload);
expect(mocks.baseMixin.methods.dispatchStoreAction).toBeCalled();
});
@@ -23,7 +39,7 @@ describe("analyticsMixin.js", () => {
// Arrange
const mockData = {
actionList: [{
- actionName: storeActions.LOG_ACTIVITY
+ actionName: storeActions.LOG_CUSTOM_EVENT
}],
}
const mocks = setupMocksForJsFiles(mockData);
@@ -40,21 +56,27 @@ describe("analyticsMixin.js", () => {
// Arrange
window.dataLayer = [];
- const mockExperimentData = {
- data: [
+ const mockExperimentData =
+ [
{
settings: {},
variationName: 'test',
universeName: 'testUniverse'
}
]
- }
+
// Act
analyticsMixin.methods.pushExperimentsToDataLayer(mockExperimentData);
// Assert
- expect(window.dataLayer).toEqual([ { settings_99: {}, variationName_99: 'test', universeName_99: 'testUniverse' } ]);
+ expect(window.dataLayer).toEqual([{
+ experimentId_99: undefined,
+ variationId_99: undefined,
+ experimentName_99: 'testUniverse',
+ variationName_99: 'test',
+ customDimension_99: 'undefined_undefined_testUniverse_test'
+ }]);
});
@@ -62,21 +84,27 @@ describe("analyticsMixin.js", () => {
// Arrange
window.dataLayer = [];
- const mockExperimentData = {
- data: [
+ const mockExperimentData =
+ [
{
- settings: { "Google Custom Dimension Index": "5"},
+ settings: { "Google Custom Dimension Index": "5" },
variationName: 'test',
universeName: 'testUniverse'
}
]
- }
+
// Act
analyticsMixin.methods.pushExperimentsToDataLayer(mockExperimentData);
// Assert
- expect(window.dataLayer).toEqual([ { settings_5: {"Google Custom Dimension Index": "5"}, variationName_5: 'test', universeName_5: 'testUniverse' } ]);
+ expect(window.dataLayer).toEqual([{
+ experimentId_5: undefined,
+ variationId_5: undefined,
+ experimentName_5: 'testUniverse',
+ variationName_5: 'test',
+ customDimension_5: 'undefined_undefined_testUniverse_test'
+ }]);
});
});
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 1af18ec1b..f11bd4228 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -127,8 +127,11 @@ router.afterEach(async (to, from) => {
// Push page view to GA
analyticsMixin.methods.pushPageViewToGA(to.query[queryStrings.FMG_PAGE]);
- const assignedExperiments = await baseMixin.methods.dispatchStoreAction(storeActions.GET_EXPERIMENTS_BY_USER_FOR_GA, { userId: getDeviceIdValue() });
- analyticsMixin.methods.pushExperimentsToDataLayer(assignedExperiments);
+ baseMixin.methods.dispatchStoreAction(storeActions.GET_EXPERIMENTS_BY_USER, { userId: getDeviceIdValue() })
+ .then( (response) => {
+ analyticsMixin.methods.pushExperimentsToDataLayer(response.data);
+ });
+
});
router.navigate = (scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) => {
diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js
index 5380a3fa7..b3ce4d6d7 100644
--- a/src/router/router-constants/navigation-scenarios.js
+++ b/src/router/router-constants/navigation-scenarios.js
@@ -8,14 +8,14 @@ const navigationScenarios = {
CLICKED_FORWARD: "CLICKED_FORWARD",
CLICKED_FORWARD_WITH_VIN: "CLICKED_FORWARD_WITH_VIN",
SELECTED_PARTS: "SELECTED_PARTS",
- SELECTED_DAMAGE_WITH_SINGLE_PART: "SELECTED_DAMAGE_WITH_SINGLE_PART",
- SELECTED_DAMAGE_WITH_MULTIPLE_PARTS: "SELECTED_DAMAGE_WITH_MULTIPLE_PARTS",
- SELECTED_DAMAGE_WITH_PART_QUESTIONS: "SELECTED_DAMAGE_WITH_PART_QUESTIONS",
CONTINUING_WITH_PARTS_QUESTION: "CONTINUING_WITH_PARTS_QUESTION",
CONTINUING_WITH_MULTIPLE_PARTS: "CONTINUING_WITH_MULTIPLE_PARTS",
CONTINUING_WITH_SINGLE_PART: "CONTINUING_WITH_SINGLE_PART",
CONTINUING_WITH_MULTIPLE_VEHICLES: "CONTINUING_WITH_MULTIPLE_VEHICLES",
- TEMPORARY_TO_ADDRESS_LOOKUP: "TEMPORARY_TO_ADDRESS_LOOKUP",
+ CLICKED_FORWARD_WITHOUT_VIN: "CLICKED_FORWARD_WITHOUT_VIN",
+ SELECTED_MANUAL_VIN: "SELECTED_MANUAL_VIN",
+ SELECTED_LICENSE_PLATE: "SELECTED_LICENSE_PLATE",
+ SELECTED_HOME_ADDRESS: "SELECTED_HOME_ADDRESS",
};
export { navigationScenarios };
diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js
index 0b887cdd1..80d7818d1 100644
--- a/src/router/router-constants/routing-table.js
+++ b/src/router/router-constants/routing-table.js
@@ -59,23 +59,11 @@ const routingTable = [
},
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_VIN,
- destinationFmgPageValue: fmgPageValues.LICENSE_PLATE_LOOKUP,
- },
- {
- scenario: navigationScenarios.SELECTED_DAMAGE_WITH_SINGLE_PART,
- destinationFmgPageValue: fmgPageValues.LICENSE_PLATE_LOOKUP,
- },
- {
- scenario: navigationScenarios.SELECTED_DAMAGE_WITH_MULTIPLE_PARTS,
destinationFmgPageValue: fmgPageValues.VIN_LOOKUP,
},
{
- scenario: navigationScenarios.SELECTED_DAMAGE_WITH_PART_QUESTIONS,
- destinationFmgPageValue: fmgPageValues.LICENSE_PLATE_LOOKUP,//This might be temporary
- },
- {
- scenario: navigationScenarios.TEMPORARY_TO_ADDRESS_LOOKUP,
- destinationFmgPageValue: fmgPageValues.ADDRESS_LOOKUP, //This will be temporary
+ scenario: navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN,
+ destinationFmgPageValue: fmgPageValues.ESTIMATE,
},
],
},
@@ -163,6 +151,26 @@ const routingTable = [
destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
},
],
+ },
+ {fmgPageValue: fmgPageValues.ESTIMATE,
+ maps: [
+ {
+ scenario: navigationScenarios.CLICKED_BACK,
+ destinationFmgPageValue: fmgPageValues.VEHICLE_DAMAGE,
+ },
+ {
+ scenario: navigationScenarios.SELECTED_MANUAL_VIN,
+ destinationFmgPageValue: fmgPageValues.VIN_LOOKUP,
+ },
+ {
+ scenario: navigationScenarios.SELECTED_LICENSE_PLATE,
+ destinationFmgPageValue: fmgPageValues.LICENSE_PLATE_LOOKUP,
+ },
+ {
+ scenario: navigationScenarios.SELECTED_HOME_ADDRESS,
+ destinationFmgPageValue: fmgPageValues.ADDRESS_LOOKUP,
+ },
+ ],
},
];
diff --git a/src/store/index.js b/src/store/index.js
index 3c2bee5a4..75bd4807d 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -31,7 +31,7 @@ const getDefaultState = () => {
},
},
serviceLocation: {
- zip: null,
+ zipCode: null,
},
customer: {
emailAddress: null,
@@ -433,36 +433,52 @@ export const actions = {
});
},
- logActivity(context, { userId, sessionKey, pageName, sessionId, pageEvent, customEvent, shouldUseSessionId }) {
+ logPageView(context, { userId, sessionKey, pageName, sessionId, action, event, shouldUseSessionId }) {
var payload = {
userId: userId,
sessionKey: sessionKey,
sessionId: sessionId,
pageName: pageName,
applicationName: 'SafeliteDotCom',
+ action: action,
+ event: event,
shouldUseSessionId: shouldUseSessionId
};
- if (typeof pageEvent !== 'undefined') {
- payload.pageEvent = { action: pageEvent.action, event: pageEvent.event};
- }
-
- if (typeof customEvent !== 'undefined') {
- payload.customEvents = [{category: customEvent.category, action: customEvent.action, label: customEvent.label, value: customEvent.value}];
- }
-
return globalMethods.callHttpClient({
- method: endpoints.LogActivity.method,
- endpoint: endpoints.LogActivity.url,
+ method: endpoints.LogPageView.method,
+ endpoint: endpoints.LogPageView.url,
payload: payload,
logApiCall: false
});
},
- getExperimentsByUserForGa(context, { userId }){
+ logCustomEvent(context, { userId, sessionKey, pageName, sessionId, category, action, label, value, shouldUseSessionId }) {
+ var payload = {
+ userId: userId,
+ sessionKey: sessionKey,
+ sessionId: sessionId,
+ pageName: pageName,
+ applicationName: 'SafeliteDotCom',
+ category: category,
+ action: action,
+ label: label,
+ value: value,
+ shouldUseSessionId: shouldUseSessionId
+ };
+
return globalMethods.callHttpClient({
- method: endpoints.GetExperimentsByUserForGa.method,
- endpoint: `${endpoints.GetExperimentsByUserForGa.url}/${userId}`,
+ method: endpoints.LogCustomEvent.method,
+ endpoint: endpoints.LogCustomEvent.url,
+ payload: payload,
+ logApiCall: false
+ });
+ },
+
+ GetExperimentsByUser(context, { userId }){
+ return globalMethods.callHttpClient({
+ method: endpoints.GetExperimentsByUser.method,
+ endpoint: `${endpoints.GetExperimentsByUser.url}/${userId}`,
payload: {}
});
},
diff --git a/src/store/store.spec.js b/src/store/store.spec.js
index e27569a6f..b1667eb4c 100644
--- a/src/store/store.spec.js
+++ b/src/store/store.spec.js
@@ -617,7 +617,7 @@ describe("Actions", () => {
expect(commit).toBeCalledWith(storeMutations.UPDATE_REFERRAL_CORRELATION_ID, "xxx-xxx-xxx");
});
- it("logActivity action, should return nothing", async () => {
+ it("logPageView action, should return nothing", async () => {
// Arrange
const context = state;
@@ -626,12 +626,26 @@ describe("Actions", () => {
event: "ENTRY",
}
- var customEvent = [{
+ // Act
+ globalMethods.callHttpClient.mockImplementation(() => {
+ return Promise.resolve({ });
+ });
+
+ // Assert
+ const response = await actions.logPageView(context, { userId: "userId", sessionKey: "sessionKey", pageName: "pageName", sessionId: "sessionId", pageEvent: pageEvent, shouldUseSessionId: true });
+ expect(response).toEqual({});
+ });
+
+ it("logCustomEvent action, should return nothing", async () => {
+
+ // Arrange
+ const context = state;
+ var customEvent = {
category: "tstCat",
action: "click",
label: "damage",
value: "psych"
- }];
+ };
// Act
globalMethods.callHttpClient.mockImplementation(() => {
@@ -639,7 +653,7 @@ describe("Actions", () => {
});
// Assert
- const response = await actions.logActivity(context, { userId: "userId", sessionKey: "sessionKey", pageName: "pageName", sessionId: "sessionId", pageEvent: pageEvent, customEvent: customEvent, shouldUseSessionId: true });
+ const response = await actions.logCustomEvent(context, { userId: "userId", sessionKey: "sessionKey", pageName: "pageName", sessionId: "sessionId", customEvent: customEvent, shouldUseSessionId: true });
expect(response).toEqual({});
});
diff --git a/vue.config.js b/vue.config.js
index 99c9cd754..6ddcd54de 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -4,6 +4,7 @@ process.env.VUE_APP_HERITAGE_FUNNEL =
"http://localhost:38000/default.aspx";
process.env.VUE_APP_GOOGLE_PLACES_API_KEY =
"AIzaSyDptGCkOPgN2uWJOy4ou4M33phRD4MAoJo";
+process.env.VUE_APP_CURRENT_ENVIRONMENT = "Localhost";
// GA & GTM
process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY = "(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl+ '>m_auth=amlAYNhxUxuskQo7jmjadg>m_preview=env-38>m_cookies_win=x';f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M6XCRH');";
diff --git a/vue.release.config.js b/vue.release.config.js
index 8c705b074..ad2732e41 100644
--- a/vue.release.config.js
+++ b/vue.release.config.js
@@ -1,6 +1,7 @@
process.env.VUE_APP_CONSUMER_CF_DISTRO = "__VUE_APP_CONSUMER_CF_DISTRO__";
process.env.VUE_APP_GOOGLE_PLACES_API_KEY = "__VUE_APP_GOOGLE_PLACES_API_KEY__";
process.env.VUE_APP_HERITAGE_FUNNEL = "__VUE_APP_HERITAGE_FUNNEL__";
+process.env.VUE_APP_CURRENT_ENVIRONMENT = "__VUE_APP_CURRENT_ENVIRONMENT__";
// GA & GTM
process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY = "__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__";