CSR-98 Fix tests

This commit is contained in:
Katie 2022-03-25 11:39:14 -04:00
parent 0eaec7e5f8
commit 950ca93ad8
3 changed files with 7 additions and 5 deletions

View file

@ -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,

View file

@ -102,8 +102,7 @@ describe("saveOrder", () => {
{
actionName: storeActions.SET_REFERRAL_INFORMATION
}
],
router: router
]
}
const mocks = setupMocksForJsFiles(mockData);

View file

@ -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 = [
{