tablecellproperties.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. import TableCellPropertiesUI from '../src/tablecellproperties/tablecellpropertiesui';
  12. describe( 'table cell properties', () => {
  13. let editor, editorElement;
  14. describe( 'TableCellProperties', () => {
  15. beforeEach( async () => {
  16. editorElement = global.document.createElement( 'div' );
  17. global.document.body.appendChild( editorElement );
  18. editor = await ClassicTestEditor.create( editorElement, {
  19. plugins: [ TableCellProperties, Paragraph, TableEditing ]
  20. } );
  21. } );
  22. afterEach( async () => {
  23. editorElement.remove();
  24. await editor.destroy();
  25. } );
  26. it( 'should be loaded', () => {
  27. expect( editor.plugins.get( TableCellProperties ) ).to.instanceOf( TableCellProperties );
  28. } );
  29. it( 'should load TableCellPropertiesUI plugin', () => {
  30. expect( editor.plugins.get( TableCellPropertiesUI ) ).to.instanceOf( TableCellPropertiesUI );
  31. } );
  32. it( 'should load TableCellPropertiesEditing plugin', () => {
  33. expect( editor.plugins.get( TableCellPropertiesEditing ) ).to.instanceOf( TableCellPropertiesEditing );
  34. } );
  35. it( 'should have pluginName', () => {
  36. expect( TableCellProperties.pluginName ).to.equal( 'TableCellProperties' );
  37. } );
  38. } );
  39. } );