|
@@ -114,7 +114,7 @@ describe( 'ImageToolbar', () => {
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
- describe( 'integration with the editor selection (#render event)', () => {
|
|
|
|
|
|
|
+ describe( 'integration with the editor selection (#change event)', () => {
|
|
|
beforeEach( () => {
|
|
beforeEach( () => {
|
|
|
editor.ui.focusTracker.isFocused = true;
|
|
editor.ui.focusTracker.isFocused = true;
|
|
|
} );
|
|
} );
|
|
@@ -124,7 +124,7 @@ describe( 'ImageToolbar', () => {
|
|
|
|
|
|
|
|
expect( balloon.visibleView ).to.be.null;
|
|
expect( balloon.visibleView ).to.be.null;
|
|
|
|
|
|
|
|
- editingView.fire( 'render' );
|
|
|
|
|
|
|
+ editingView.change( () => {} );
|
|
|
expect( balloon.visibleView ).to.be.null;
|
|
expect( balloon.visibleView ).to.be.null;
|
|
|
|
|
|
|
|
model.change( writer => {
|
|
model.change( writer => {
|
|
@@ -136,9 +136,9 @@ describe( 'ImageToolbar', () => {
|
|
|
|
|
|
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
|
|
|
|
|
|
- // Make sure successive render does not throw, e.g. attempting
|
|
|
|
|
|
|
+ // Make sure successive change does not throw, e.g. attempting
|
|
|
// to insert the toolbar twice.
|
|
// to insert the toolbar twice.
|
|
|
- editingView.fire( 'render' );
|
|
|
|
|
|
|
+ editingView.change( () => {} );
|
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
@@ -152,7 +152,7 @@ describe( 'ImageToolbar', () => {
|
|
|
balloon.add( { view: lastView } );
|
|
balloon.add( { view: lastView } );
|
|
|
expect( balloon.visibleView ).to.equal( lastView );
|
|
expect( balloon.visibleView ).to.equal( lastView );
|
|
|
|
|
|
|
|
- editingView.fire( 'render' );
|
|
|
|
|
|
|
+ editingView.change( () => {} );
|
|
|
expect( balloon.visibleView ).to.equal( lastView );
|
|
expect( balloon.visibleView ).to.equal( lastView );
|
|
|
} );
|
|
} );
|
|
|
|
|
|
|
@@ -170,9 +170,9 @@ describe( 'ImageToolbar', () => {
|
|
|
|
|
|
|
|
expect( balloon.visibleView ).to.be.null;
|
|
expect( balloon.visibleView ).to.be.null;
|
|
|
|
|
|
|
|
- // Make sure successive render does not throw, e.g. attempting
|
|
|
|
|
|
|
+ // Make sure successive change does not throw, e.g. attempting
|
|
|
// to remove the toolbar twice.
|
|
// to remove the toolbar twice.
|
|
|
- editingView.fire( 'render' );
|
|
|
|
|
|
|
+ editingView.change( () => {} );
|
|
|
expect( balloon.visibleView ).to.be.null;
|
|
expect( balloon.visibleView ).to.be.null;
|
|
|
} );
|
|
} );
|
|
|
} );
|
|
} );
|