Merge pull request #2182 from Safelite/feature/CASH-80
CASH-80 allow heritage to redirect to insurance company page now.
This commit is contained in:
commit
63ab42189f
5 changed files with 6 additions and 50 deletions
|
|
@ -42,10 +42,7 @@ export async function getDirectNavigation(toRoute) {
|
||||||
return fmgPageValues.VEHICLE_DAMAGE;
|
return fmgPageValues.VEHICLE_DAMAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (fmgPageValue === fmgPageValues.QUOTE) {
|
||||||
fmgPageValue === fmgPageValues.QUOTE ||
|
|
||||||
fmgPageValue === fmgPageValues.INSURANCE_COMPANY
|
|
||||||
) {
|
|
||||||
const skipVin = await skipVinLookup();
|
const skipVin = await skipVinLookup();
|
||||||
|
|
||||||
if (skipVin) {
|
if (skipVin) {
|
||||||
|
|
|
||||||
|
|
@ -400,26 +400,6 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
// Assert
|
// Assert
|
||||||
expect(result).toBe(fmgPageValues.ESTIMATE);
|
expect(result).toBe(fmgPageValues.ESTIMATE);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Replace navigation to `insurance-company` with `estimate`", async () => {
|
|
||||||
// Arrange
|
|
||||||
const toRoute = {
|
|
||||||
query: {
|
|
||||||
fmgPage: fmgPageValues.INSURANCE_COMPANY,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
|
|
||||||
store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
|
|
||||||
store.commit(storeMutations.UPDATE_IS_REPAIR, true);
|
|
||||||
store.commit(storeMutations.UPDATE_MAKE, "acura");
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const result = await getPageToRouteExistingOrderTo(toRoute);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(result).toBe(fmgPageValues.ESTIMATE);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("Vin-Required", () => {
|
describe("Vin-Required", () => {
|
||||||
|
|
@ -445,29 +425,6 @@ describe("getPageToRouteExistingOrderTo", () => {
|
||||||
// Assert
|
// Assert
|
||||||
expect(result).toBe(fmgPageValues.VIN_LOOKUP);
|
expect(result).toBe(fmgPageValues.VIN_LOOKUP);
|
||||||
});
|
});
|
||||||
|
|
||||||
test("Replace navigation to `insurance-company` with `vin-lookup`", async () => {
|
|
||||||
// Arrange
|
|
||||||
const toRoute = {
|
|
||||||
query: {
|
|
||||||
fmgPage: fmgPageValues.INSURANCE_COMPANY,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
store.commit(storeMutations.UPDATE_IS_VERIFIED_INSURANCE, true);
|
|
||||||
store.commit(storeMutations.UPDATE_REFERRAL_NUMBER, "666666");
|
|
||||||
store.commit(storeMutations.UPDATE_IS_REPAIR, false);
|
|
||||||
store.commit(storeMutations.UPDATE_MAKE, "acura");
|
|
||||||
store.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, [
|
|
||||||
{ glassLocation: glassLocations.WINDSHIELD },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Act
|
|
||||||
const result = await getPageToRouteExistingOrderTo(toRoute);
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
expect(result).toBe(fmgPageValues.VIN_LOOKUP);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -402,7 +402,7 @@ export default {
|
||||||
!options.length ||
|
!options.length ||
|
||||||
store.getters.payment?.insuranceCoverage?.isVerified ||
|
store.getters.payment?.insuranceCoverage?.isVerified ||
|
||||||
(store.getters.order.payment?.isInsurance &&
|
(store.getters.order.payment?.isInsurance &&
|
||||||
getFunnelCookie().HasDelayedClaimRegistration)
|
getFunnelCookie()?.HasDelayedClaimRegistration)
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ const routes = [
|
||||||
store.commit(storeMutations.UPDATE_AFFILIATE_COOKIES, affiliateCookies);
|
store.commit(storeMutations.UPDATE_AFFILIATE_COOKIES, affiliateCookies);
|
||||||
}
|
}
|
||||||
setupAdvertiserTracking();
|
setupAdvertiserTracking();
|
||||||
|
log(" --load session start");
|
||||||
const loadSessionResponse = await loadSessionIfPresent(
|
const loadSessionResponse = await loadSessionIfPresent(
|
||||||
to.query.isInsurance != null
|
to.query.isInsurance != null
|
||||||
? to.query.isInsurance == "true"
|
? to.query.isInsurance == "true"
|
||||||
|
|
@ -121,6 +122,7 @@ const routes = [
|
||||||
: null,
|
: null,
|
||||||
to.query.fmgPage
|
to.query.fmgPage
|
||||||
);
|
);
|
||||||
|
log(" --load session end");
|
||||||
|
|
||||||
//Update external parameter state but not when returning from heritage
|
//Update external parameter state but not when returning from heritage
|
||||||
if (!to.query.fmgPage?.startsWith("service-location")) {
|
if (!to.query.fmgPage?.startsWith("service-location")) {
|
||||||
|
|
@ -388,7 +390,7 @@ router.navigateWithSaving = (
|
||||||
|
|
||||||
router.navigateToExternalUrl = (url, optionalQuery = {}) => {
|
router.navigateToExternalUrl = (url, optionalQuery = {}) => {
|
||||||
log("------------- router navigateToExternalUrl -----------------");
|
log("------------- router navigateToExternalUrl -----------------");
|
||||||
log("url:", url)
|
log("url:", url);
|
||||||
navigateToUrl(url, optionalQuery);
|
navigateToUrl(url, optionalQuery);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue