8
0

restrictedediting.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. /* global document */
  6. import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
  7. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  8. import RestrictedEditing from './../src/restrictedediting';
  9. import RestrictedEditingUI from './../src/restrictededitingui';
  10. import RestrictedEditingEditing from './../src/restrictededitingediting';
  11. describe( 'RestrictedEditing', () => {
  12. let editor, element;
  13. testUtils.createSinonSandbox();
  14. beforeEach( async () => {
  15. element = document.createElement( 'div' );
  16. document.body.appendChild( element );
  17. editor = await ClassicTestEditor.create( element, { plugins: [ RestrictedEditing ] } );
  18. } );
  19. afterEach( () => {
  20. element.remove();
  21. return editor.destroy();
  22. } );
  23. it( 'should be named', () => {
  24. expect( RestrictedEditing.pluginName ).to.equal( 'RestrictedEditing' );
  25. } );
  26. it( 'should load the RestrictedEditingEditing plugin', () => {
  27. expect( editor.plugins.get( RestrictedEditingEditing ) ).to.be.instanceOf( RestrictedEditingEditing );
  28. } );
  29. it( 'should load the RestrictedEditingUI plugin', () => {
  30. expect( editor.plugins.get( RestrictedEditingUI ) ).to.be.instanceOf( RestrictedEditingUI );
  31. } );
  32. } );