imageupload.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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/classic';
  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.create( editorElement, {
  17. plugins: [ Image, ImageUpload ]
  18. } )
  19. .then( newEditor => {
  20. editor = newEditor;
  21. } );
  22. } );
  23. it( 'should include ImageUploadProgress', () => {
  24. expect( editor.plugins.get( ImageUploadProgress ) ).to.be.instanceOf( ImageUploadProgress );
  25. } );
  26. it( 'should include ImageUploadButton', () => {
  27. expect( editor.plugins.get( ImageUploadButton ) ).to.be.instanceOf( ImageUploadButton );
  28. } );
  29. } );