8
0
Просмотр исходного кода

Tests: updated manual test for whitespaces.

Szymon Cofalik 9 лет назад
Родитель
Сommit
372809ad1b

+ 2 - 2
packages/ckeditor5-typing/tests/tickets/49/1.js

@@ -20,7 +20,7 @@ ClassicEditor.create( document.querySelector( '#editor' ), {
 
 	const editable = editor.ui.editableElement;
 
-	editor.document.on( 'change', () => {
+	editor.document.on( 'changesDone', () => {
 		console.clear();
 
 		const modelData = getModelData( editor.document, { withoutSelection: true } );
@@ -31,7 +31,7 @@ ClassicEditor.create( document.querySelector( '#editor' ), {
 
 		console.log( 'dom:', editable.innerHTML );
 		console.log( 'editor.getData', editor.getData() );
-	} );
+	}, { priority: 'lowest' } );
 } )
 .catch( err => {
 	console.error( err.stack );

+ 2 - 0
packages/ckeditor5-typing/tests/tickets/49/1.md

@@ -10,3 +10,5 @@ Open console and start using <kbd>space</kbd>. After each change, console is ref
 * All `&nbsp;` from model and view are being changed to `_`.
 * There should be no `_` in view and model output.
 * There should be `&nbsp;` in DOM and `getData` output, where needed.
+
+Use `editor.setData()` to test whether whitespaces in input HTML are correctly removed.