|
|
@@ -5,11 +5,11 @@
|
|
|
|
|
|
import InlineEditorUIView from '../src/inlineeditoruiview';
|
|
|
import EditingView from '@ckeditor/ckeditor5-engine/src/view/view';
|
|
|
-import ViewRootEditableElement from '@ckeditor/ckeditor5-engine/src/view/rooteditableelement';
|
|
|
import ToolbarView from '@ckeditor/ckeditor5-ui/src/toolbar/toolbarview';
|
|
|
import BalloonPanelView from '@ckeditor/ckeditor5-ui/src/panel/balloon/balloonpanelview';
|
|
|
import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview';
|
|
|
import Locale from '@ckeditor/ckeditor5-utils/src/locale';
|
|
|
+import createRoot from '@ckeditor/ckeditor5-engine/tests/view/_utils/createroot.js';
|
|
|
|
|
|
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
|
|
|
|
|
|
@@ -20,7 +20,8 @@ describe( 'InlineEditorUIView', () => {
|
|
|
|
|
|
beforeEach( () => {
|
|
|
locale = new Locale( 'en' );
|
|
|
- setUpEditingView();
|
|
|
+ editingView = new EditingView();
|
|
|
+ editingViewRoot = createRoot( editingView.document );
|
|
|
view = new InlineEditorUIView( locale, editingView );
|
|
|
view.editable.name = editingViewRoot.rootName;
|
|
|
} );
|
|
|
@@ -115,7 +116,6 @@ describe( 'InlineEditorUIView', () => {
|
|
|
describe( 'init()', () => {
|
|
|
it( 'appends #toolbar to panel#content', () => {
|
|
|
locale = new Locale( 'en' );
|
|
|
- setUpEditingView();
|
|
|
const view = new InlineEditorUIView( locale, editingView );
|
|
|
|
|
|
view.editable.name = editingViewRoot.rootName;
|
|
|
@@ -313,11 +313,4 @@ describe( 'InlineEditorUIView', () => {
|
|
|
} );
|
|
|
}
|
|
|
} );
|
|
|
-
|
|
|
- function setUpEditingView() {
|
|
|
- editingView = new EditingView();
|
|
|
- editingViewRoot = new ViewRootEditableElement( 'div' );
|
|
|
- editingViewRoot._document = editingView.document;
|
|
|
- editingView.document.roots.add( editingViewRoot );
|
|
|
- }
|
|
|
} );
|