|
|
@@ -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;
|
|
|
} );
|