8
0

image.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global window */
  6. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  7. import Image from '../src/image';
  8. import ImageEngine from '../src/image/imageengine';
  9. import Widget from '../src/widget/widget';
  10. import ImageTextAlternative from '../src/imagetextalternative';
  11. describe( 'Image', () => {
  12. let editor;
  13. beforeEach( () => {
  14. const editorElement = window.document.createElement( 'div' );
  15. window.document.body.appendChild( editorElement );
  16. return ClassicTestEditor.create( editorElement, {
  17. plugins: [ Image ]
  18. } )
  19. .then( newEditor => {
  20. editor = newEditor;
  21. } );
  22. } );
  23. it( 'should be loaded', () => {
  24. expect( editor.plugins.get( Image ) ).to.instanceOf( Image );
  25. } );
  26. it( 'should load ImageEngine plugin', () => {
  27. expect( editor.plugins.get( ImageEngine ) ).to.instanceOf( ImageEngine );
  28. } );
  29. it( 'should load Widget plugin', () => {
  30. expect( editor.plugins.get( Widget ) ).to.instanceOf( Widget );
  31. } );
  32. it( 'should load ImageTextAlternative plugin', () => {
  33. expect( editor.plugins.get( ImageTextAlternative ) ).to.instanceOf( ImageTextAlternative );
  34. } );
  35. } );