8
0

imageupload.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals document */
  6. import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
  7. import Image from '@ckeditor/ckeditor5-image/src/image';
  8. import ImageUpload from '../src/imageupload';
  9. import ImageUploadProgress from '../src/imageuploadprogress';
  10. import ImageUploadButton from '../src/imageuploadbutton';
  11. describe( 'ImageUpload', () => {
  12. let editor;
  13. beforeEach( () => {
  14. const editorElement = document.createElement( 'div' );
  15. document.body.appendChild( editorElement );
  16. return ClassicEditor
  17. .create( editorElement, {
  18. plugins: [ Image, ImageUpload ]
  19. } )
  20. .then( newEditor => {
  21. editor = newEditor;
  22. } );
  23. } );
  24. it( 'should include ImageUploadProgress', () => {
  25. expect( editor.plugins.get( ImageUploadProgress ) ).to.be.instanceOf( ImageUploadProgress );
  26. } );
  27. it( 'should include ImageUploadButton', () => {
  28. expect( editor.plugins.get( ImageUploadButton ) ).to.be.instanceOf( ImageUploadButton );
  29. } );
  30. } );