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

Commit

Permalink
Fixed UI initializaton in ClassicTestEditor.
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarwrobel committed Nov 4, 2016
1 parent ebe101d commit eac9a09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/_utils-tests/classictesteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 Down
6 changes: 3 additions & 3 deletions tests/_utils/classictesteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export default class ClassicTestEditor extends StandardEditor {
this.document.createRoot();
this.editing.createRoot( 'div' );
this.data.processor = new HtmlDataProcessor();

this.ui = new BoxedEditorUIView( this, this.locale );
}

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

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

0 comments on commit eac9a09

Please sign in to comment.