Răsfoiți Sursa

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

Aleksander Nowodzinski 5 ani în urmă
părinte
comite
a7d6fe2f8a
1 a modificat fișierele cu 10 adăugiri și 0 ștergeri
  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;
+		} );
 	} );
 } );