Browse Source

Tests: Added unit test for removing a row with a simple (collapsed) selection in last row's cell.

Marek Lewandowski 5 years ago
parent
commit
fcb5217d75
1 changed files with 15 additions and 0 deletions
  1. 15 0
      packages/ckeditor5-table/tests/commands/removerowcommand.js

+ 15 - 0
packages/ckeditor5-table/tests/commands/removerowcommand.js

@@ -303,6 +303,21 @@ describe( 'RemoveRowCommand', () => {
 			] ) );
 		} );
 
+		it( 'should remove a given row from a table start when selection is at the end', () => {
+			setData( model, modelTable( [
+				[ '00', '01[]' ],
+				[ '10', '11' ],
+				[ '20', '21' ]
+			] ) );
+
+			command.execute();
+
+			assertEqualMarkup( getData( model ), modelTable( [
+				[ '10', '[]11' ],
+				[ '20', '21' ]
+			] ) );
+		} );
+
 		it( 'should change heading rows if removing a heading row', () => {
 			setData( model, modelTable( [
 				[ '00', '01' ],