import { render, screen, fireEvent } from '@testing-library/react'; import { ThemeProvider } from 'styled-components'; import { EditorView } from '@codemirror/view'; import { EditorState } from '@codemirror/state'; import { coreUIAvailableThemes } from '../../style/theme'; import { createEditorTheme, isDarkBackground } from './editorTheme'; import { Editor, isEditAttempt, createReadOnlyTooltipExtension, } from './Editor.component'; import React from "react"; const mockJsonSchema = jest.fn(() => []); jest.mock('@uiw/react-codemirror', () => { const MockCodeMirror = (props: { value?: string; readOnly?: boolean; height?: string; width?: string; onChange?: (value: string) => void; }) => (