[web] Fix Editor Stories (#26535)

* Fix storybook stories

* Add `chat` to `ol-capabilities` in Storybook

GitOrigin-RevId: 0816c82170ebc3bfe9ca2d7f02766364c693365a
This commit is contained in:
Antoine Clausse
2025-06-24 10:10:36 +02:00
committed by Copybot
parent 192ca0479c
commit 9310a024ed
5 changed files with 12 additions and 2 deletions
@@ -35,6 +35,7 @@ const setupFetchMock = fetchMock => {
const fileData = {
id: 'file-id',
name: 'file.tex',
hash: 'c0ffee',
created: new Date().toISOString(),
}
@@ -100,7 +100,7 @@ export const mockClearCache = fetchMock =>
})
export const mockBuildFile = fetchMock =>
fetchMock.get('express:/build/:file', url => {
fetchMock.get('express:/build/:file', ({ url }) => {
const { pathname } = new URL(url, 'https://example.com')
switch (pathname) {
@@ -319,7 +319,7 @@ export const HybridToolbar = () => {
export const FileList = () => {
const fileList = useMemo(() => {
return buildFileList(cloneDeep(outputFiles))
return buildFileList(cloneDeep(outputFiles), {})
}, [])
return (
@@ -189,6 +189,9 @@ const mockDoc = (content: string, changes: Array<Record<string, any>> = []) => {
detachFromCM6: () => {
// Do nothing
},
getType: () => {
return 'history-ot'
},
on: () => {
// Do nothing
},