Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Tests: Added unit test ensuring that no InsertTableView is added befo…
Browse files Browse the repository at this point in the history
…re first open.
  • Loading branch information
mlewand committed Feb 12, 2020
1 parent 44beebb commit e06e917
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/tableui.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';

import TableEditing from '../src/tableediting';
import TableUI from '../src/tableui';
import InsertTableView from '../src/ui/inserttableview';
import SwitchButtonView from '@ckeditor/ckeditor5-ui/src/button/switchbuttonview';
import DropdownView from '@ckeditor/ckeditor5-ui/src/dropdown/dropdownview';
import ListSeparatorView from '@ckeditor/ckeditor5-ui/src/list/listseparatorview';
Expand Down Expand Up @@ -103,6 +104,14 @@ describe( 'TableUI', () => {
expect( tableSizeView.rows ).to.equal( 0 );
expect( tableSizeView.columns ).to.equal( 0 );
} );

it( 'is not fully initialized when not open', () => {
const dropdown = editor.ui.componentFactory.create( 'insertTable' );

for ( const childView of dropdown.panelView.children ) {
expect( childView ).not.to.be.instanceOf( InsertTableView );
}
} );
} );

describe( 'tableRow dropdown', () => {
Expand Down

0 comments on commit e06e917

Please sign in to comment.