From 950ca93ad8e38810b8c6945febc1d44aa84d5b57 Mon Sep 17 00:00:00 2001 From: Katie Date: Fri, 25 Mar 2022 11:39:14 -0400 Subject: [PATCH] CSR-98 Fix tests --- src/helpers/heritage-integration-helper.js | 7 +++++-- src/helpers/heritage-integration-helper.spec.js | 3 +-- src/router/router-constants/routing-table.js | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/helpers/heritage-integration-helper.js b/src/helpers/heritage-integration-helper.js index ecaa6548b..960ab4e65 100644 --- a/src/helpers/heritage-integration-helper.js +++ b/src/helpers/heritage-integration-helper.js @@ -1,3 +1,4 @@ +import * as self from "./heritage-integration-helper"; import { storeActions } from "@/constants/store-actions.js"; import { cookieNames } from "@/constants/cookie-names"; import { queryStrings } from "@/constants/query-strings"; @@ -36,7 +37,7 @@ export async function saveOrder() { */ export async function loadOrderIfPresent() { console.log("attempting to load referral...."); - const conceptCookie = this.getConceptCookie(); + const conceptCookie = self.getConceptCookie(); // Do nothing if there is no cookie or no correlation id. if (conceptCookie === null || conceptCookie.ReferralCorrelationId === null) { @@ -177,10 +178,12 @@ export function isSavedSessionStillActive() { /* Used to navigate to the heritage funnel with the correct query string and url. */ + export async function navigateToHeritageFunnel() { // Create the order (or save existing order) when navigating to Heritage Funnel. - await this.saveOrder(); + // console.log(exports) + await self.saveOrder(); router.navigateToExternalUrl( externalUrls.HERITAGE_FUNNEL, diff --git a/src/helpers/heritage-integration-helper.spec.js b/src/helpers/heritage-integration-helper.spec.js index ff91d68c6..54ba8e9f6 100644 --- a/src/helpers/heritage-integration-helper.spec.js +++ b/src/helpers/heritage-integration-helper.spec.js @@ -102,8 +102,7 @@ describe("saveOrder", () => { { actionName: storeActions.SET_REFERRAL_INFORMATION } - ], - router: router + ] } const mocks = setupMocksForJsFiles(mockData); diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index d928f8696..760dac76a 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -1,6 +1,6 @@ import { fmgPageValues } from "@/router/router-constants/fmgPage-values"; import { navigationScenarios } from "@/router/router-constants/navigation-scenarios"; -import { applicationConfig } from "../../constants/application-config"; +import { applicationConfig } from "@/constants/application-config"; const routingTable = [ {