Browse Source

Tests: Adjust unit tests to 'plugincollection#ready' event.

Krzysztof Krztoń 7 years ago
parent
commit
4f49c701ad
1 changed files with 8 additions and 3 deletions
  1. 8 3
      packages/ckeditor5-editor-decoupled/tests/decouplededitor.js

+ 8 - 3
packages/ckeditor5-editor-decoupled/tests/decouplededitor.js

@@ -187,12 +187,12 @@ describe( 'DecoupledEditor', () => {
 					const fired = [];
 					const fired = [];
 
 
 					function spy( evt ) {
 					function spy( evt ) {
-						fired.push( evt.name );
+						fired.push( `${ evt.name }-${ evt.source.constructor.name.toLowerCase() }` );
 					}
 					}
 
 
 					class EventWatcher extends Plugin {
 					class EventWatcher extends Plugin {
 						init() {
 						init() {
-							this.editor.on( 'pluginsReady', spy );
+							this.editor.plugins.on( 'ready', spy );
 							this.editor.ui.on( 'ready', spy );
 							this.editor.ui.on( 'ready', spy );
 							this.editor.on( 'dataReady', spy );
 							this.editor.on( 'dataReady', spy );
 							this.editor.on( 'ready', spy );
 							this.editor.on( 'ready', spy );
@@ -204,7 +204,12 @@ describe( 'DecoupledEditor', () => {
 							plugins: [ EventWatcher ]
 							plugins: [ EventWatcher ]
 						} )
 						} )
 						.then( newEditor => {
 						.then( newEditor => {
-							expect( fired ).to.deep.equal( [ 'pluginsReady', 'ready', 'dataReady', 'ready' ] );
+							expect( fired ).to.deep.equal( [
+								'ready-plugincollection',
+								'ready-decouplededitorui',
+								'dataReady-decouplededitor',
+								'ready-decouplededitor'
+							] );
 
 
 							return newEditor.destroy();
 							return newEditor.destroy();
 						} );
 						} );