8
0
Pārlūkot izejas kodu

Use VirtualTestEditor in IndentEditing tests.

Maciej Gołaszewski 6 gadi atpakaļ
vecāks
revīzija
d20d46a866
1 mainītis faili ar 4 papildinājumiem un 11 dzēšanām
  1. 4 11
      packages/ckeditor5-core/tests/indentediting.js

+ 4 - 11
packages/ckeditor5-core/tests/indentediting.js

@@ -3,33 +3,26 @@
  * 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 VirtualTestEditor from './_utils/virtualtesteditor';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 
 import MultiCommand from '../src/multicommand';
 import IndentEditing from '../src/indentediting';
 
 describe( 'IndentEditing', () => {
-	let editor, element;
+	let editor;
 
 	testUtils.createSinonSandbox();
 
 	beforeEach( () => {
-		element = document.createElement( 'div' );
-		document.body.appendChild( element );
-
-		return ClassicTestEditor
-			.create( element, { plugins: [ IndentEditing ] } )
+		return VirtualTestEditor
+			.create( { plugins: [ IndentEditing ] } )
 			.then( newEditor => {
 				editor = newEditor;
 			} );
 	} );
 
 	afterEach( () => {
-		element.remove();
-
 		if ( editor ) {
 			return editor.destroy();
 		}