mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
192ca0479c
* Move `ui.view` to setState
* Move `openFile` to setState
* Move `ui.leftMenuShown` to setState
* Move `ui.miniReviewPanelVisible` to setState
* Move `ui.pdfLayout` to setState
* Move `ui.chatOpen` to setState
* Move `ui.reviewPanelOpen` to setState
* Cleanup: remove layout-context-adapter and imports
* Replace `ui` scope by mocked `LayoutProvider` in tests
* Update test
* Remove unnecessary `scopeStore.set('ui.chatOpen' ...`
GitOrigin-RevId: 81578bfdc958239eac492905f714a6074c81d0f5
21 lines
436 B
TypeScript
21 lines
436 B
TypeScript
import { EditorView } from '@codemirror/view'
|
|
|
|
export const mockScope = () => ({
|
|
settings: {
|
|
syntaxValidation: false,
|
|
pdfViewer: 'pdfjs',
|
|
},
|
|
editor: {
|
|
open_doc_name: 'main.tex',
|
|
sharejs_doc: {
|
|
doc_id: 'test-doc',
|
|
getSnapshot: () => 'some doc content',
|
|
hasBufferedOps: () => false,
|
|
},
|
|
view: new EditorView({
|
|
doc: '\\documentclass{article}',
|
|
}),
|
|
},
|
|
hasLintingError: false,
|
|
})
|