| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
- /* global document */
- import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
- import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
- import MultiCommand from '../src/multicommand';
- import IndentEditing from '../src/indentediting';
- describe( 'IndentEditing', () => {
- let editor, element;
- testUtils.createSinonSandbox();
- beforeEach( () => {
- element = document.createElement( 'div' );
- document.body.appendChild( element );
- return ClassicTestEditor
- .create( element, { plugins: [ IndentEditing ] } )
- .then( newEditor => {
- editor = newEditor;
- } );
- } );
- afterEach( () => {
- element.remove();
- if ( editor ) {
- return editor.destroy();
- }
- } );
- it( 'should be named', () => {
- expect( IndentEditing.pluginName ).to.equal( 'IndentEditing' );
- } );
- it( 'should be loaded', () => {
- expect( editor.plugins.get( IndentEditing ) ).to.be.instanceOf( IndentEditing );
- } );
- it( 'should register indent command', () => {
- const command = editor.commands.get( 'indent' );
- expect( command ).to.be.instanceof( MultiCommand );
- } );
- it( 'should register outdent command', () => {
- const command = editor.commands.get( 'outdent' );
- expect( command ).to.be.instanceof( MultiCommand );
- } );
- } );
|