tablecellproperties.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. import global from '@ckeditor/ckeditor5-utils/src/dom/global';
  6. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  7. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  8. import TableEditing from '../src/tableediting';
  9. import TableCellProperties from '../src/tablecellproperties';
  10. import TableCellPropertiesEditing from '../src/tablecellpropertiesediting';
  11. describe( 'TableCellProperties', () => {
  12. let editor, editorElement;
  13. beforeEach( async () => {
  14. editorElement = global.document.createElement( 'div' );
  15. global.document.body.appendChild( editorElement );
  16. await ClassicTestEditor.create( {
  17. plugins: [ TableCellProperties, Paragraph, TableEditing ]
  18. } );
  19. } );
  20. afterEach( async () => {
  21. editorElement.remove();
  22. await editor.destroy();
  23. } );
  24. it( 'should be loaded', () => {
  25. expect( editor.plugins.get( TableCellProperties ) ).to.instanceOf( TableCellProperties );
  26. } );
  27. it( 'should load TableCellPropertiesEditing plugin', () => {
  28. expect( editor.plugins.get( TableCellPropertiesEditing ) ).to.instanceOf( TableCellPropertiesEditing );
  29. } );
  30. it( 'should have pluginName', () => {
  31. expect( TableCellProperties.pluginName ).to.equal( 'TableCellProperties' );
  32. } );
  33. } );