code cleanup - remove loader parameter
This commit is contained in:
hiteshkumar87 2024-04-01 17:29:14 +05:30
parent 95e6d02b74
commit 72c52f457b
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.
*/
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.
if (shouldSaveSession) {
await saveSession({ pageNameToLog: pageNameToLog, shouldAwaitSaveSessionQueue: true });
}
if (loadingModal && loadingModal.showModal) {
loadingModal.showModal();
}
var heritageParms = {
corid: store.getters.order.referralCorrelationId,
src: "concept-funnel",

View file

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

View file

@ -9,7 +9,6 @@ import { storeActions } from "@/constants/store-actions";
import { storeMutations } from "@/constants/store-mutations";
import { navigationScenarios } from "@/router/router-constants/navigation-scenarios";
import store from "@/store";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { experimentSettings } from "@/constants/experiments";
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 { storeActions } from "@/constants/store-actions";
import { settleAllPromises } from "@/helpers/layout-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { splitCopyOnCMSPlaceHolder } from "@/helpers/cms-content-helper";
import {
calcDaysBetweenDates,

View file

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