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

Commit

Permalink
Merge pull request #39 from ckeditor/t/38
Browse files Browse the repository at this point in the history
t/38: Adapt ClassicTestEditor to Controller–less architecture.
  • Loading branch information
Reinmar committed Nov 8, 2016
2 parents 7389672 + faebb06 commit 304e2df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 3 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 All @@ -32,6 +32,7 @@ describe( 'ClassicTestEditor', () => {

expect( editor.config.get( 'foo' ) ).to.equal( 1 );
expect( editor ).to.have.property( 'element', editorElement );
expect( editor ).to.have.property( 'ui' ).to.instanceOf( BoxedEditorUIView );
} );

it( 'creates model and view roots', () => {
Expand All @@ -57,7 +58,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
8 changes: 1 addition & 7 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,10 @@ 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 );
this.ui = new BoxedEditorUIView( this, this.locale );
}

/**
Expand Down

0 comments on commit 304e2df

Please sign in to comment.