Explorar el Código

Fixed UI initializaton in ClassicTestEditor.

Oskar Wrobel hace 9 años
padre
commit
a2709f9f36

+ 1 - 0
packages/ckeditor5-core/tests/_utils-tests/classictesteditor.js

@@ -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', () => {

+ 3 - 3
packages/ckeditor5-core/tests/_utils/classictesteditor.js

@@ -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 );
 	}
 
 	/**
@@ -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 )
 			);