|
|
@@ -7,7 +7,6 @@ import Editor from '../../src/editor/editor';
|
|
|
import EditingController from '@ckeditor/ckeditor5-engine/src/controller/editingcontroller';
|
|
|
import ModelTestEditor from '../../tests/_utils/modeltesteditor';
|
|
|
|
|
|
-import Plugin from '../../src/plugin';
|
|
|
import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
|
|
|
import DataApiMixin from '../../src/editor/utils/dataapimixin';
|
|
|
import RootElement from '@ckeditor/ckeditor5-engine/src/model/rootelement';
|
|
|
@@ -49,41 +48,6 @@ describe( 'ModelTestEditor', () => {
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
- describe( 'create', () => {
|
|
|
- it( 'creates an instance of editor', () => {
|
|
|
- return ModelTestEditor.create( { foo: 1 } )
|
|
|
- .then( editor => {
|
|
|
- expect( editor ).to.be.instanceof( ModelTestEditor );
|
|
|
-
|
|
|
- expect( editor.config.get( 'foo' ) ).to.equal( 1 );
|
|
|
- } );
|
|
|
- } );
|
|
|
-
|
|
|
- it( 'fires all events in the right order', () => {
|
|
|
- const fired = [];
|
|
|
-
|
|
|
- function spy( evt ) {
|
|
|
- fired.push( evt.name );
|
|
|
- }
|
|
|
-
|
|
|
- class EventWatcher extends Plugin {
|
|
|
- init() {
|
|
|
- this.editor.on( 'pluginsReady', spy );
|
|
|
- this.editor.on( 'dataReady', spy );
|
|
|
- this.editor.on( 'ready', spy );
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return ModelTestEditor
|
|
|
- .create( {
|
|
|
- plugins: [ EventWatcher ]
|
|
|
- } )
|
|
|
- .then( () => {
|
|
|
- expect( fired ).to.deep.equal( [ 'pluginsReady', 'dataReady', 'ready' ] );
|
|
|
- } );
|
|
|
- } );
|
|
|
- } );
|
|
|
-
|
|
|
describe( 'setData', () => {
|
|
|
let editor;
|
|
|
|