ckfinder.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 global from '@ckeditor/ckeditor5-utils/src/dom/global';
  7. import CKFinder from '../src/ckfinder';
  8. import CKFinderUI from '../src/ckfinderui';
  9. import CKFinderEditing from '../src/ckfinderediting';
  10. describe( 'CKFinder', () => {
  11. let editorElement, editor;
  12. beforeEach( () => {
  13. editorElement = global.document.createElement( 'div' );
  14. global.document.body.appendChild( editorElement );
  15. return ClassicTestEditor
  16. .create( editorElement, {
  17. plugins: [ CKFinder ]
  18. } )
  19. .then( newEditor => {
  20. editor = newEditor;
  21. } );
  22. } );
  23. afterEach( () => {
  24. editorElement.remove();
  25. return editor.destroy();
  26. } );
  27. it( 'should be loaded', () => {
  28. expect( editor.plugins.get( CKFinder ) ).to.instanceOf( CKFinder );
  29. } );
  30. it( 'should load CKFinderUI plugin', () => {
  31. expect( editor.plugins.get( CKFinderUI ) ).to.instanceOf( CKFinderUI );
  32. } );
  33. it( 'should load CKFinderEditing plugin', () => {
  34. expect( editor.plugins.get( CKFinderEditing ) ).to.instanceOf( CKFinderEditing );
  35. } );
  36. it( 'has proper name', () => {
  37. expect( CKFinder.pluginName ).to.equal( 'CKFinder' );
  38. } );
  39. } );