standardeditingmode.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * @license Copyright (c) 2003-2020, 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 StandardEditingMode from './../src/standardeditingmode';
  9. import StandardEditingModeUI from './../src/standardeditingmodeui';
  10. import StandardEditingModeEditing from './../src/standardeditingmodeediting';
  11. describe( 'StandardEditingMode', () => {
  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: [ StandardEditingMode ] } );
  18. } );
  19. afterEach( () => {
  20. element.remove();
  21. return editor.destroy();
  22. } );
  23. it( 'should be named', () => {
  24. expect( StandardEditingMode.pluginName ).to.equal( 'StandardEditingMode' );
  25. } );
  26. it( 'should load the StandardEditingModeEditing plugin', () => {
  27. expect( editor.plugins.get( StandardEditingModeEditing ) ).to.be.instanceOf( StandardEditingModeEditing );
  28. } );
  29. it( 'should load the StandardEditingModeUI plugin', () => {
  30. expect( editor.plugins.get( StandardEditingModeUI ) ).to.be.instanceOf( StandardEditingModeUI );
  31. } );
  32. } );