Skip to content

Commit b3d1a58

Browse files
committed
fix: add chakra provider
1 parent 0b5d66d commit b3d1a58

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

packages/app/src/features/NoteEditor/tests/utils/renderRichEditor.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { act } from 'react';
22
import { Provider } from 'react-redux';
33
import { createEvent } from 'effector';
4+
import { ChakraProvider, defaultSystem } from '@chakra-ui/react';
45
import { WorkspaceProvider } from '@features/App/Workspace/WorkspaceProvider';
56
import {
67
editorPanelContext,
@@ -19,20 +20,22 @@ export const renderRichEditor = async (props: RichEditorContentProps) => {
1920

2021
const renderEditor = (props: RichEditorContentProps) => (
2122
<Provider store={store}>
22-
<WorkspaceProvider
23-
notesApi={{} as any}
24-
filesRegistry={{} as any}
25-
filesController={{} as any}
26-
attachmentsController={{} as any}
27-
tagsRegistry={{} as any}
28-
notesRegistry={{} as any}
29-
notesHistory={{} as any}
30-
notesIndex={{} as any}
31-
>
32-
<editorPanelContext.Provider value={{ onInserting, onFormatting }}>
33-
<RichEditor {...props} />
34-
</editorPanelContext.Provider>
35-
</WorkspaceProvider>
23+
<ChakraProvider value={defaultSystem}>
24+
<WorkspaceProvider
25+
notesApi={{} as any}
26+
filesRegistry={{} as any}
27+
filesController={{} as any}
28+
attachmentsController={{} as any}
29+
tagsRegistry={{} as any}
30+
notesRegistry={{} as any}
31+
notesHistory={{} as any}
32+
notesIndex={{} as any}
33+
>
34+
<editorPanelContext.Provider value={{ onInserting, onFormatting }}>
35+
<RichEditor {...props} />
36+
</editorPanelContext.Provider>
37+
</WorkspaceProvider>
38+
</ChakraProvider>
3639
</Provider>
3740
);
3841

0 commit comments

Comments
 (0)