8
0

tablecellproperties.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * @license Copyright (c) 2003-2020, 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/tablecellproperties/tablecellpropertiesediting';
  11. describe( 'table cell properties', () => {
  12. let editor, editorElement;
  13. describe( 'TableCellProperties', () => {
  14. beforeEach( async () => {
  15. editorElement = global.document.createElement( 'div' );
  16. global.document.body.appendChild( editorElement );
  17. editor = await ClassicTestEditor.create( editorElement, {
  18. plugins: [ TableCellProperties, Paragraph, TableEditing ]
  19. } );
  20. } );
  21. afterEach( async () => {
  22. editorElement.remove();
  23. await editor.destroy();
  24. } );
  25. it( 'should be loaded', () => {
  26. expect( editor.plugins.get( TableCellProperties ) ).to.instanceOf( TableCellProperties );
  27. } );
  28. it( 'should load TableCellPropertiesEditing plugin', () => {
  29. expect( editor.plugins.get( TableCellPropertiesEditing ) ).to.instanceOf( TableCellPropertiesEditing );
  30. } );
  31. it( 'should have pluginName', () => {
  32. expect( TableCellProperties.pluginName ).to.equal( 'TableCellProperties' );
  33. } );
  34. } );
  35. } );