refactor(editor): remove AbstractEditor type and feature flags in test (#10308)

This commit is contained in:
Saul-Mirone committed 2025-02-20 07:05:35 +00:00
1 parent 13f1859cdf
commit 9f4311f654
19 files changed
+215 -412

No files matched your search

@@ -37,10 +37,10 @@ export function removeModeFromStorage(docId: string) {
const DEFAULT_MODE: DocMode = 'page';
const slotMap = new Map<string, Slot<DocMode>>();
export function mockDocModeService(
getEditorModeCallback: () => DocMode,
setEditorModeCallback: (mode: DocMode) => void
) {
export function mockDocModeService(editor: AffineEditorContainer) {
const getEditorModeCallback: () => DocMode = () => editor.mode;
const setEditorModeCallback: (mode: DocMode) => void = mode =>
editor.switchEditor(mode);
const docModeService: DocModeProvider = {
getPrimaryMode: (docId: string) => {
try {