diff --git a/src/discussions/comments/CommentsView.test.jsx b/src/discussions/comments/CommentsView.test.jsx index 3c11131f..6e40fd57 100644 --- a/src/discussions/comments/CommentsView.test.jsx +++ b/src/discussions/comments/CommentsView.test.jsx @@ -1,3 +1,5 @@ +import PropTypes from 'prop-types'; + import { act, fireEvent, render, screen, waitFor, within, } from '@testing-library/react'; @@ -6,7 +8,7 @@ import { IntlProvider } from 'react-intl'; import { MemoryRouter, Route } from 'react-router'; import { Factory } from 'rosie'; -import { initializeMockApp } from '@edx/frontend-platform'; +import { camelCaseObject, initializeMockApp } from '@edx/frontend-platform'; import { getAuthenticatedHttpClient } from '@edx/frontend-platform/auth'; import { AppProvider } from '@edx/frontend-platform/react'; @@ -26,6 +28,37 @@ const courseId = 'course-v1:edX+TestX+Test_Course'; let store; let axiosMock; +// Provides a mock editor component that functions like tinyMCE without the overhead +function MockEditor({ + onBlur, + onEditorChange, +}) { + return ( +