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

Commit

Permalink
Aligned the ClassicTestEditor to the View#render API.
Browse files Browse the repository at this point in the history
  • Loading branch information
oleq committed Oct 20, 2017
1 parent b8be59d commit a2a0300
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
10 changes: 0 additions & 10 deletions tests/_utils-tests/classictesteditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,10 @@ describe( 'ClassicTestEditorUI', () => {
} );
} );

describe( 'init()', () => {
it( 'initializes the #view', () => {
const spy = sinon.spy( view, 'init' );

ui.init();
sinon.assert.calledOnce( spy );
} );
} );

describe( 'destroy()', () => {
it( 'destroys the #view', () => {
const spy = sinon.spy( view, 'destroy' );

ui.init();
ui.destroy();
sinon.assert.calledOnce( spy );
} );
Expand Down
4 changes: 2 additions & 2 deletions tests/_utils/classictesteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ export default class ClassicTestEditor extends StandardEditor {

resolve(
editor.initPlugins()
.then( () => editor._elementReplacer.replace( element, editor.ui.view.element ) )
.then( () => editor.ui.view.render() )
.then( () => {
editor.ui.init();
editor._elementReplacer.replace( element, editor.ui.view.element );
editor.fire( 'uiReady' );
} )
.then( () => editor.editing.view.attachDomRoot( editor.ui.view.editableElement ) )
Expand Down
9 changes: 0 additions & 9 deletions tests/_utils/classictesteditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ export default class ClassicTestEditorUI {
this.focusTracker = new FocusTracker();
}

/**
* Initializes the UI.
*
* @returns {Promise} A Promise resolved when the initialization process is finished.
*/
init() {
this.view.init();
}

/**
* Destroys the UI.
*
Expand Down

0 comments on commit a2a0300

Please sign in to comment.