diff --git a/src/constants/header-keys.js b/src/constants/header-keys.js index 13722fb6d..4c509f47b 100644 --- a/src/constants/header-keys.js +++ b/src/constants/header-keys.js @@ -1,4 +1,8 @@ export const headerKeys = { EXPERIMENT: "X-Experiment-Data", - APPLICATION_NAME: "AppName", + APPLICATION_NAME: "Application-Name", + REFERRAL_SEQUENCE_NUMBER: "referral-Sequence-Number", + SESSION_SEQUENCE_NUMBER: "session-Sequence-Number", + TRANSACTION_ID: "transaction-Id", + EON: "eon", }; diff --git a/src/global-methods.js b/src/global-methods.js index 2d7e53262..19d899887 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -61,6 +61,10 @@ export default { const headers = { [headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings), [headerKeys.APPLICATION_NAME]: applicationConfig.APPLICATION_NAME, + [headerKeys.SESSION_SEQUENCE_NUMBER]: store.getters.applicationUser?.savedSessionId, + [headerKeys.REFERRAL_SEQUENCE_NUMBER]: store.getters.order?.referralSequenceNumber, + [headerKeys.TRANSACTION_ID]: crypto.randomUUID(), + [headerKeys.EON]: store.getters.order?.eon, }; axios({ diff --git a/src/global-methods.spec.js b/src/global-methods.spec.js index 93aafea81..e6c0e4858 100644 --- a/src/global-methods.spec.js +++ b/src/global-methods.spec.js @@ -13,6 +13,7 @@ global.$logger = { logError: jest.fn(), logCritical: jest.fn(), }; +global.crypto = { randomUUID: jest.fn() }; it("Global Methods - Call Http Client - Should Resolve Promise", () => { //Arrange diff --git a/src/layouts/estimate/estimate.spec.js b/src/layouts/estimate/estimate.spec.js index 7a66a197c..3487116f0 100644 --- a/src/layouts/estimate/estimate.spec.js +++ b/src/layouts/estimate/estimate.spec.js @@ -24,6 +24,7 @@ jest.mock("@/helpers/cms-content-helper", () => ({ fetchCmsContentForPage: jest.fn(), })); +global.crypto = { randomUUID: jest.fn() }; describe("estimate.vue", () => { test("Selected vin option is emitted upon selection.", async () => { //Arrange