Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Updated ClassicTestEditor class after the removal of Controller class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksander Nowodziński authored and oskarwrobel committed Nov 4, 2016
1 parent e567c9e commit ebe101d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions tests/_utils-tests/classictesteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';
import ClassicTestEditor from 'tests/core/_utils/classictesteditor.js';
import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
import BoxedEditorUI from 'ckeditor5/ui/editorui/boxed/boxededitorui.js';
import BoxedEditorUIView from 'ckeditor5/ui/editorui/boxed/boxededitoruiview.js';
import Feature from 'ckeditor5/core/feature.js';

import { getData } from 'ckeditor5/engine/dev-utils/model.js';
Expand Down Expand Up @@ -57,7 +57,7 @@ describe( 'ClassicTestEditor', () => {
it( 'creates and initilizes the UI', () => {
return ClassicTestEditor.create( editorElement, { foo: 1 } )
.then( editor => {
expect( editor.ui ).to.be.instanceof( BoxedEditorUI );
expect( editor.ui ).to.be.instanceof( BoxedEditorUIView );
} );
} );

Expand Down
12 changes: 3 additions & 9 deletions tests/_utils/classictesteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
*/

import StandardEditor from 'ckeditor5/core/editor/standardeditor.js';

import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';

import BoxedEditorUI from 'ckeditor5/ui/editorui/boxed/boxededitorui.js';
import BoxedEditorUIView from 'ckeditor5/ui/editorui/boxed/boxededitoruiview.js';

/**
Expand All @@ -24,13 +21,8 @@ export default class ClassicTestEditor extends StandardEditor {
super( element, config );

this.document.createRoot();

this.editing.createRoot( 'div' );

this.data.processor = new HtmlDataProcessor();

this.ui = new BoxedEditorUI( this );
this.ui.view = new BoxedEditorUIView( this.locale );
}

/**
Expand All @@ -50,7 +42,9 @@ export default class ClassicTestEditor extends StandardEditor {

resolve(
editor.initPlugins()
.then( () => editor.ui.init() )
.then( () => {
return ( editor.ui = new BoxedEditorUIView( editor, editor.locale ) ).init();
} )
.then( () => editor.loadDataFromEditorElement() )
.then( () => editor )
);
Expand Down

0 comments on commit ebe101d

Please sign in to comment.