浏览代码

Revert to previous tests of nbsp between blocks.

Maciej Gołaszewski 6 年之前
父节点
当前提交
be3a3624c7
共有 1 个文件被更改,包括 3 次插入26 次删除
  1. 3 26
      packages/ckeditor5-engine/tests/view/domconverter/whitespace-handling-integration.js

+ 3 - 26
packages/ckeditor5-engine/tests/view/domconverter/whitespace-handling-integration.js

@@ -13,7 +13,7 @@ import { getData } from '../../../src/dev-utils/model';
 // dev utils' setData() loses white spaces so don't use it for tests here!!!
 // https://github.com/ckeditor/ckeditor5-engine/issues/1428
 
-describe( 'DomConverter – whitespace handling – integration', () => {
+describe.only( 'DomConverter – whitespace handling – integration', () => {
 	let editor;
 
 	// See https://github.com/ckeditor/ckeditor5-engine/issues/822.
@@ -26,12 +26,6 @@ describe( 'DomConverter – whitespace handling – integration', () => {
 
 					editor.model.schema.extend( '$text', { allowAttributes: [ 'bold' ] } );
 					editor.conversion.attributeToElement( { model: 'bold', view: 'b' } );
-
-					editor.model.schema.register( 'blockQuote', {
-						allowWhere: '$block',
-						allowContentOf: '$root'
-					} );
-					editor.conversion.elementToElement( { model: 'blockQuote', view: 'blockquote' } );
 				} );
 		} );
 
@@ -111,7 +105,8 @@ describe( 'DomConverter – whitespace handling – integration', () => {
 			expect( editor.getData() ).to.equal( '<p>foo</p><p>bar</p>' );
 		} );
 
-		it( 'nbsp between blocks is ignored #1', () => {
+		// Controversial result. See https://github.com/ckeditor/ckeditor5-engine/issues/987.
+		it( 'nbsp between blocks is not ignored', () => {
 			editor.setData( '<p>foo</p>&nbsp;<p>bar</p>' );
 
 			expect( getData( editor.model, { withoutSelection: true } ) )
@@ -120,24 +115,6 @@ describe( 'DomConverter – whitespace handling – integration', () => {
 			expect( editor.getData() ).to.equal( '<p>foo</p><p>bar</p>' );
 		} );
 
-		it( 'nbsp between blocks is ignored #2', () => {
-			editor.setData( '<table>foo</table>&nbsp;<p>bar</p>' );
-
-			expect( getData( editor.model, { withoutSelection: true } ) )
-				.to.equal( '<paragraph>foo</paragraph><paragraph>bar</paragraph>' );
-
-			expect( editor.getData() ).to.equal( '<p>foo</p><p>bar</p>' );
-		} );
-
-		it( 'nbsp between blocks is ignored #3', () => {
-			editor.setData( '<blockquote>foo</blockquote>&nbsp;<blockquote>bar</blockquote>' );
-
-			expect( getData( editor.model, { withoutSelection: true } ) )
-				.to.equal( '<blockQuote><paragraph>foo</paragraph></blockQuote><blockQuote><paragraph>bar</paragraph></blockQuote>' );
-
-			expect( editor.getData() ).to.equal( '<blockquote><p>foo</p></blockquote><blockquote><p>bar</p></blockquote>' );
-		} );
-
 		it( 'new lines inside blocks are ignored', () => {
 			editor.setData( '<p>\nfoo\n</p>' );