Explorar o código

Tests: Added a Model#hasContent integration tests for an empty selected cell.

Aleksander Nowodzinski %!s(int64=5) %!d(string=hai) anos
pai
achega
a7d6fe2f8a
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      packages/ckeditor5-table/tests/table-integration.js

+ 10 - 0
packages/ckeditor5-table/tests/table-integration.js

@@ -185,5 +185,15 @@ describe( 'Table feature – integration', () => {
 				[ '<blockQuote><paragraph>Foo[]Bar</paragraph></blockQuote>' ]
 			] ) );
 		} );
+
+		it( 'should not make the Model#hasContent() method return "true" when an empty table cell is selected', () => {
+			setModelData( editor.model, '<table>' +
+				'<tableRow>' +
+					'[<tableCell><paragraph></paragraph></tableCell>]' +
+				'</tableRow>' +
+			'</table>' );
+
+			expect( editor.model.hasContent( editor.model.document.selection.getFirstRange() ) ).to.be.false;
+		} );
 	} );
 } );