diff --git a/src/common-components/funnel-footer/funnel-footer.vue b/src/common-components/funnel-footer/funnel-footer.vue
index 43b471e81..2a6119681 100644
--- a/src/common-components/funnel-footer/funnel-footer.vue
+++ b/src/common-components/funnel-footer/funnel-footer.vue
@@ -15,10 +15,6 @@
data-bs-target="#footerModal"
data-bs-dismiss="modal" />
-
-
-
-
{
router.navigateToExternalUrl = jest.fn();
// Act
- await navigateToHeritageFunnel();
+ await navigateToHeritageFunnel({});
// Assert
expect(saveSessionFunction).toHaveBeenCalled();
@@ -424,7 +424,7 @@ describe("navigateToHeritageFunnel", () => {
router.navigateToExternalUrl = jest.fn();
// Act
- await navigateToHeritageFunnel();
+ await navigateToHeritageFunnel({});
// Assert
expect(router.navigateToExternalUrl).toHaveBeenCalled();
@@ -436,7 +436,7 @@ describe("navigateToHeritageFunnel", () => {
);
});
- test("should not save session, but should still navigate", async () => {
+ test("shouldSaveSession is false => should not save session, but should still navigate", async () => {
// Arrange
const mockReferralNumber = "2";
const mockCorrelationId = "55";
@@ -462,7 +462,7 @@ describe("navigateToHeritageFunnel", () => {
router.navigateToExternalUrl = jest.fn();
// Act
- await navigateToHeritageFunnel(false);
+ await navigateToHeritageFunnel({ shouldSaveSession: false });
// Assert
expect(saveSessionFunction).not.toHaveBeenCalled();
diff --git a/src/helpers/heritage-integration/order-helper.js b/src/helpers/heritage-integration/order-helper.js
index 9a24e9c24..f18cd44de 100644
--- a/src/helpers/heritage-integration/order-helper.js
+++ b/src/helpers/heritage-integration/order-helper.js
@@ -30,7 +30,14 @@ export async function loadSessionIfPresent() {
}
// Loads session including referral if there is a cookie, and it doesn't indicate it needs a state reset.
- return (await loadSession(funnelCookie.SavedSessionId)).data;
+ return (
+ await loadSession(
+ funnelCookie.SavedSessionId,
+ funnelCookie.ReferralNumber,
+ funnelCookie.ReferralParentAccountNumber,
+ funnelCookie.ReferralCorrelationId
+ )
+ ).data;
}
/*
@@ -61,13 +68,16 @@ export async function saveSession() {
Calls API to load session given the referral number, referralDate, and referralCorrelationId
and returns the response.
*/
-async function loadSession(savedSessionId) {
+async function loadSession(savedSessionId, referralNumber, accountNumber, referralCorrelationId) {
// await the saveSessionPromise in the store to make sure we're loading up to date information
await store.getters.applicationUser.saveSessionPromise;
const response = await baseMixin.methods.dispatchStoreAction(
storeActions.LOAD_SESSION,
{
savedSessionId: savedSessionId?.toString(),
+ referralNumber,
+ accountNumber,
+ referralCorrelationId,
},
false
);
@@ -84,12 +94,12 @@ async function saveSessionHelper() {
await baseMixin.methods.dispatchStoreAction(
storeActions.UPDATE_STORE_WITH_SAVE_SESSION_RESPONSE,
{
- referralNumber: savedSessionInfo.data.referralNumber.toString(),
+ referralNumber: savedSessionInfo.data.referralNumber?.toString(),
referralCorrelationId: savedSessionInfo.data.referralCorrelationId,
referralDate: savedSessionInfo.data.referralDate,
- accountNumber: savedSessionInfo.data.accountNumber.toString(),
+ accountNumber: savedSessionInfo.data.accountNumber?.toString(),
savedSessionId: savedSessionInfo.data.savedSessionId,
- crmCustomerId: savedSessionInfo.data.crmCustomerId.toString(),
+ crmCustomerId: savedSessionInfo.data.crmCustomerId?.toString(),
},
false
);
diff --git a/src/layouts/address-lookup/address-lookup.spec.js b/src/layouts/address-lookup/address-lookup.spec.js
index bc9839803..2c4b44950 100644
--- a/src/layouts/address-lookup/address-lookup.spec.js
+++ b/src/layouts/address-lookup/address-lookup.spec.js
@@ -560,6 +560,7 @@ describe("address-lookup.vue", () => {
// Act
await wrapper.vm.forwardButtonAction();
+ //FIX THIS
// Assert
expect(wrapper.vm.dispatchStoreAction).not.toHaveBeenCalledWith(
storeActions.UPDATE_SERVICE_LOCATION_WITH_VEHICLE_REGISTRATION
diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue
index d7ced0576..0eb130eba 100644
--- a/src/layouts/address-lookup/address-lookup.vue
+++ b/src/layouts/address-lookup/address-lookup.vue
@@ -344,6 +344,7 @@ export default {
city: this.customerQuestions.addressQuestions.city,
zipCode: this.serviceZipCode,
state: resultMap.serviceZipValidationResponse.state,
+ zipCodeCtu: resultMap.serviceZipValidationResponse.zipCodeCtu,
},
false
);
diff --git a/src/layouts/address-vehicles/address-vehicles.spec.js b/src/layouts/address-vehicles/address-vehicles.spec.js
index 33718ff32..cf485aa97 100644
--- a/src/layouts/address-vehicles/address-vehicles.spec.js
+++ b/src/layouts/address-vehicles/address-vehicles.spec.js
@@ -21,7 +21,7 @@ describe("addressVehicles.vue", () => {
// Arrange
const { wrapper } = setupMocks({});
store.commit(storeMutations.UPDATE_CAR_ID, "NOT NULL");
- store.commit(storeMutations.UPDATE_SERVICE_LOCATION_ZIP_CODE, "12345");
+ store.commit(storeMutations.UPDATE_SERVICE_LOCATION, { zipCode: "12345" });
store.commit(storeMutations.UPDATE_CUSTOMER_EMAIL_ADDRESS, "test@test.com");
// Act
diff --git a/src/layouts/capability-questions/capability-questions.spec.js b/src/layouts/capability-questions/capability-questions.spec.js
index 31fc63af8..f29be44e6 100644
--- a/src/layouts/capability-questions/capability-questions.spec.js
+++ b/src/layouts/capability-questions/capability-questions.spec.js
@@ -103,6 +103,7 @@ const baseStoreGettersDamage = () => {
store.getters = {
pageData: baseStoreGettersPageData,
damage: baseStoreGettersDamage,
+ payment: { insuranceCoverage: {} },
};
store.commit = jest.fn();
@@ -111,6 +112,7 @@ afterEach(() => {
store.getters = {
pageData: baseStoreGettersPageData,
damage: baseStoreGettersDamage,
+ payment: { insuranceCoverage: {} },
};
});
diff --git a/src/layouts/capability-questions/capability-questions.vue b/src/layouts/capability-questions/capability-questions.vue
index ffef2f6fa..d67f73838 100644
--- a/src/layouts/capability-questions/capability-questions.vue
+++ b/src/layouts/capability-questions/capability-questions.vue
@@ -174,9 +174,7 @@ export default {
).parts = partFromCapabilityQuestionAnswer;
}
- // this.navigateForward(partsOrQuestions);
- // TODO KO delete after quote MVP
- this.navigateForward(partsOrQuestions, null, this.shouldGoToHeritageQuote);
+ this.navigateForward(partsOrQuestions);
},
},
components: {
diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js
index 3a0869828..c4b92830a 100644
--- a/src/layouts/estimate/estimate.spec.js
+++ b/src/layouts/estimate/estimate.spec.js
@@ -219,40 +219,32 @@ describe("estimate.vue", () => {
});
});
-describe("skipVinLookup", () => {
+describe("test alertInfo and isRepair", () => {
const skipOptions = [
- [true, true, true, true],
- [true, false, false, true],
- [false, true, true, true],
- [false, false, false, false],
+ [true, false, "AlertQuoteReady"],
+ [false, true, "AlertQuoteVinOptional"],
+ [false, false, "AlertQuoteReady"],
+ [true, true, "AlertQuoteVinOptional"],
];
test.each(skipOptions)(
- "isRepair %s, isVinOptional %s and suppressVinCapture %s should return %s",
- async (isRepair, isVinOptionalVehicle, suppressVinCapture, expectedVinSkip) => {
+ "isRepair %s, skipVinNotRepair %s alertInfo should return %s",
+ async (isRepair, skipVinNotRepair, expectedAlertInfo) => {
const { wrapper } = setupMocks({});
await wrapper.setData({
- isVinOptionalVehicle: isVinOptionalVehicle,
+ skipVinNotRepair: skipVinNotRepair,
});
store.commit(storeMutations.UPDATE_IS_REPAIR, isRepair);
- const mockExperimentsList = [
- {
- universeName: "ConceptFunnel",
- settings: {
- SuppressVinCapture: suppressVinCapture,
- },
- },
- ];
- store.commit(storeMutations.UPDATE_EXPERIMENTS, mockExperimentsList);
- expect(wrapper.vm.skipVinLookup).toEqual(expectedVinSkip);
+ expect(wrapper.vm.alertInfo).toEqual(expectedAlertInfo);
+ expect(wrapper.vm.isRepair).toEqual(isRepair);
}
);
});
function setupMocks({
groupName = "estimate",
- isVinOptionalVehicle = false,
+ skipVin = 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" },
@@ -284,7 +276,10 @@ function setupMocks({
mountOptions["attachTo"] = document.body;
const wrapper = shallowMount(estimate, mountOptions);
- wrapper.vm.isVinOptionalVehicle = isVinOptionalVehicle;
+ wrapper.vm.skipVin = skipVin;
+ wrapper.vm.getZipCodeData = jest
+ .fn()
+ .mockReturnValue({ isValid: true, isServiceable: true, state: "OH" });
return { wrapper, apiPromise };
}
diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue
index 9d31083d6..e2e3cbb07 100644
--- a/src/layouts/estimate/estimate.vue
+++ b/src/layouts/estimate/estimate.vue
@@ -1,11 +1,12 @@