ga event defect

This commit is contained in:
Donielle Austin 2022-05-18 18:18:40 -04:00
parent 7fd053e043
commit e04979829a
5 changed files with 37 additions and 38 deletions

View file

@ -151,11 +151,12 @@ export default {
);
},
attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
this.GaLabels.ADDRESS_LOOKUP,
this.prependActionToMethod(this, this.forwardButtonAction, () => {
const self = this;
self.pushEventToGA(
self.$route.query[self.queryStrings.FMG_PAGE],
self.GaActions.SUBMITTED,
self.GaLabels.ADDRESS_LOOKUP,
true
);
});

View file

@ -47,7 +47,7 @@ jest.mock("@/store", () => ({
},
}));
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("CarId set, arePagePrerequisitesValid should be true ", async () => {
//Arrange
const { wrapper } = setupMocks({});
@ -68,7 +68,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("BackButtonAction triggers a router.navigate change", async () => {
//Arrange
@ -89,7 +89,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("getLicensePlateFromStore returns store license plate", async () => {
// Arrange
@ -103,7 +103,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("getRegistrationZipFromStore returns store registration zip", async () => {
// Arrange
@ -117,7 +117,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("getEmailFromStore returns store customer email", async () => {
// Arrange
@ -131,7 +131,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("getServiceZipFromStore returns store service zip", async () => {
// Arrange
@ -145,7 +145,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Navigate forward should be called and isCarId should be set to false when data entered matches store data on forwardButtonAction click", async () => {
// Arrange
@ -179,7 +179,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Function should stop and datam isRegistrationZipServicable should be set to false when service zip entered returns false on forwardButtonAction click", async () => {
// Arrange
@ -207,7 +207,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Function should stop and datam isCarIdDifferent should be set to true when carId entered doesn't match store carId or previously entered carId on forwardButtonAction click", async () => {
// Arrange
@ -241,7 +241,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Navigate forward should be called and isCarId should be set to true when carId entered matches previously entered carId and rest of data entered matches store data on forwardButtonAction click", async () => {
// Arrange
@ -276,7 +276,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Button Text should revert to initial value when licensePlate textfield has new text", async () => {
// Arrange
@ -293,7 +293,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Button Text should revert to initial value when registrationZip textfield has new text", async () => {
// Arrange
@ -310,7 +310,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Button Text should revert to initial value when serviceZip textfield has new text", async () => {
// Arrange
@ -327,7 +327,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("Dispatch reset damage and dependencies should be called if isCarIdDifferent is true and isSelectedGlassAvailableForVehicle is false when updateCustomerInfo is called", async () => {
// Arrange
@ -350,7 +350,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("NavigateAfterSave should be called if isCarIdDifferent is true and isSelectedGlassAvailableForVehicle is false when navigateForward is called", async () => {
// Arrange
@ -372,7 +372,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("navigateAfterSaveToHeritageFunnel should be called if isCarIdDifferent is false or isSelectedGlassAvailableForVehicle is true when navigateForward is called", async () => {
// Arrange
@ -392,7 +392,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("dispatch non blocking store action called on validate zip", async () => {
// Arrange
@ -407,7 +407,7 @@ describe.skip("license-plate-lookup.vue", () => {
});
});
describe.skip("license-plate-lookup.vue", () => {
describe("license-plate-lookup.vue", () => {
test("dispatch non blocking store action called on lookup vin", async () => {
// Arrange

View file

@ -229,10 +229,11 @@ export default {
},
attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
this.GaLabels.LICENSE_PLATE_LOOKUP,
const self = this;
self.pushEventToGA(
self.$route.query[self.queryStrings.FMG_PAGE],
self.GaActions.SUBMITTED,
self.GaLabels.LICENSE_PLATE_LOOKUP,
true
);
});

View file

@ -277,10 +277,11 @@ export default {
},
attachCustomEvents() {
this.prependActionToMethod(this, this.forwardButtonAction, () => {
this.pushEventToGA(
this.$route.query[this.queryStrings.FMG_PAGE],
this.GaActions.SUBMITTED,
this.GaLabels.VIN_LOOKUP,
const self = this;
self.pushEventToGA(
self.$route.query[self.queryStrings.FMG_PAGE],
self.GaActions.SUBMITTED,
self.GaLabels.VIN_LOOKUP,
true
);
});

View file

@ -97,13 +97,9 @@ export default {
},
prependActionToMethod(object, method, actionToPrepend) {
var baseMethod = object[method.name];
if(method.name.startsWith('bound ')){
baseMethod = method.name.substring(6);
}else{
baseMethod = object[method.name];
}
object[method.name.substring(6)] = function () {
let 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);
};