8
0
Просмотр исходного кода

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

Krzysztof Krztoń 6 лет назад
Родитель
Сommit
80dd101125
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      packages/ckeditor5-editor-inline/tests/inlineeditor.js

+ 4 - 3
packages/ckeditor5-editor-inline/tests/inlineeditor.js

@@ -192,12 +192,12 @@ describe( 'InlineEditor', () => {
 			const fired = [];
 
 			function spy( evt ) {
-				fired.push( evt.name );
+				fired.push( `${ evt.name }-${ evt.source.constructor.name.toLowerCase() }` );
 			}
 
 			class EventWatcher extends Plugin {
 				init() {
-					this.editor.on( 'pluginsReady', spy );
+					this.editor.plugins.on( 'ready', spy );
 					this.editor.ui.on( 'ready', spy );
 					this.editor.on( 'dataReady', spy );
 					this.editor.on( 'ready', spy );
@@ -209,7 +209,8 @@ describe( 'InlineEditor', () => {
 					plugins: [ EventWatcher ]
 				} )
 				.then( newEditor => {
-					expect( fired ).to.deep.equal( [ 'pluginsReady', 'ready', 'dataReady', 'ready' ] );
+					expect( fired ).to.deep.equal( [
+						'ready-plugincollection', 'ready-inlineeditorui', 'dataReady-inlineeditor', 'ready-inlineeditor' ] );
 
 					editor = newEditor;
 				} );