Browse Source

Move Indent* tests to indent also.

Maciej Gołaszewski 6 years ago
parent
commit
a419b32a95

+ 0 - 50
packages/ckeditor5-core/tests/indent/indent.js

@@ -1,50 +0,0 @@
-/**
- * @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 '../_utils/classictesteditor';
-import testUtils from '../_utils/utils';
-
-import Indent from '../../src/indent/indent';
-import IndentEditing from '../../src/indent/indentediting';
-import IndentUI from '../../src/indent/indentui';
-
-describe( 'Indent', () => {
-	let editor, element;
-
-	testUtils.createSinonSandbox();
-
-	beforeEach( () => {
-		element = document.createElement( 'div' );
-		document.body.appendChild( element );
-
-		return ClassicTestEditor
-			.create( element, { plugins: [ Indent ] } )
-			.then( newEditor => {
-				editor = newEditor;
-			} );
-	} );
-
-	afterEach( () => {
-		element.remove();
-
-		if ( editor ) {
-			return editor.destroy();
-		}
-	} );
-
-	it( 'should be named', () => {
-		expect( Indent.pluginName ).to.equal( 'Indent' );
-	} );
-
-	it( 'should load the IndentUI plugin', () => {
-		expect( editor.plugins.get( IndentUI ) ).to.be.instanceOf( IndentUI );
-	} );
-
-	it( 'should load the IndentEditing plugin', () => {
-		expect( editor.plugins.get( IndentEditing ) ).to.be.instanceOf( IndentEditing );
-	} );
-} );

+ 0 - 50
packages/ckeditor5-core/tests/indent/indentediting.js

@@ -1,50 +0,0 @@
-/**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
-
-import VirtualTestEditor from '../_utils/virtualtesteditor';
-import testUtils from '../_utils/utils';
-
-import MultiCommand from '../../src/multicommand';
-import IndentEditing from '../../src/indent/indentediting';
-
-describe( 'IndentEditing', () => {
-	let editor;
-
-	testUtils.createSinonSandbox();
-
-	beforeEach( () => {
-		return VirtualTestEditor
-			.create( { plugins: [ IndentEditing ] } )
-			.then( newEditor => {
-				editor = newEditor;
-			} );
-	} );
-
-	afterEach( () => {
-		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 );
-	} );
-} );

+ 0 - 78
packages/ckeditor5-core/tests/indent/indentui.js

@@ -1,78 +0,0 @@
-/**
- * @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 '../_utils/classictesteditor';
-import testUtils from '../_utils/utils';
-import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
-
-import IndentEditing from '../../src/indent/indentediting';
-import IndentUI from '../../src/indent/indentui';
-
-describe( 'IndentUI', () => {
-	let editor, element;
-
-	testUtils.createSinonSandbox();
-
-	beforeEach( () => {
-		element = document.createElement( 'div' );
-		document.body.appendChild( element );
-
-		return ClassicTestEditor
-			.create( element, { plugins: [ IndentUI, IndentEditing ] } )
-			.then( newEditor => {
-				editor = newEditor;
-			} );
-	} );
-
-	afterEach( () => {
-		element.remove();
-
-		if ( editor ) {
-			return editor.destroy();
-		}
-	} );
-
-	it( 'should be named', () => {
-		expect( IndentUI.pluginName ).to.equal( 'IndentUI' );
-	} );
-
-	it( 'should be loaded', () => {
-		expect( editor.plugins.get( IndentUI ) ).to.be.instanceOf( IndentUI );
-	} );
-
-	it( 'should set up button for indent', () => {
-		const indentButton = editor.ui.componentFactory.create( 'indent' );
-
-		expect( indentButton ).to.be.instanceOf( ButtonView );
-	} );
-
-	it( 'should set up button for indent', () => {
-		const outdentButton = editor.ui.componentFactory.create( 'outdent' );
-
-		expect( outdentButton ).to.be.instanceOf( ButtonView );
-	} );
-
-	it( 'should execute indent command on button execute', () => {
-		const button = editor.ui.componentFactory.create( 'indent' );
-		const spy = sinon.spy( editor, 'execute' );
-
-		button.fire( 'execute' );
-
-		sinon.assert.calledOnce( spy );
-		sinon.assert.calledWithExactly( spy, 'indent' );
-	} );
-
-	it( 'should execute outdent command on button execute', () => {
-		const button = editor.ui.componentFactory.create( 'outdent' );
-		const spy = sinon.spy( editor, 'execute' );
-
-		button.fire( 'execute' );
-
-		sinon.assert.calledOnce( spy );
-		sinon.assert.calledWithExactly( spy, 'outdent' );
-	} );
-} );