imagecaption.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. /* global window */
  6. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  7. import ImageCaption from '../src/imagecaption';
  8. import ImageCaptionEditing from '../src/imagecaption/imagecaptionediting';
  9. describe( 'ImageCaption', () => {
  10. let editor, editorElement;
  11. beforeEach( () => {
  12. editorElement = window.document.createElement( 'div' );
  13. window.document.body.appendChild( editorElement );
  14. return ClassicTestEditor
  15. .create( editorElement, {
  16. plugins: [ ImageCaption ]
  17. } )
  18. .then( newEditor => {
  19. editor = newEditor;
  20. } );
  21. } );
  22. afterEach( () => {
  23. editorElement.remove();
  24. return editor.destroy();
  25. } );
  26. it( 'should be loaded', () => {
  27. expect( editor.plugins.get( ImageCaption ) ).to.instanceOf( ImageCaption );
  28. } );
  29. it( 'should load ImageCaptionEditing plugin', () => {
  30. expect( editor.plugins.get( ImageCaptionEditing ) ).to.instanceOf( ImageCaptionEditing );
  31. } );
  32. } );