Преглед на файлове

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

Krzysztof Krztoń преди 6 години
родител
ревизия
3d3e55e970
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      packages/ckeditor5-editor-balloon/tests/ballooneditor.js

+ 4 - 3
packages/ckeditor5-editor-balloon/tests/ballooneditor.js

@@ -202,12 +202,12 @@ describe( 'BalloonEditor', () => {
 			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 );
@@ -219,7 +219,8 @@ describe( 'BalloonEditor', () => {
 					plugins: [ EventWatcher ]
 				} )
 				.then( newEditor => {
-					expect( fired ).to.deep.equal( [ 'pluginsReady', 'ready', 'dataReady', 'ready' ] );
+					expect( fired ).to.deep.equal(
+						[ 'ready-plugincollection', 'ready-ballooneditorui', 'dataReady-ballooneditor', 'ready-ballooneditor' ] );
 
 					editor = newEditor;
 				} );