tableproperties.js 1.4 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 TableProperties from '../src/tableproperties';
  10. import TablePropertiesEditing from '../src/tableproperties/tablepropertiesediting';
  11. describe( 'table properties', () => {
  12. describe( 'TableProperties', () => {
  13. let editor, editorElement;
  14. beforeEach( async () => {
  15. editorElement = global.document.createElement( 'div' );
  16. global.document.body.appendChild( editorElement );
  17. editor = await ClassicTestEditor.create( editorElement, {
  18. plugins: [ TableProperties, 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( TableProperties ) ).to.instanceOf( TableProperties );
  27. } );
  28. it( 'should load TablePropertiesEditing plugin', () => {
  29. expect( editor.plugins.get( TablePropertiesEditing ) ).to.instanceOf( TablePropertiesEditing );
  30. } );
  31. it( 'should have pluginName', () => {
  32. expect( TableProperties.pluginName ).to.equal( 'TableProperties' );
  33. } );
  34. } );
  35. } );