[web] Avoid double indexing of client side referencing (#28235)

* [web] Move chat client id to shared module

* [web] Avoid double indexing of client references

GitOrigin-RevId: 993930e66fdc9952649e3e8d345c70dd37516121
This commit is contained in:
Mathias Jakobsen
2025-09-08 08:05:14 +00:00
committed by Copybot
parent 644db1722e
commit 442c1952ab
7 changed files with 37 additions and 17 deletions
@@ -5,9 +5,9 @@ import { renderHook, act, waitFor } from '@testing-library/react'
import { expect } from 'chai'
import sinon from 'sinon'
import fetchMock from 'fetch-mock'
import clientIdGenerator from '@/utils/client-id'
import {
useChatContext,
chatClientIdGenerator,
ServerMessageEntry,
} from '@/features/chat/context/chat-context'
import { stubMathJax, tearDownMathJaxStubs } from '../components/stubs'
@@ -35,7 +35,7 @@ describe('ChatContext', function () {
window.metaAttributesCache.set('ol-user', user)
window.metaAttributesCache.set('ol-preventCompileOnLoad', true)
this.stub = sinon.stub(chatClientIdGenerator, 'generate').returns(uuidValue)
this.stub = sinon.stub(clientIdGenerator, 'get').returns(uuidValue)
})
afterEach(function () {