Merge pull request #1815 from Safelite/feature/Digital/CSR-2039

CSR-2039
This commit is contained in:
hiteshkumar87 2024-04-01 17:45:20 +05:30 committed by GitHub
commit 5fce807c5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 2 additions and 10 deletions

View file

@ -105,16 +105,12 @@ export async function getImplicitNavigation(toRoute) {
Used to navigate to the heritage funnel with the correct query string and url. Used to navigate to the heritage funnel with the correct query string and url.
*/ */
export async function navigateToHeritageFunnel({ shouldSaveSession, pageNameToLog, loadingModal }) { export async function navigateToHeritageFunnel({ shouldSaveSession, pageNameToLog }) {
// Create the order (or save existing order) when navigating to Heritage Funnel. // Create the order (or save existing order) when navigating to Heritage Funnel.
if (shouldSaveSession) { if (shouldSaveSession) {
await saveSession({ pageNameToLog: pageNameToLog, shouldAwaitSaveSessionQueue: true }); await saveSession({ pageNameToLog: pageNameToLog, shouldAwaitSaveSessionQueue: true });
} }
if (loadingModal && loadingModal.showModal) {
loadingModal.showModal();
}
var heritageParms = { var heritageParms = {
corid: store.getters.order.referralCorrelationId, corid: store.getters.order.referralCorrelationId,
src: "concept-funnel", src: "concept-funnel",

View file

@ -554,7 +554,7 @@ describe("navigateToHeritageFunnel", () => {
router.navigateToExternalUrl = jest.fn(); router.navigateToExternalUrl = jest.fn();
// Act // Act
await navigateToHeritageFunnel({ loadingModal: null, shouldSaveSession: true }); await navigateToHeritageFunnel({ shouldSaveSession: true });
// Assert // Assert
expect(saveSessionFunction).toHaveBeenCalled(); expect(saveSessionFunction).toHaveBeenCalled();

View file

@ -9,7 +9,6 @@ import { storeActions } from "@/constants/store-actions";
import { storeMutations } from "@/constants/store-mutations"; import { storeMutations } from "@/constants/store-mutations";
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios"; import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
import store from "@/store"; import store from "@/store";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { experimentSettings } from "@/constants/experiments"; import { experimentSettings } from "@/constants/experiments";
jest.mock("@/helpers/damage-helper", () => ({ jest.mock("@/helpers/damage-helper", () => ({

View file

@ -79,7 +79,6 @@ import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import baseMixin from "@/mixins/base-mixin.js"; import baseMixin from "@/mixins/base-mixin.js";
import { storeActions } from "@/constants/store-actions"; import { storeActions } from "@/constants/store-actions";
import { settleAllPromises } from "@/helpers/layout-helper"; import { settleAllPromises } from "@/helpers/layout-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { splitCopyOnCMSPlaceHolder } from "@/helpers/cms-content-helper"; import { splitCopyOnCMSPlaceHolder } from "@/helpers/cms-content-helper";
import { import {
calcDaysBetweenDates, calcDaysBetweenDates,

View file

@ -458,13 +458,11 @@ export default {
navigateToHeritageFunnel({ navigateToHeritageFunnel({
shouldSaveSession: true, shouldSaveSession: true,
pageNameToLog: currentPage, pageNameToLog: currentPage,
loadingModal: self.$refs.loadingModal,
}); });
} else if (payment.isInsurance && payment.insuranceCoverage.isVerified) { } else if (payment.isInsurance && payment.insuranceCoverage.isVerified) {
navigateToHeritageFunnel({ navigateToHeritageFunnel({
shouldSaveSession: true, shouldSaveSession: true,
pageNameToLog: currentPage, pageNameToLog: currentPage,
loadingModal: self.$refs.loadingModal,
}); });
} else { } else {
self.$router.navigateWithSaving( self.$router.navigateWithSaving(