imagestyle.js 1.2 KB

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