Merge pull request #878 from Safelite/feature/SSR-1464

update value for transaction id
This commit is contained in:
katiekroell 2024-10-25 10:29:14 -04:00 committed by GitHub
commit ec3373d232
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -60,7 +60,7 @@ export default {
const headers = {
[headerKeys.EXPERIMENT]: JSON.stringify(store.experimentSettings),
[headerKeys.APPLICATION_NAME]: applicationConfig.APPLICATION_NAME,
[headerKeys.TRANSACTION_ID]: store.order.referralCorrelationId,
[headerKeys.TRANSACTION_ID]: crypto.randomUUID(),
[headerKeys.ENTERPRISE_ORDER_NUMBER]: store.order.eon,
[headerKeys.REFERRAL_SEQUENCE_NUMBER]: store.order.referralSequenceNumber,
[headerKeys.SESSION_SEQUENCE_NUMBER]: sessionKey

View file

@ -2,16 +2,19 @@ import axios from 'axios';
import globalMethods from '@/global-methods';
import analyticsMixIn from '@/mixins/analytics-mixin';
import { getMountOptions } from '@/helpers/unit-test-helper.js';
import crypto from 'crypto';
// Mock external dependencies
jest.mock('axios');
jest.mock('@/mixins/analytics-mixin');
global.crypto = crypto;
global.$logger = {
logInformation: jest.fn(),
logWarning: jest.fn(),
logError: jest.fn(),
logCritical: jest.fn(),
logCritical: jest.fn()
};
/** @ignore */

View file

@ -71,7 +71,7 @@ export class Logger {
const headers = {
[headerKeys.EXPERIMENT]: JSON.stringify(store.experimentSettings),
[headerKeys.APPLICATION_NAME]: applicationConfig.APPLICATION_NAME,
[headerKeys.TRANSACTION_ID]: store.order.referralCorrelationId,
[headerKeys.TRANSACTION_ID]: crypto.randomUUID(),
[headerKeys.ENTERPRISE_ORDER_NUMBER]: store.order.eon,
[headerKeys.REFERRAL_SEQUENCE_NUMBER]: store.order.referralSequenceNumber,
[headerKeys.SESSION_SEQUENCE_NUMBER]: sessionKey