|
|
@@ -17,7 +17,7 @@ import View from '@ckeditor/ckeditor5-ui/src/view';
|
|
|
import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
|
|
|
|
|
|
describe( 'TableToolbar', () => {
|
|
|
- let editor, model, doc, editingView, plugin, toolbar, balloon, editorElement;
|
|
|
+ let editor, model, doc, plugin, toolbar, balloon, editorElement;
|
|
|
|
|
|
beforeEach( () => {
|
|
|
editorElement = global.document.createElement( 'div' );
|
|
|
@@ -36,7 +36,6 @@ describe( 'TableToolbar', () => {
|
|
|
doc = model.document;
|
|
|
plugin = editor.plugins.get( TableToolbar );
|
|
|
toolbar = plugin._toolbar;
|
|
|
- editingView = editor.editing.view;
|
|
|
balloon = editor.plugins.get( 'ContextualBalloon' );
|
|
|
} );
|
|
|
} );
|
|
|
@@ -79,9 +78,6 @@ describe( 'TableToolbar', () => {
|
|
|
|
|
|
setData( model, '<table><tableRow><tableCell>[]</tableCell></tableRow></table>' );
|
|
|
|
|
|
- // "Flush" throttled update event.
|
|
|
- editor.ui.fire( 'update' );
|
|
|
-
|
|
|
sinon.assert.calledWithMatch( spy, {
|
|
|
view: toolbar,
|
|
|
balloonClassName: 'ck-toolbar-container'
|
|
|
@@ -123,9 +119,6 @@ describe( 'TableToolbar', () => {
|
|
|
it( 'should not show the toolbar on ui#update when the table is selected', () => {
|
|
|
setData( model, '<paragraph>foo</paragraph>[<table><tableRow><tableCell></tableCell></tableRow></table>]' );
|
|
|
|
|
|
- // "Flush" throttled update event.
|
|
|
- editor.ui.fire( 'update' );
|
|
|
-
|
|
|
expect( balloon.visibleView ).to.be.null;
|
|
|
} );
|
|
|
|
|
|
@@ -145,8 +138,6 @@ describe( 'TableToolbar', () => {
|
|
|
);
|
|
|
} );
|
|
|
|
|
|
- // "Flush" throttled update event.
|
|
|
- editor.ui.fire( 'update' );
|
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
|
|
|
|
// Make sure successive change does not throw, e.g. attempting
|
|
|
@@ -158,9 +149,6 @@ describe( 'TableToolbar', () => {
|
|
|
it( 'should not engage when the toolbar is in the balloon yet invisible', () => {
|
|
|
setData( model, '<table><tableRow><tableCell>x[y]z</tableCell></tableRow></table>' );
|
|
|
|
|
|
- // "Flush" throttled update event.
|
|
|
- editor.ui.fire( 'update' );
|
|
|
-
|
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
|
|
|
|
// Put anything on top of the ContextualBalloon stack above the table toolbar.
|
|
|
@@ -184,9 +172,6 @@ describe( 'TableToolbar', () => {
|
|
|
it( 'should hide the toolbar on render if the table is de–selected', () => {
|
|
|
setData( model, '<paragraph>foo</paragraph><table><tableRow><tableCell>[]</tableCell></tableRow></table>' );
|
|
|
|
|
|
- // "Flush" throttled update event.
|
|
|
- editor.ui.fire( 'update' );
|
|
|
-
|
|
|
expect( balloon.visibleView ).to.equal( toolbar );
|
|
|
|
|
|
model.change( writer => {
|
|
|
@@ -196,9 +181,6 @@ describe( 'TableToolbar', () => {
|
|
|
);
|
|
|
} );
|
|
|
|
|
|
- // "Flush" throttled update event.
|
|
|
- editor.ui.fire( 'update' );
|
|
|
-
|
|
|
expect( balloon.visibleView ).to.be.null;
|
|
|
|
|
|
// Make sure successive change does not throw, e.g. attempting
|